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

Add Python 3.11 support #1199

Closed
lisphilar opened this issue Sep 14, 2022 · 5 comments · Fixed by #1297
Closed

Add Python 3.11 support #1199

lisphilar opened this issue Sep 14, 2022 · 5 comments · Fixed by #1297
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lisphilar
Copy link
Owner

lisphilar commented Sep 14, 2022

Summary of request

Python 3.11 will be released on 24Oct2022 and we need to check if we can use covsirphy with Python 3.11 regularly.
https://peps.python.org/pep-0664/
pandas-dev/pandas#46680

(Optional) Why required / what will be improved

Updates cycle of Python and main libraries are very shortened nowadays and we need to catch up the speed. Python 3.11+ improves performance drastically and covsirphy users are highly recommended to use the latest version of covsirphy as soon as we can.

The current Version

CovsirPhy version I used: 2.26.2

@lisphilar lisphilar added the enhancement New feature or request label Sep 14, 2022
@lisphilar
Copy link
Owner Author

@lisphilar lisphilar added this to the Release v2.27.0 milestone Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
lisphilar added a commit that referenced this issue Sep 17, 2022
@lisphilar
Copy link
Owner Author

lisphilar commented Sep 17, 2022

@fpgmaas
Do you have any ideas to check compatibility of dependencies (linsted on pyproject.toml) with specific Python versions? This may be a new project (or within the scope of deptry), but checking compatibility will be more and more heavy task of developers.

I found a issue regarding this for pip, but I think not resolved.
pypa/pip#7649 (comment)

@lisphilar lisphilar changed the title [Revise] check if covsirphy can be used in Python 3.11 [Revise] check if covsirphy can be used with Python 3.11 Sep 17, 2022
@lisphilar lisphilar added the help wanted Extra attention is needed label Sep 19, 2022
@lisphilar lisphilar removed this from the Release v2.27.0 milestone Sep 19, 2022
lisphilar added a commit that referenced this issue Sep 24, 2022
@lisphilar
Copy link
Owner Author

After Python 3.11 releases, pull request will be created and tested to check we can use covsirphy with Python 3.11.
The pull request will be rebased when new changes detected in main branch.
https://github.com/marketplace/actions/rebase-pull-requests

@fpgmaas
Copy link

fpgmaas commented Oct 10, 2022

Hi @lisphilar, sorry for my late reply! I must have missed the notification. If I understand correctly, maybe tox can help you out? See it in use in e.g. my repository cookiecutter-poetry. It allows you to install the environment and run unit tests for various Python versions.

deptry also checks for compatibility with Python 3.11.

@lisphilar
Copy link
Owner Author

lisphilar commented Oct 10, 2022

@fpgmaas Thank you for your comment despite the sudden mention!
GitHub Actions workflow runs pytest with python-version matrix at this time in this project, but tox can be a used for tests with various Python versions.

pip-test:
name: test with pip
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: pip install and test
run: |
pip install pip --upgrade
pip install .
pip install pytest pytest-cov pytest-xdist
pytest -v --maxfail=1 tests -n auto

Sorry for not explaining enough.
Regarding this issue, I'd like to get "FAILED" notification only when all dependencies support Python 3.11. Just after "FAILED" notification, we will start to support Python 3.11 (i.e. replace python = "^3.8,<3.11" with python = "^3.8,<3.12", update python-version matrix if tox not used).

[Edited] With the latest versions of dependencies,

  • All dependencies support Python 3.8, 3.9, 3.10, and some dependencies does not support Python 3.11
    -> Developers do NOT work on tasks for Python 3.11 support and keep the supported Python versions ("^3.8,<3.11")

  • All dependencies support Python 3.8, 3.9, 3.10, 3.11
    -> Developers start to work on tasks for Python 3.11 support

  • Some dependencies does not support Python 3.8, and all dependencies support Python 3.9, 3.10, 3.11
    -> Developers start to work on tasks for drop Python 3.8 support

@lisphilar lisphilar changed the title [Revise] check if covsirphy can be used with Python 3.11 [New] check if covsirphy can be used with Python 3.11 Oct 29, 2022
@lisphilar lisphilar added this to the Release v3.0.0 milestone Feb 4, 2023
@lisphilar lisphilar changed the title [New] check if covsirphy can be used with Python 3.11 Add Python 3.11 support Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants