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

Python 3.10 compatibility and Python 3.7 deprecation #417

Merged
merged 11 commits into from
Mar 25, 2022
29 changes: 18 additions & 11 deletions .github/workflows/python-lint-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-latest, macos-latest]
defaults:
run:
Expand All @@ -35,9 +35,14 @@ jobs:
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Install geos
if: matrix.os == 'macos-latest' && matrix.python-version == '3.10'
run: |
brew install geos
- name: Install and configure Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up cache
Expand All @@ -56,15 +61,15 @@ jobs:
poetry run mypy
# PYTEST STRATEGY
# macOS is the only runner who has working ModernGL behaviour
# macOS + 3.8 is used for code coverage
# macOS + 3.10 is used for code coverage
- name: Pytest (code coverage)
run: |
poetry run pytest --cov=./ --cov-report=xml
if: matrix.os == 'macos-latest' && matrix.python-version == '3.9'
if: matrix.os == 'macos-latest' && matrix.python-version == '3.10'
- name: Pytest
run: |
poetry run pytest
if: matrix.os == 'macos-latest' && matrix.python-version != '3.9'
if: matrix.os == 'macos-latest' && matrix.python-version != '3.10'
- name: Pytest (no image similarity check)
run: |
poetry run pytest --skip-image-similarity
Expand All @@ -80,7 +85,7 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
if: matrix.os == 'macos-latest' && matrix.python-version == '3.9'
if: matrix.os == 'macos-latest' && matrix.python-version == '3.10'


#################
Expand All @@ -90,7 +95,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, '3.10']
defaults:
run:
shell: bash
Expand All @@ -103,8 +108,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
Expand All @@ -130,13 +136,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install and configure Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install vpype and run PyInstaller
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.10'
- name: Install and configure Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build and run PyInstaller
Expand Down Expand Up @@ -90,13 +91,14 @@ jobs:
needs: [job_release, job_win_installer]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.10'
- name: Install and configure Poetry
uses: snok/install-poetry@v1.1.1
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build
Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- all
- docs

build:
os: ubuntu-20.04
tools:
python: "3.10"
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Release date: UNRELEASED

* ...

### Other changes

* Added support for Python 3.10 and dropped support for Python 3.7 (#417)


## 1.9

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ curvy (circles, bezier curves, etc.) to lines made of small segments. _vpype_ do
Detailed installation instructions are available in the [latest documentation](https://vpype.readthedocs.io/en/latest/install.html).

TL;DR:
- Python 3.9 is recommended, but *vpype* is also compatible with Python 3.7 and 3.8. *vpype* is **not** compatible with Python 3.10 yet.
- Python 3.10 is recommended, but *vpype* is also compatible with Python 3.8 and 3.9.
- *vpype* is published on the [Python Package Index](https://pypi.org) and can be installed with the following command (preferably in a virtual environment):
```bash
pip install "vpype[all]"
```
- Installing on M1 Mac requires special care — check the [installation instruction](https://vpype.readthedocs.io/en/latest/install.html#macos-apple-silicon-m1).
- A Windows installer is available [here](https://github.com/abey79/vpype/releases) (plug-ins cannot be installed
when using this installation method).
- A CLI-only version of *vpype* can be installed using the following command:
Expand Down
20 changes: 14 additions & 6 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ Installation

This page explain how to install *vpype* for end-users. If you intend to develop on *vpype*, refer to the the :ref:`contributing` section.

.. caution::
..
.. caution::

*vpype* is currently **not compatible with Python 3.10**. The recommended version is Python 3.9.9 (or later in the 3.9 series). *vpype* is also compatible with Python 3.8 and 3.7.

.. note::

*vpype* is currently **not compatible with Python 3.10**. The recommended version is Python 3.9.9 (or later in the 3.9 series). *vpype* is
also compatible with Python 3.8 and 3.7.
The recommended Python version is 3.10.2 or later. *vpype* is also compatible with Python 3.8 and 3.9.

.. note::

Expand All @@ -19,6 +23,10 @@ This page explain how to install *vpype* for end-users. If you intend to develop
macOS (Apple Silicon/M1)
========================

.. caution::

On M1 computers, using Python 3.9 is strongly recommended due to the restricted availability of the PySide2 library.

.. highlight:: bash

Installing *vpype* on Macs with Apple Silicon is possible but requires specific steps because some its dependencies are not yet fully supported on this architecture. As a result, the Python interpreter *must* be installed from `MacPorts <https://www.macports.org>`_.
Expand Down Expand Up @@ -54,7 +62,7 @@ Finally, *vpype* may be installed (note the prompt now reflecting the activated
You can test that *vpype* is fully functional by checking its version and displaying some random lines::

(vpype_venv) $ vpype --version
vpype 1.8.0
vpype 1.9.0
(vpype_venv) $ vpype random show

Since *vpype* is installed within a virtual environment, it must be activated each time a new terminal window is opened::
Expand All @@ -71,7 +79,7 @@ macOS (Intel)

The instructions above also apply but, since dependencies have better support for Intel-based Macs, some steps may be simplified.

Firstly, the `official Python distribution <https://www.python.org/downloads/>`_ may be used instead of MacPorts' (again, install Python 3.9 and avoid Python 3.10 as *vpype* is not yet compatible). Secondly, ``pip`` will successfully install all dependencies so using system packages is not required.
Firstly, the `official Python distribution <https://www.python.org/downloads/>`_ may be used instead of MacPorts'. Secondly, ``pip`` will successfully install all dependencies so using system packages is not required.

Using MacPorts
--------------
Expand Down Expand Up @@ -116,7 +124,7 @@ Install *vpype* (note the prompt now reflecting the activated virtual environmen
You can test that *vpype* is fully functional by checking its version and displaying some random lines::

(vpype_venv) $ vpype --version
vpype 1.8.0
vpype 1.9.0
(vpype_venv) $ vpype random show

Since *vpype* is installed within a virtual environment, it must be activated each time a new terminal window is opened::
Expand Down
Loading