This repository was archived by the owner on Jan 4, 2025. It is now read-only.
Py3 support#1
Merged
Conversation
01202bd to
9d6c2fd
Compare
Use new exception syntax when catching HTTPError
Use absolute rather than relative imports
Python 3 compatible import of urllib.quote
Python 3 compatible calc_signature() and remove_empty()
Use base64.encodebytes() instead of base64.encodestring()
Remove encode('utf-8') call
Make DictWrapper Python 3 compatible
Remove Python 2.6 from supported
9d6c2fd to
181496b
Compare
GriceTurrble
added a commit
that referenced
this pull request
Feb 6, 2018
* Merge recent changes from upstream. (#1) * Added Finances API Feature * Don't do automated deployments via Travis (for the moment) * Update README.md badges * InboundShipments, next_token_action decorator, and some style cleanups. (#33) * Testing out git commits from VS Code * Reverting the test commit * Adding VS Code settings to gitignore. * Style fixes * MWS.enumerate_param deprecated: now using utils.enumerate_param and utils.enumerate_params * InboundShipments fleshed out; added `utils.next_token_action` decorator; deprecated separate methods for `...by_next_token()` * Bugfix, rename `_enumerate_param` to `enumerate_param` (no need for private) * Fix for next_token issues. * TravisCI flake8 complaining, fixes. * Minor flake8 complaint. * Hack to get flake8 to stop complaining. * Strip pylint disables to clear line length issue. * Correction to keyed params, now tests every item in values sequence to ensure all are dicts. * Add tests for param methods in utils. * Add test for next token decorator. * Adding 'InboundShipments' to `__all__` * Assigning response a default in __init__ for DictWrapper and DataWrapper * Unneeded line breaks removed + docstring formatting * Comment corrected. They're tuples, not sets. * Finances methods updated to use next_token_action decorator * Ignore VS Code settings * Remove unneeded spacing * Add __iter__ method for ObjectDict to allow simpler iteration, without having a problem when the node is a single ObjectDict instead of a list. * Update docstring for `fromstring` * Variable name correction (linter complaint) * Comment and docstring overhaul * Remove get_timestamp, replace with more standard datetime.datetime.utcnow().isoformat() * Add `assert_no_token` test for methods that use a next_token. * Rename _parse_item_args to parse_item_args (no need for it to be "private") * Re-write for calc_request_description to make some more sense. * Set up testing flag for params to request method. * Test name and comment cleanup * Contents of __all__ sorted alphabetically (pet peeve) * Include assert_no_token as part of decorator test * Add initial modules for testing request methods * rename test modules (linter complaint) * Inventory tests added. * Remove independent service status test (moving towards shared service status param test for each class) * Move service status test to tests.utils.CommonTests, to be inherited by each request test case from here on. * Set isoformat timespec to seconds (don't explicitly need milliseconds, and omitting them makes testing simpler) * Refining common tests, using Inventory class to test the tests. * Bug: should not change the test param to false. * Bugfix: timespec is only available in 3.6+. Replacing with microsecond=0 solution to produce desired result. * Stubs for test suites for existing APIs * Docstrings. Docstrings everywhere. * Bugfix: incorrect super for 2.7 * Documentation updated with gettingStarted section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NB: hasattr() doesn't work on
object_dictinstances in Python 3, but it seems this should be avoided anyway for the moment - see https://hynek.me/articles/hasattr/