-
Notifications
You must be signed in to change notification settings - Fork 207
0.8 cleanups (0.8.11 release candidate) #225
Conversation
Not going to bother with format check or linter, though.
(spellchecker addon bugged me)
Will be the version after this change merges.
Unable to backport some methods in xml module, so instead have those functions raise error.
Don't need them anymore
Disabled in section to shut it up without destroying my local dictionary
Removing empty kwargs and cleaning inputs (corrects #214) Using mws_utc_now in place of deprecated get_timestamp method Deprecation warning now raised in get_timestamp, which now uses datetime.isoformat instead of gmtime and strtime. Some spelling errors corrected.
This is legacy, after all.
Have to import MWSError at runtime in appropriate functions, instead of top-level, due to circular imports.
Running against pre-3.6, not supported.
Shouldn't bother anyway, removed
getchildren deprecated in Py3.2, and finally removed in Py3.9, making it now a breaking change. Removed and replaced with the recommended iter(node)
just iterates the node natively Changing to match.
Future util remove_xml_namespaces used to replace it (identical function)
Copied from develop Both required checks for merges, and not willing to mess around with repo settings to exclude them.
Not being tested directly, and it would be worthwhile to know if it breaks there for some odd reason (unlikely, but never hurts)
While ObjectDict is deprecated on later versions of the project, the old and "new" versions of this object did not have parity, leading to issues such as #226 . Copied ObjectDict over from `develop` version to correct this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the makefile - ok, but now hides the build commands for pushing to pypi.
| @@ -0,0 +1,39 @@ | |||
| from .collections import unique_list_order_preserved | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could there end up with a namespace conflict here, collections is a python standard library?
I've had weird stuff like this happen before, it shouldn't happen, but sometimes does!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is possible, though I think it's less an issue in Python 3 with the absolute imports.
If we're still trying to support Py2 for compatibility in 0.8, then yes that could be a minor issue. Might have to pepper in from __future__ import absolute_import to be safe there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is possible, though I think it's less an issue in Python 3 with the absolute imports.
If we're still trying to support Py2 for compatibility in 0.8, then yes that could be a minor issue. Might have to pepper in
from __future__ import absolute_importto be safe there.
hmmmmm we've pretty much ditched py2 haven't we so don't put more work in than is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only comment really is on the .collections namespace.
|
Re: the Makefile removal, I assume that the command That's one area where we could have an Actions workflow take over, to trigger on tags been added with new version numbers. |
|
Major Changes
ElementTree.getchildren, removed in 3.9.developversion: node is iterated directly.developversiondevelop, but is enough to point out some glaring problems..converagercandpytest.iniremoved, settings added tosetup.cfgdevelopas well.setup.cfgconfigs coped fromdevelop.makealiases)pre-commitfuture_utilsmws.utilscan be found here asmws.future_utils(avoids name conflict with existingutils.py)xmltodictdependency (not added tomasterbranch version) will raiseNotImplementedErrorinstead.developversionremove_empty, replaced by future utilremove_empty_paramsremove_namespace, replaced by future utilremove_xml_namespacesMWS.get_timestamp, deprecated, replaced by future utilmws_utc_nowget_timestampwould return a formatted string. This updated version usesmws_utc_now(which returns adatetime.datetimeobject) and then explicitly returns.isoformat()output, so the output is the same as beforeget_timestampnow usesmws_utc_now, which returnsdatetime.datetimeinstances. Other backported utilities perform proper parameter cleaning (similar todevelop) to convert tostroutput as needed.ObjectDictbackported from 1.0devmasteranddevelopversions of that particular class.Minor changes
requirements-dev.txtadded, copied fromdevelopversionrequirements.txtupdated to match that fromdevelopversionsetup.pynow correctly usessetuptools.find_packages(), similar todevelopversion..txtextension (MANIFEST updated to match)blackperpre-commitfull runpre-commitfull run for line endings and trailing whitespace.gitignoreupdated to matchdevelopversion (soon to include line related to Codespaces, also included here)pre-committouches)