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

Use importlib in python3 #1293

Merged
merged 2 commits into from Jan 29, 2019

Conversation

Projects
None yet
2 participants
@asottile
Copy link
Contributor

asottile commented Jan 27, 2019

No description provided.

@asottile asottile force-pushed the asottile:imp_death branch 2 times, most recently from 08cd7eb to ff2243f Jan 27, 2019

@asottile

This comment has been minimized.

Copy link
Contributor Author

asottile commented Jan 27, 2019

in pypy3 this ~slightly changes which modules are symlinked -- for instance, abc.py gets symlinked from lib-python, however as far as I can tell it s unused. imp.find_module(...) returns that path, but the importlib machinery returns a file path that appears to be from build-time of pypy (I think this implies, or at least it does to me, that the code for abc.py is baked into the interpreter?)

@gaborbernat
Copy link
Contributor

gaborbernat left a comment

I like the implementation 👍 I do have some stylistic concerns 🤔

Show resolved Hide resolved virtualenv.py Outdated
Show resolved Hide resolved virtualenv.py Outdated
Show resolved Hide resolved virtualenv.py Outdated
Show resolved Hide resolved virtualenv.py Outdated
@gaborbernat

This comment has been minimized.

Copy link
Contributor

gaborbernat commented Jan 27, 2019

in pypy3 this ~slightly changes which modules are symlinked -- for instance, abc.py gets symlinked from lib-python, however as far as I can tell it s unused. imp.find_module(...) returns that path, but the importlib machinery returns a file path that appears to be from build-time of pypy (I think this implies, or at least it does to me, that the code for abc.py is baked into the interpreter?)

I agree with your intuition here. Let's open a pypy issue to clarify 100%.

@asottile asottile force-pushed the asottile:imp_death branch from ff2243f to 7a15bac Jan 28, 2019

@gaborbernat gaborbernat self-assigned this Jan 29, 2019

@gaborbernat gaborbernat merged commit bcce79d into pypa:master Jan 29, 2019

1 check passed

pypa.virtualenv #pypa.virtualenv_20190129.02 succeeded
Details
@gaborbernat

This comment has been minimized.

Copy link
Contributor

gaborbernat commented Jan 29, 2019

thank you

@asottile asottile deleted the asottile:imp_death branch Jan 30, 2019

clrpackages pushed a commit to clearlinux-pkgs/virtualenv that referenced this pull request Feb 15, 2019

virtualenv: Autospec creation for update from version 16.3.0 to versi…
…on 16.4.0

Anthony Sottile (2):
      Use importlib in python3 (#1293)
      virtualenv does not *always* have a runtime dependency on setuptools (#1300)

Bernat Gabor (2):
      release 16.4.0
      release 16.4.0

Bernát Gábor (2):
      Update virtualenv.py
      upgrade setuptools and pip (#1312)

daa (2):
      Do not check pip config if such command is not available (#1303)
      Link or copy PyPy headers instead of include directory as a whole (#1302)

rofl0r (1):
      fix handling of relative symlinks (#1309)

v16.4.0 (2019-02-09)
--------------------

Bugfixes
^^^^^^^^

- fixes the scenario where the python base install is symlinked with relative symlinks (`#490 <https://github.com/pypa/virtualenv/issues/490>`_)
- Use ``importlib`` over ``imp`` in ``virtualenv.py`` for ``python >= 3.4`` - by Anthony Sottile (`#1293 <https://github.com/pypa/virtualenv/issues/1293>`_)
- Copy or link PyPy header files instead of include directory itself (`#1302 <https://github.com/pypa/virtualenv/issues/1302>`_)
- Allow virtualenv creation with older pip not having ``config`` command
  correspondingly disabling configuration related features (such as pip cert
  setting) in this case. (`#1303 <https://github.com/pypa/virtualenv/issues/1303>`_)

Features

(NEWS truncated at 15 lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment