Add official support for Python 3.10 and 3.11#288
Add official support for Python 3.10 and 3.11#288browniebroke wants to merge 6 commits intopeterbe:masterfrom
Conversation
Looks like Python 3.5 & 3.6 are no longer available on latest
The former is no longer maintained and has some known issues with Python 3.9+
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-20.04 |
There was a problem hiding this comment.
It's no longer possible to install Python 3.5 and 3.6 on ubuntu-latest which now points to 22.04. They are both EOL so it's probably time to drop support for them, but that feels out of scope of this change.
| def ok_(expr, msg=None): | ||
| """ | ||
| Shorthand for assert. | ||
|
|
||
| Copied from Nose. | ||
| """ | ||
| if not expr: | ||
| raise AssertionError(msg) | ||
|
|
||
|
|
||
| def eq_(a, b, msg=None): | ||
| """ | ||
| Shorthand for 'assert a == b, "%r != %r" % (a, b). | ||
|
|
||
| Copied from Nose. | ||
| """ | ||
| if not a == b: | ||
| raise AssertionError(msg or "%r != %r" % (a, b)) | ||
|
|
||
|
|
||
| def assert_raises(exc_class, func, *args): | ||
| """Compatibility with Nose API for pytest.""" | ||
| with pytest.raises(exc_class): | ||
| func(*args) |
There was a problem hiding this comment.
These provide compatibility with Nose APIs. I can replace their usage in this file with direct pytest equivalent if you prefer.
There was a problem hiding this comment.
These provide compatibility with Nose APIs. I can replace their usage in this file with direct pytest equivalent if you prefer.
A search-and-replace is probably better.
|
@peterbe Is this planned for release? |
No. Not until all the tests are updated to support modern versions. |
|
I no longer use this project so have little incentive to progress this further.
What do you mean by that? Can you give a version range to target? |
|
Tried to get this more up to date but it looks like it needs a bit more work as one test is now failing (I presume because a transitive dependency has changed its behaviour)... I don't plan on updating this further but to whoever is motivated, feel free to reuse this 😊 |
I don't use it either.
@AndreyObviously If you need modern versions of this, perhaps take a look at the work by @browniebroke and see if you can create a new fresh PR. |
The main blocker were the test runner, nose which is no longer maintained and has several open issues for recent versions of Python:
I've replaced nose test runner by pytest (which is widely used in the Python community), let me know if you disagree with this choice, and if you prefer another alternative.
Related: #265