Skip to content

Cope with *.pyc files outside __pycache__#69

Merged
mmerickel merged 1 commit into
Pylons:masterfrom
nphilipp:master--non-pycache-pyc
May 13, 2021
Merged

Cope with *.pyc files outside __pycache__#69
mmerickel merged 1 commit into
Pylons:masterfrom
nphilipp:master--non-pycache-pyc

Conversation

@nphilipp

@nphilipp nphilipp commented Nov 1, 2020

Copy link
Copy Markdown
Contributor

I hope this pull request finds you well.

PEP-3147 allows solitary *.pyc files outside of __pycache__, however importlib.source_from_cache() raises a ValueError for such files. Fall back to the Python 2.x method if that happens, i.e. strip the trailing c off the file name.

PEP-3147 allows solitary *.pyc files outside of __pycache__, however
importlib.source_from_cache() raises a ValueError for such files. Fall
back to the Python 2.x method if that happens, i.e. strip the trailing
'c' off the file name.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
@digitalresistor

Copy link
Copy Markdown
Member

With Python 3.5 and below being EOL, I would recommend updating this to Python 3.6 or higher only, and we can bump the Python versions that Hupper is compatible with.

I'd like @mmerickel's input on that suggestion though!

@nphilipp

nphilipp commented Nov 2, 2020

Copy link
Copy Markdown
Contributor Author

I'm merely an indirect consumer of hupper on a very current Python version, so personally I'm fine with it. However (and again personally), I'd hold off on that until code outside of compat makes use of features of the latest Python versions and advertises that through its requirements (right now, setup.py claims support for Python 2.7, Python >= 3.4).

@mmerickel mmerickel merged commit da2638c into Pylons:master May 13, 2021
@mmerickel

Copy link
Copy Markdown
Member

Thanks @nphilipp. Sorry for the slowness but LGTM.

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

Successfully merging this pull request may close these issues.

3 participants