Skip to content
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

Honor .pth files in target directory #29

Closed
jaraco opened this Issue Sep 24, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@jaraco
Copy link
Owner

commented Sep 24, 2018

Currently, .pth files are only honored on Python 3.2 and earlier due to this workaround.

Python 3.3 and later are excused because the only perceived need for .pth files at the time of the implementation was to support namespace packages, packages which work fine in PEP 420 mode naturally on Python 3.3 and later.

However, I've since learned of other packages such as future-fstrings that install .pth files to enable behavior on startup.

This leads me to believe rwt should no longer exclude later Python versions from the .pth file support... although this increases the impact of the issue that all rwt invocations will now mask any existing sitecustomize.py.

@jaraco

This comment has been minimized.

Copy link
Owner Author

commented Sep 24, 2018

For example

rwt master $ python2.7 -m rwt future-fstrings -- test-fstrings.py
Collecting future-fstrings
  Using cached https://files.pythonhosted.org/packages/90/32/6bb42916d91cf9e548f90b95f15c5d951c691c29b97d4a7ec9385d6c1700/future_fstrings-0.4.4-py2.py3-none-any.whl
Collecting tokenize-rt; python_version < "3.6" (from future-fstrings)
  Downloading https://files.pythonhosted.org/packages/04/59/092aa671d0e19a7b14419e12c518288c563d4532ce7d42da5b3a1dffc49e/tokenize_rt-2.0.1-py2.py3-none-any.whl
Installing collected packages: tokenize-rt, future-fstrings
Successfully installed future-fstrings-0.4.4 tokenize-rt-2.0.1
This requires ['future-fstrings']
rwt master $ python3.5 -m rwt future-fstrings -- test-fstrings.py
Collecting future-fstrings
  Using cached https://files.pythonhosted.org/packages/90/32/6bb42916d91cf9e548f90b95f15c5d951c691c29b97d4a7ec9385d6c1700/future_fstrings-0.4.4-py2.py3-none-any.whl
Collecting tokenize-rt; python_version < "3.6" (from future-fstrings)
  Using cached https://files.pythonhosted.org/packages/04/59/092aa671d0e19a7b14419e12c518288c563d4532ce7d42da5b3a1dffc49e/tokenize_rt-2.0.1-py2.py3-none-any.whl
Installing collected packages: tokenize-rt, future-fstrings
Successfully installed future-fstrings-0.4.4 tokenize-rt-2.0.1
  File "test-fstrings.py", line 1
SyntaxError: encoding problem: future_fstrings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.