-
Notifications
You must be signed in to change notification settings - Fork 8
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
Running tests using python 3.12 #81
Conversation
django32: Django>=3.2,<4.0 | ||
django40: Django>=4.0,<4.1 | ||
django42: Django>=4.2,<5.0 | ||
setuptools |
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.
What's the deal with requiring setuptools here, should it be in the base requirements?
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.
Yes it is available in requirement pip.in but the tests was failing even after upgrading it to new version. I read the documentation and found this solution
https://docs.python.org/dev/whatsnew/3.12.html#summary-release-highlights
Important deprecations, removals or restrictions:
PEP 623: Remove wstr from Unicode objects in Python’s C API, reducing the size of every str object by at least 8 bytes.
PEP 632: Remove the distutils package. See the migration guide for advice replacing the APIs it provided. The third-party Setuptools package continues to provide distutils, if you still require it in Python 3.12 and beyond.
gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.
The asynchat, asyncore, and imp modules have been removed, along with several unittest.TestCase method aliases.
assert excinfo.value.args == ( | ||
"Error determining metadata from message headers: " | ||
"__init__() missing 1 required positional argument: 'event_type'", | ||
expected_error_pattern = re.compile( |
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.
Why are you using a regex here?
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.
The test was failing due to a format change in 3.12 so i found this solution to work with both 3.8 and 3.12
Description:
Running tests for python 3.11 and 3.12
Ticket: https://github.com/orgs/openedx/projects/55/views/1?pane=issue&itemId=53243529,
openedx/axim-engineering#1045