-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.12 compatibility #54
Conversation
If you remove 3.7 for the test matrix as well, then I will, merge this. |
@@ -34,7 +34,7 @@ | |||
AUTHOR = "Henrik Blidh" | |||
|
|||
# What packages are required for this module to be executed? | |||
REQUIRED = ["requests", "six"] | |||
REQUIRED = open("requirements.txt").read().splitlines() |
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.
I do not like reading the requirements.txt from setup.py, but until I convert to setup.cfg and pyproject.toml, I can accept 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.
I understand, having them duplicated was worse in my opinion. Agree on pyproject.toml is the way to fix it properly.
Thanks, 3.7 tests dropped. |
Version 1.0.0 Breaking changes: Deprecating v5 of BankID API clients in favour of only v6 clients. Sync and Async clients Implementing the v6 API Removing all v5 and v5.1 API implementations Updated documentation Corrected the example app to work with v1.0.0 of PyBankID Contains and fixes #53, #54, #56, #57, #58 Big thanks to @tiwilliam and @mxamin for implementing the async client and v6 clients respectively.
* Update README.rst Corrected typo in examples * Update __init__.py Fix breakage with urllib 2.0.x * Github Action fixes * Version bump * Bump reqs for example * Bundle the BankID Test certificate The BankID pages now returns a captcha instead of the actual certificate when fetching with requests. The actual cert is now bundled instead of fetched each time. * Failure detection in openssl test cert conversion * Add possibility to provide p12 test cert through existing file * Bundle the BankID Test certificate in pem format Bundle pem formats as well. * Python 2.7 compat. fix * Rmoving certutils test for the time being * Remove Python 2.7 support * Remove six dependency * Async client using httpx (#55) * Test against Python 3.12 * Install setuptools after testing * Swap out pkg_resources for importlib * Downgrade importlib-resources to 5.12.0 * Always use compat package * Read required packages in setup.py from requirements.txt * Drop unused six and update docs * Async client * Tidy up async wrapper * Install requirements-dev.txt on CI * Add two more packages to requirements-dev.txt from CI * Update bankid/jsonclient.py Co-authored-by: David Svenson <davidsvenson@outlook.com> * Update bankid/jsonclient.py Co-authored-by: David Svenson <davidsvenson@outlook.com> * Drop unused TypeVar * Update bankid/jsonclient.py Co-authored-by: David Svenson <davidsvenson@outlook.com> --------- Co-authored-by: David Svenson <davidsvenson@outlook.com> * Add support for RP v6.0 * First draft of v6 clients Sync and Async clients Implementing parts of v6 API Removing all v5 and v5.1 API implementations Lacking documentation rewrite Builds on #53, #54, #56, #57, #58 * Corrected the example app to work with v1.0.0 * Documentation update * Cleanup before PR Documentation fixes Renaming and docstring fixes Demo app modifications Version bump * Remove .vscode folder * Minor doc change * Updated README.rst * CI changes Removed testing in windows and macos Also removed 3.7 and 3.8 from test matrix. * Upgrading CI action versions * Implemented phone/auth and phone/sign * Update certutils.py Make it even easier to retrieve the test certificate by writing it into the current directory if no path is supplied. * Expose QR code helper explicitly. This simplifies making use of it without having access to a client instance. * Update README.rst - use pytest instead of py.test pytest is the "new" name :) * Version 1.0.1 - Docfix and QR method separate * Cache ip addresses in test suite. Also, only keep a sync version of the ip_address fixture. This avoids httpbin flakyness/unrelibility since the ip address fetch only needs to happen once. * Use builtin importlib.resources. Supporting Python >=3.9 does not require using the backport. Also, use joinpath() to simplify the retrival of the path+return pathlib.Path instead of str. * Documentation updates * Dropping use of httpbin for external ip * Fix for async test * Add mypy to dev deps. * mypy --install-types * Drop duplicate method. * Fix type errors and add type annotations. * Add type checking to CI. * Add CONTRIBUTING.md --------- Co-authored-by: Simon Olofsson <36161882+dotchetter@users.noreply.github.com> Co-authored-by: Colin 't Hart <colinthart@gmail.com> Co-authored-by: Stefan Berg <sfb@consultron.com> Co-authored-by: William Tisäter <william@defunct.cc> Co-authored-by: David Svenson <davidsvenson@outlook.com> Co-authored-by: Amin Solhizadeh <amin.solhizadeh@oneflow.com> Co-authored-by: Andreas Pelme <andreas@pelme.se>
Make package work with Python 3.7 - 3.12.
Added 3.12 as a testing target on Github Actions and moved setuptools to be installed after testing since it provides
pkg_resources
for Python 3.12. Majority of apps don't have setuptools at production runtime which means Python 3.12 won't be able to loadpkg_resources
since it's removed.Switched to using
importlib
instead and added the official compat package for Python 3.7 and 3.8 lacking importlib.resources.files in CPython.