-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
DeprecationWarning #555
Comments
I am seeing this warning with Python 3.5.1 even though the system package for site.py does not have this deprecation warning. What's unfortunate is that it keeps me from running unit tests with -Werror because it fails in this virtualenv site.py even when the system one would not have generated it. |
This is the stack trace currently generated on python 3.4+ when using the Failed to import the site module
Traceback (most recent call last):
File ".../.tox/py36-djangomaster/bin/../lib/python3.6/site.py", line 703, in <module>
main()
File ".../.tox/py36-djangomaster/bin/../lib/python3.6/site.py", line 683, in main
paths_in_sys = addsitepackages(paths_in_sys)
File ".../.tox/py36-djangomaster/bin/../lib/python3.6/site.py", line 282, in addsitepackages
addsitedir(sitedir, known_paths)
File ".../.tox/py36-djangomaster/bin/../lib/python3.6/site.py", line 204, in addsitedir
addpackage(sitedir, name, known_paths)
File ".../.tox/py36-djangomaster/bin/../lib/python3.6/site.py", line 165, in addpackage
f = open(fullname, "rU")
DeprecationWarning: 'U' mode is deprecated It turns out that this method is used to add packages from |
Has this been fixed? virtualenv/virtualenv_embedded/site.py Line 425 in ab3b733
|
Yes. |
Python 3.8 is stable and has been around for 6 months. It also includes PEP 590 (vectorcall), which is expected to yield performance improvements with Cython 3. However, many distros still use 3.7 (e.g. homebrew, buster, eoan), so keep a job testing on 3.7. Also switch from default (Xenial) to Bionic, because Xenial's virtualenv has warnings (pypa/virtualenv#555).
Getting this error on Python 3.4b2 on Windows 7:
For some reason Virtualenv creates a
site.py
module with code that uses the deprecated U flag.The text was updated successfully, but these errors were encountered: