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
Closed

Honor .pth files in target directory #29

jaraco opened this issue Sep 24, 2018 · 1 comment

Comments

@jaraco
Copy link
Owner

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

jaraco 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

@jaraco jaraco closed this as completed in dc44ef9 Sep 24, 2018
jaraco pushed a commit that referenced this issue Jun 25, 2021
This change adds `nitpicky=True` (which is an equivalent of `-n`) to
make Sphinx emit warnings for any references to non-existing targets.
Then, it adds `-W` to make it fail whenever a single warning is seen.
Finally, `--keep-going` allows Sphinx to print out all the warnings
before exiting instead of showing just one and bailing.

Resolves #29

Refs:
* https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-n
* https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-W
* https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-keep-going
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

No branches or pull requests

1 participant