forked from pypa/virtualenv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop support of running under Python 2.7 (pypa#2382)
- Loading branch information
1 parent
3c57468
commit b85542c
Showing
148 changed files
with
1,271 additions
and
2,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Contributing to ``virtualenv`` | ||
# Contributing to `virtualenv` | ||
|
||
Thank you for your interest in contributing to virtualenv! There are many ways to contribute, and we appreciate all of them. | ||
As a reminder, all contributors are expected to follow the [PSF Code of Conduct][coc]. | ||
Thank you for your interest in contributing to virtualenv! There are many ways to contribute, and we appreciate all of | ||
them. As a reminder, all contributors are expected to follow the [PSF Code of Conduct][coc]. | ||
|
||
[coc]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md | ||
|
||
## Development Documentation | ||
|
||
Our [development documentation](https://virtualenv.pypa.io/en/latest/development.html#development) contains details on | ||
how to get started with contributing to ``virtualenv``, and details of our development processes. | ||
how to get started with contributing to `virtualenv`, and details of our development processes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser | ||
blank_issues_enabled: true # default | ||
blank_issues_enabled: true # default | ||
contact_links: | ||
- name: '💬 pypa/virtualenv @ Discord' | ||
url: https://discord.gg/pypa | ||
about: Chat with the devs | ||
- name: 🤷💻🤦 Discourse | ||
url: https://discuss.python.org/c/packaging | ||
about: | | ||
Please ask typical Q&A here: general ideas for Python packaging, questions about structuring projects and so on | ||
- name: 📝 PSF Code of Conduct | ||
url: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md | ||
about: ❤ Be nice to other members of the community. ☮ Behave. | ||
- name: "💬 pypa/virtualenv @ Discord" | ||
url: https://discord.gg/pypa | ||
about: Chat with the devs | ||
- name: 🤷💻🤦 Discourse | ||
url: https://discuss.python.org/c/packaging | ||
about: | | ||
Please ask typical Q&A here: general ideas for Python packaging, questions about structuring projects and so on | ||
- name: 📝 PSF Code of Conduct | ||
url: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md | ||
about: ❤ Be nice to other members of the community. ☮ Behave. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an enhancement for this project | ||
title: '' | ||
title: "" | ||
labels: enhancement | ||
assignees: '' | ||
|
||
assignees: "" | ||
--- | ||
|
||
**What's the problem this feature will solve?** | ||
|
||
<!-- What are you trying to do, that you are unable to achieve with virtualenv as it currently stands? --> | ||
|
||
**Describe the solution you'd like** | ||
|
||
<!-- Clear and concise description of what you want to happen. --> | ||
|
||
<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. --> | ||
|
||
**Alternative Solutions** | ||
|
||
<!-- Have you tried to workaround the problem using virtualenv or other tools? Or a different approach to solving this issue? Please elaborate here. --> | ||
|
||
**Additional context** | ||
|
||
<!-- Add any other context, links, etc. about the feature here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
### Thanks for contributing, make sure you address all the checklists (for details on how see | ||
|
||
[development documentation](https://virtualenv.pypa.io/en/latest/development.html#development))! | ||
|
||
- [ ] ran the linter to address style issues (``tox -e fix_lint``) | ||
- [ ] ran the linter to address style issues (`tox -e fix_lint`) | ||
- [ ] wrote descriptive pull request text | ||
- [ ] ensured there are test(s) validating the fix | ||
- [ ] added news fragment in ``docs/changelog`` folder | ||
- [ ] added news fragment in `docs/changelog` folder | ||
- [ ] updated/extended the documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,6 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: pre-commit/[email protected] | ||
test: | ||
name: test ${{ matrix.py }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -30,18 +22,19 @@ jobs: | |
- "3.8" | ||
- "3.7" | ||
- "3.6" | ||
- "3.5" | ||
- pypy-3.9-v7.3.9 | ||
- pypy-3.8-v7.3.9 | ||
- pypy-3.7-v7.3.9 | ||
- pypy-3.6-v7.3.3 | ||
- pypy-3.7-v7.3.7 | ||
- pypy-3.8-v7.3.7 | ||
- "2.7" | ||
- pypy-2.7 | ||
os: | ||
- ubuntu-20.04 | ||
- macos-10.15 | ||
- macos-12 | ||
- windows-2022 | ||
exclude: | ||
- { os: macos-12, py: "pypy-3.6-v7.3.3" } # PyPy 3.6 does not support macOS 11/12 | ||
include: | ||
- { os: macos-10.15, py: brew@py3 } | ||
- { os: macos-12, py: "[email protected]" } | ||
- { os: macos-12, py: "[email protected]" } | ||
steps: | ||
- name: Install OS dependencies | ||
run: | | ||
|
@@ -54,7 +47,7 @@ jobs: | |
${{ runner.os == 'Linux' && 'tar -zxf nushell.tar.gz' || true }} && \ | ||
${{ runner.os == 'Linux' && 'sudo cp nu /usr/bin' || true }} && \ | ||
${{ runner.os == 'Windows' && 'choco install nushell' || true }} && \ | ||
${{ runner.os == 'macOS' && 'brew update && brew install fish tcsh nushell' || true }} && \ | ||
${{ runner.os == 'macOS' && 'brew install fish tcsh nushell' || true }} && \ | ||
exit 0 || true; | ||
done | ||
exit 1 | ||
|
@@ -63,40 +56,38 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use local virtualenv for tox | ||
run: python -m pip install . | ||
- name: Install Python 2 for cross test | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "2.7" | ||
- name: Setup brew python for test ${{ matrix.py }} | ||
if: startsWith(matrix.py,'brew@') | ||
run: | | ||
set -e | ||
PY=$(echo '${{ matrix.py }}' | cut -c 6-) | ||
brew upgrade python@$PY || brew install python@$PY | ||
echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}" | ||
shell: bash | ||
- name: Setup python for test ${{ matrix.py }} | ||
if: "!( startsWith(matrix.py,'brew@py') || endsWith(matrix.py, '-dev') )" | ||
if: "!( startsWith(matrix.py,'brew@') || endsWith(matrix.py, '-dev') )" | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Setup brew python for test ${{ matrix.py }} | ||
if: startsWith(matrix.py,'brew@py') | ||
run: | | ||
import subprocess; import codecs; import os | ||
subprocess.check_call(["bash", "-c", "brew upgrade python@3 || brew install python@3"]) | ||
with codecs.open(os.environ["GITHUB_PATH"], "a", "utf-8") as file_handler: | ||
file_handler.write("/usr/local/opt/python@3") | ||
shell: python | ||
- name: Pick environment to run | ||
run: | | ||
import platform; import os; import sys; import codecs | ||
cpy = platform.python_implementation() == "CPython" | ||
base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2]) | ||
env = "TOXENV={}\n".format(base) | ||
print("Picked:\n{}for{}".format(env, sys.version)) | ||
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler: | ||
file_handler.write(env) | ||
import os; import platform; import sys; from pathlib import Path | ||
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}' | ||
print(f"Picked: {env} for {sys.version} based of {sys.executable}") | ||
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler: | ||
file_handler.write(env) | ||
shell: python | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Use local virtualenv for tox | ||
run: python -m pip install . | ||
- name: Setup test suite | ||
run: tox -vv --notest | ||
- name: Run test suite | ||
|
@@ -106,7 +97,9 @@ jobs: | |
CI_RUN: "yes" | ||
DIFF_AGAINST: HEAD | ||
- name: Rename coverage report file | ||
run: import os; import sys; os.rename(".tox/.coverage.{}".format(os.environ['TOXENV']), ".tox/.coverage.{}-{}".format(os.environ['TOXENV'], sys.platform)) | ||
run: | | ||
import os; import sys | ||
os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}") | ||
shell: python | ||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -116,7 +109,7 @@ jobs: | |
|
||
coverage: | ||
name: Combine coverage | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -153,7 +146,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
- ubuntu-22.04 | ||
- windows-2022 | ||
tox_env: | ||
- dev | ||
|
@@ -181,8 +174,8 @@ jobs: | |
|
||
publish: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
needs: [check, coverage, lint] | ||
runs-on: ubuntu-20.04 | ||
needs: [check, coverage] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Setup python to build package | ||
uses: actions/setup-python@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Drop support for running under Python 2 (still can generate Python 2 environments) - by :user:`gaborbernat`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
from __future__ import absolute_import, unicode_literals | ||
|
||
from .run import cli_run, session_via_cli | ||
from .version import __version__ | ||
|
||
__all__ = ( | ||
__all__ = [ | ||
"__version__", | ||
"cli_run", | ||
"session_via_cli", | ||
) | ||
] |
Oops, something went wrong.