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

Fix get-pip which dropped support for legacy Python #1793

Merged
merged 2 commits into from Jan 27, 2021

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jan 27, 2021

The usage of an f-string in get-pip breaks pyenv builds of Python 2.7, 3.4, and 3.5 until this PR (or similar) is landed and released. Fix pyenv to continue to support these legacy Python builds despite the fact that get-pip has dropped support for Python 2.7 as discussed in pypa/pip#9520 --> pypa/get-pip#87.

Also, fix Python 3.4 and 3.5 which also do not support f-strings.

https://bootstrap.pypa.io/

Make sure you have checked all steps below.

Prerequisite

  • Please consider implementing the feature as a hook script or plugin as a first step.
    • pyenv has some powerful support for plugins and hook scripts. Please refer to Authoring plugins for details and try to implement it as a plugin if possible.
  • Please consider contributing the patch upstream to rbenv, since we have borrowed most of the code from that project.
    • We occasionally import the changes from rbenv. In general, you can expect changes made in rbenv will be imported to pyenv too, eventually.
    • Generally speaking, we prefer not to make changes in the core in order to keep compatibility with rbenv.
  • My PR addresses the following pyenv issue (if any)

Description

  • Here are some details about my PR

Tests

  • My PR adds the following unit tests (if any)

Fix pyenv to continue to support legacy Python builds despite the fact that `get-pip` has dropped support for Python 2 as discussed in pypa/get-pip#87
@anton-petrov anton-petrov merged commit 136bfab into pyenv:master Jan 27, 2021
@cclauss cclauss deleted the patch-2 branch January 27, 2021 17:02
faximan added a commit to faximan/rules_docker that referenced this pull request Feb 2, 2021
…n versions.

The tests are using a base image that only has python3.5 and currently the run_arbitrary tests are failing with

```
stderr: Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
```

This was fixed upstream in pyenv/pyenv#1793 but it is not clear to me how/when we can expect to see that as part of launcher.gcr.io/google/bazel:latest.
smukherj1 pushed a commit to bazelbuild/rules_docker that referenced this pull request Feb 2, 2021
…n versions. (#1723)

The tests are using a base image that only has python3.5 and currently the run_arbitrary tests are failing with

```
stderr: Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
```

This was fixed upstream in pyenv/pyenv#1793 but it is not clear to me how/when we can expect to see that as part of launcher.gcr.io/google/bazel:latest.
faximan added a commit to faximan/rules_docker that referenced this pull request Feb 2, 2021
…n versions.

The tests are using a base image that only has python3.5 and currently the run_arbitrary tests are failing with

```
stderr: Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
```

This was fixed upstream in pyenv/pyenv#1793 but it is not clear to me how/when we can expect to see that as part of launcher.gcr.io/google/bazel:latest.
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.

None yet

2 participants