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

DEPS: Drop Python 3.9 #58238

Merged
merged 33 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5248558
DEPS: Drop Python 3.9
mroeschke Apr 12, 2024
309991b
Update GHA files
mroeschke Apr 12, 2024
997c6b1
remove 3.8 ref in test file
mroeschke Apr 12, 2024
4ddcf75
Move back to 3.9 for pypy
mroeschke Apr 12, 2024
1dbe036
Bump pyupgrade
mroeschke Apr 12, 2024
3986c3a
Run pyupgrade
mroeschke Apr 12, 2024
a6b7938
Remove pandas.compat.compressors
mroeschke Apr 13, 2024
fc65cc5
Fix env file
mroeschke Apr 13, 2024
ab17fa1
Wronge error message
mroeschke Apr 13, 2024
2402302
Ignore pypy
mroeschke Apr 13, 2024
fe527cc
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 15, 2024
709a132
Test package checks with 3.12
mroeschke Apr 15, 2024
4e2a4de
Modify subprocess test
mroeschke Apr 15, 2024
ba2d2cf
revert conda-forge checks
mroeschke Apr 15, 2024
52a7c0b
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 15, 2024
c5fea80
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 16, 2024
f083f68
Remove 3.9 from circleci
mroeschke Apr 17, 2024
9323bfd
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 17, 2024
4264d9d
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 17, 2024
37a5044
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 22, 2024
68703e5
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 24, 2024
3f630be
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Apr 24, 2024
0d8defc
Pyupgrade
mroeschke Apr 24, 2024
98a82dd
Merge branch 'main' into drop/39
mroeschke May 7, 2024
d1c53b3
Merge branch 'main' into drop/39
mroeschke May 10, 2024
70ad4a4
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke May 15, 2024
470ec04
Merge branch 'drop/39' of https://github.com/mroeschke/pandas into dr…
mroeschke May 15, 2024
330907e
Merge branch 'main' into drop/39
mroeschke May 17, 2024
8e38846
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Jun 3, 2024
21f8038
Don't build 39 wheels
mroeschke Jun 3, 2024
f42c9f3
Merge branch 'drop/39' of https://github.com/mroeschke/pandas into dr…
mroeschke Jun 3, 2024
464d826
Merge remote-tracking branch 'upstream/main' into drop/39
mroeschke Jun 14, 2024
434b91e
Merge branch 'main' into drop/39
mroeschke Jun 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/package-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11']
twoertwein marked this conversation as resolved.
Show resolved Hide resolved
fail-fast: false
name: Test Conda Forge Recipe - Python ${{ matrix.python-version }}
concurrency:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 90
strategy:
matrix:
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml]
# Prevent the include jobs from overriding other jobs
pattern: [""]
include:
Expand All @@ -35,7 +35,7 @@ jobs:
pattern: "not slow and not network and not single_cpu"
pytest_target: "pandas/tests/test_downstream.py"
- name: "Minimum Versions"
env_file: actions-39-minimum_versions.yaml
env_file: actions-310-minimum_versions.yaml
pattern: "not slow and not network and not single_cpu"
- name: "Locale: it_IT"
env_file: actions-311.yaml
Expand All @@ -58,7 +58,7 @@ jobs:
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "zh_CN"
- name: "Pypy"
env_file: actions-pypy-39.yaml
env_file: actions-pypy-310.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "--max-worker-restart 0"
- name: "Numpy Dev"
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
matrix:
# Note: Don't use macOS latest since macos 14 appears to be arm64 only
os: [macos-13, macos-14, windows-latest]
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml]
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- [macos-14, macosx_arm64]
- [windows-2022, win_amd64]
# TODO: support PyPy?
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
env:
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.10

# build dependencies
- versioneer[toml]
Expand Down
63 changes: 0 additions & 63 deletions ci/deps/actions-39.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
# TODO: Add the rest of the dependencies in here
# once the other plentiful failures/segfaults
# with base pandas has been dealt with
- python=3.9[build=*_pypy]
- python=3.10[build=*_pypy]

# build dependencies
- versioneer[toml]
Expand Down
2 changes: 1 addition & 1 deletion doc/source/development/contributing_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Consult the docs for setting up pyenv `here <https://github.com/pyenv/pyenv>`__.
pyenv virtualenv <version> <name-to-give-it>

# For instance:
pyenv virtualenv 3.9.10 pandas-dev
pyenv virtualenv 3.10 pandas-dev

# Activate the virtualenv
pyenv activate pandas-dev
Expand Down
4 changes: 2 additions & 2 deletions doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Instructions for installing :ref:`from source <install.source>`,
Python version support
----------------------

Officially Python 3.9, 3.10, 3.11 and 3.12.
Officially Python 3.10, 3.11 and 3.12.

Installing pandas
-----------------
Expand Down Expand Up @@ -161,7 +161,7 @@ Python terminal.

>>> import pandas as pd
>>> pd.test()
running: pytest -m "not slow and not network and not db" /home/user/anaconda3/lib/python3.9/site-packages/pandas
running: pytest -m "not slow and not network and not db" /home/user/anaconda3/lib/python3.10/site-packages/pandas

============================= test session starts ==============================
platform linux -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
Expand Down
5 changes: 5 additions & 0 deletions doc/source/whatsnew/v3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ Backwards incompatible API changes

.. _whatsnew_300.api_breaking.deps:

Increased minimum version for Python
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

pandas 3.0.0 supports Python 3.10 and higher.

Increased minimum versions for dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some minimum supported versions of dependencies were updated.
Expand Down
2 changes: 1 addition & 1 deletion pandas/compat/_optional.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if TYPE_CHECKING:
import types

# Update install.rst, actions-39-minimum_versions.yaml,
# Update install.rst, actions-310-minimum_versions.yaml,
# deps_minimum.toml & pyproject.toml when updating versions!

VERSIONS = {
Expand Down
11 changes: 1 addition & 10 deletions pandas/core/strings/object_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,16 +457,7 @@ def _str_rstrip(self, to_strip=None):
return self._str_map(lambda x: x.rstrip(to_strip))

def _str_removeprefix(self, prefix: str):
# outstanding question on whether to use native methods for users on Python 3.9+
# https://github.com/pandas-dev/pandas/pull/39226#issuecomment-836719770,
# in which case we could do return self._str_map(str.removeprefix)

def removeprefix(text: str) -> str:
if text.startswith(prefix):
return text[len(prefix) :]
return text

return self._str_map(removeprefix)
return self._str_map(lambda x: x.removeprefix(prefix))

def _str_removesuffix(self, suffix: str):
return self._str_map(lambda x: x.removesuffix(suffix))
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/groupby/test_numeric_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ def test_numeric_only(kernel, has_arg, numeric_only, keys):
[
"not allowed for this dtype",
"cannot be performed against 'object' dtypes",
# On PY39 message is "a number"; on PY310 and after is "a real number"
"must be a string or a.* number",
"must be a string or a real number",
"unsupported operand type",
"function is not implemented for this dtype",
re.escape(f"agg function failed [how->{kernel},dtype->object]"),
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = [
{ name = 'The Pandas Development Team', email='pandas-dev@python.org' },
]
license = {file = 'LICENSE'}
requires-python = '>=3.9'
requires-python = '>=3.10'
dependencies = [
"numpy>=1.23.5; python_version<'3.12'",
"numpy>=1.26.0; python_version>='3.12'",
Expand All @@ -43,7 +43,6 @@ classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
Expand Down
1 change: 0 additions & 1 deletion scripts/tests/data/deps_minimum.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ classifiers = [
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Python :: 3.8 be removed as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Yes definitely

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This is a testing file so not critical but still useful)

'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering'
Expand Down
Loading