-
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
Changes from all commits
49ba742
776299e
65fc28a
ff7c34c
7d5e6a0
f89137f
44051f9
6318e8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tox] | ||
envlist = py38-django{32,40} | ||
envlist = py{38,312}-django{42} | ||
|
||
[pycodestyle] | ||
exclude = .git,.tox,migrations | ||
|
@@ -32,8 +32,8 @@ norecursedirs = .* docs requirements site-packages | |
|
||
[testenv] | ||
deps = | ||
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 commentThe 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 commentThe 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
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. |
||
-r{toxinidir}/requirements/test.txt | ||
commands = | ||
python manage.py check | ||
|
@@ -64,6 +64,7 @@ allowlist_externals = | |
rm | ||
touch | ||
deps = | ||
setuptools | ||
-r{toxinidir}/requirements/quality.txt | ||
commands = | ||
touch tests/__init__.py | ||
|
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