[!IMPORTANT]
Disregard any failing tests on this pull request; this is due to changes in our code styling tools. Once this PR is merged, future PRs will pass correctly.
[!IMPORTANT]
Failing tests around urllib3 should be ignored for the moment. These will be addressed separately in future PRs.
This PR:
Removes legacy Python 2 code, as that release is unsupported.
Removes dependencies that were required for Python 2 support.
Updates the SDK to use newer language features available in Python 3.
Updates the code styling and quality tools.
Description
This PR makes several improvements to the Python SDK:
Removes the six dependency, which was only present for Python 2 compatibility. Imports and references to the library have been removed from the SDK codebase.
Improves the requirements.txt and test-requirements.txt files by imposing stricter version ranges to avoid potential future conflicts when new majors of dependencies are released.
Improves the setup.py file by removing the redundant dependency version manifest. It now imports the existing requirements.txt file, as the manifests are identical.
Cleans up imports, removing unused references and logically sorting lists.
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected
This PR:
Description
This PR makes several improvements to the Python SDK:
six
dependency, which was only present for Python 2 compatibility. Imports and references to the library have been removed from the SDK codebase.requirements.txt
andtest-requirements.txt
files by imposing stricter version ranges to avoid potential future conflicts when new majors of dependencies are released.setup.py
file by removing the redundant dependency version manifest. It now imports the existingrequirements.txt
file, as the manifests are identical.# noqa: ...
, etc.)# coding: utf-8
header line from source files, as this is the default assumed in Python 3.Besides this, it introduces a number of code formatting tools to produce a cleaner, more efficient SDK result:
References
Closes #77
Review Checklist
main