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

Replace path.py with path #174

Merged
merged 2 commits into from
Nov 19, 2021
Merged

Replace path.py with path #174

merged 2 commits into from
Nov 19, 2021

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Mar 6, 2021

Unless there's some obscure backwards-compatibility reason, I think you should import path instead of path.py.

This actually leads to a problem downstream on conda-forge: since the conda-forge path.py package is just a wrapper for path, no package named path.py is installed, leaving pip in an inconsistent state due to this package's explicit dependence on path.py.

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=286865&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=e5c8ab1d-8ff9-5cae-b332-e15ae582ed2d&l=210

@maresb
Copy link
Contributor Author

maresb commented Mar 6, 2021

Ah, I see... path is Python 3 only. Do you plan to retain 2.7 support?

@jaraco
Copy link
Contributor

jaraco commented Nov 10, 2021

Per the history, Python 2.7 support was dropped in 13.2, but the project was renamed in 13.0. That should mean that 13.0 and 13.1 should be installable on Python 2.7.

However, when I went to confirm this fact, I found that indeed no version of path is installed:

~ $ py -2 -m pip-run path -- -c "import path"
ERROR: Could not find a version that satisfies the requirement path (from versions: none)
ERROR: No matching distribution found for path
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/jaraco/Library/Python/2.7/lib/python/site-packages/pip-run.py", line 4, in <module>
    __name__ == '__main__' and run()
  File "/Users/jaraco/Library/Python/2.7/lib/python/site-packages/pip_run/__init__.py", line 18, in run
    with deps.load(*deps.not_installed(pip_args)) as home:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/Users/jaraco/Library/Python/2.7/lib/python/site-packages/pip_run/deps.py", line 51, in load
    _installable(args) and subprocess.check_call(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', '-m', 'pip', 'install', '-t', '/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-I_LwDq', 'path')' returned non-zero exit status 1

That's a bug. path is meant to install on Python 2.7. I don't know why it's not.

Correction: Support for Python 2.7 was dropped in 12.0. It was in 13.2 that support for Python 3.5 was dropped.

@maresb
Copy link
Contributor Author

maresb commented Nov 10, 2021

Thanks @jaraco for digging into this. Since Python 2.7 is so ancient, I wonder if pytest-plugins will drop support so this PR can be merged?

pytest-shutil/setup.py Outdated Show resolved Hide resolved
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@eeaston
Copy link
Collaborator

eeaston commented Nov 19, 2021

Many thanks for your contribution. We're currently working on dropping support for Python 2.7 so a lot of these sorts of issues should be cleared up soon.

@eeaston eeaston merged commit 8c5cdb9 into man-group:master Nov 19, 2021
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