Skip to content

Add official support for Python 3.10 and 3.11#288

Open
browniebroke wants to merge 6 commits intopeterbe:masterfrom
browniebroke:upgrade/py310-311
Open

Add official support for Python 3.10 and 3.11#288
browniebroke wants to merge 6 commits intopeterbe:masterfrom
browniebroke:upgrade/py310-311

Conversation

@browniebroke
Copy link

@browniebroke browniebroke commented Dec 20, 2022

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

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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +26 to +49
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)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These provide compatibility with Nose APIs. I can replace their usage in this file with direct pytest equivalent if you prefer.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@AndreyObviously
Copy link

@peterbe Is this planned for release?

@peterbe
Copy link
Owner

peterbe commented Jan 23, 2026

@peterbe Is this planned for release?

No. Not until all the tests are updated to support modern versions.

@browniebroke
Copy link
Author

I no longer use this project so have little incentive to progress this further.

No. Not until all the tests are updated to support modern versions.

What do you mean by that? Can you give a version range to target?

@browniebroke
Copy link
Author

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 😊

@peterbe
Copy link
Owner

peterbe commented Jan 26, 2026

I no longer use this project so have little incentive to progress this further.

I don't use it either.

No. Not until all the tests are updated to support modern versions.

What do you mean by that? Can you give a version range to target?

=3.12 perhaps?

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants