Skip to content

Commit

Permalink
bump minimum python version from 3.8 to 3.9 (#2586)
Browse files Browse the repository at this point in the history
* bump minimum python version from 3.8 to 3.9

* remove last gradle file

* update changelog

* update changelog
  • Loading branch information
dennisbader authored Nov 7, 2024
1 parent 395efc8 commit 36d041c
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Steps to reproduce the behavior, preferably code snippet.
A clear and concise description of what you expected to happen.

**System (please complete the following information):**
- Python version: [e.g. 3.8]
- darts version [e.g. 0.24.0]
- Python version: [e.g. 3.10]
- darts version [e.g. 0.31.0]

**Additional context**
Add any other context about the problem here.
14 changes: 7 additions & 7 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

- name: "Install Dev Dependencies"
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']
flavour: ['all']

steps:
Expand Down Expand Up @@ -87,10 +87,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
Expand Down Expand Up @@ -140,10 +140,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.10"
- name: "Set up Python 3.11"
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'

- name: "Install Dev Dependencies"
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.8', '3.10']
python-version: ['3.9', '3.11']
flavour: ['core', 'torch', 'all']

steps:
Expand Down Expand Up @@ -85,10 +85,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
Expand Down Expand Up @@ -132,10 +132,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
token: ${{ secrets.RELEASE_WORKFLOW_TOKEN_NEW_FINE_GRAINED }}
fetch-depth: '1'

- name: "2. Set up Python 3.9"
- name: "2. Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

- name: "Setup Pip"
run: |
Expand Down Expand Up @@ -108,10 +108,10 @@ jobs:
- name: "Clone repository"
uses: actions/checkout@v4

- name: "Set up Python 3.9"
- name: "Set up Python 3.10"
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']
flavour: ['all']

steps:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ but cannot always guarantee backwards compatibility. Changes that may **break co

**Dependencies**

- 🔴 Removed support for Python 3.8. The new minimum Python version is 3.9. [#2586](https://github.com/unit8co/darts/pull/2586) by [Dennis Bader](https://github.com/dennisbader).

### For developers of the library:

**Improved**
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
---
[![PyPI version](https://badge.fury.io/py/u8darts.svg)](https://badge.fury.io/py/darts)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/u8darts-all.svg)](https://anaconda.org/conda-forge/u8darts-all)
![Supported versions](https://img.shields.io/badge/python-3.8+-blue.svg)
![Supported versions](https://img.shields.io/badge/python-3.9+-blue.svg)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/unit8/darts?label=docker&sort=date)](https://hub.docker.com/r/unit8/darts)
![GitHub Release Date](https://img.shields.io/github/release-date/unit8co/darts)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/unit8co/darts/release.yml?branch=master)
Expand Down Expand Up @@ -50,7 +50,7 @@ fledged anomaly detection models.

## Quick Install

We recommend to first setup a clean Python environment for your project with Python 3.8+ using your favorite tool
We recommend to first setup a clean Python environment for your project with Python 3.9+ using your favorite tool
([conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html "conda-env"),
[venv](https://docs.python.org/3/library/venv.html), [virtualenv](https://virtualenv.pypa.io/en/latest/) with
or without [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/)).
Expand Down
2 changes: 1 addition & 1 deletion conda_recipe/environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# conda-specific dependencies for the dev environment
name: darts-dev
dependencies:
- python>=3.8
- python>=3.9
- conda-build
- conda-verify
10 changes: 1 addition & 9 deletions darts/tests/utils/tabularization/test_get_shared_times.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from math import gcd
from math import lcm

import pandas as pd
import pytest
Expand All @@ -7,14 +7,6 @@
from darts.utils.timeseries_generation import linear_timeseries


# math.lcm is not available in Python <= 3.8, so we define it here
def lcm(*integers):
a = integers[0]
for b in integers[1:]:
a = (a * b) // gcd(a, b)
return a


class TestGetSharedTimes:
"""
Tests `get_shared_times` function defined in `darts.utils.data.tabularization`.
Expand Down
2 changes: 1 addition & 1 deletion darts/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ModelMode(Enum):
NONE = None


# TODO: remove this once bumping min python version from 3.8 to 3.9 (pandas v2.2.0 not available for p38)
# TODO: remove this at some point when we set a lower cap on pandas v2.2.0
pd_above_v22 = pd.__version__ >= "2.2"
freqs = {
"YE": "YE" if pd_above_v22 else "A",
Expand Down
3 changes: 1 addition & 2 deletions requirements/core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ joblib>=0.16.0
matplotlib>=3.3.0
nfoursid>=1.0.0
numpy>=1.19.0,<2.0.0
pandas>=1.0.5,<2.0.0; python_version < "3.9"
pandas>=1.0.5; python_version >= "3.9"
pandas>=1.0.5
pmdarima>=1.8.0
pyod>=0.9.5
requests>=2.22.0
Expand Down
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def read_requirements(path):
"darts": ["py.typed"],
},
zip_safe=False,
python_requires=">=3.8",
python_requires=">=3.9",
classifiers=[
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
Expand All @@ -57,9 +57,9 @@ def read_requirements(path):
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: PyPy",
],
keywords="time series forecasting",
Expand Down
4 changes: 2 additions & 2 deletions setup_u8darts.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def read_requirements(path):
"darts": ["py.typed"],
},
zip_safe=False,
python_requires=">=3.8",
python_requires=">=3.9",
classifiers=[
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
Expand All @@ -57,9 +57,9 @@ def read_requirements(path):
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: PyPy",
],
keywords="time series forecasting",
Expand Down

0 comments on commit 36d041c

Please sign in to comment.