Skip to content

Commit

Permalink
Require Python 3.9+, test for 3.9 and 3.11 (#1924)
Browse files Browse the repository at this point in the history
Summary:
## Motivation

Python 3.11 was released over 8 months ago, so we should be testing for it. We can also drop support for Python 3.8, which was supplanted by 3.9 nearly 3 years ago.

### Have you read the [Contributing Guidelines on pull requests](https://github.com/pytorch/botorch/blob/main/CONTRIBUTING.md#pull-requests)?

Yes

Pull Request resolved: #1924

Test Plan: Manually running nightly cron: https://github.com/pytorch/botorch/actions/runs/5508340274

Reviewed By: saitcakmak

Differential Revision: D47771324

Pulled By: esantorella

fbshipit-source-id: 36cd2d093d69100840bc929a926075dd79f06019
  • Loading branch information
esantorella authored and facebook-github-bot committed Jul 25, 2023
1 parent 2e62b95 commit 8c763b3
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:

requirements:
host:
- python>=3.8
- python>=3.9
- setuptools
- setuptools_scm
run:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -29,7 +29,7 @@ jobs:
run: |
pytest -ra --cov=. --cov-report term-missing
- name: Upload coverage
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.9 }}
run: |
bash <(curl -s https://codecov.io/bash)
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
with:
miniconda-version: "latest"
activate-environment: test
python-version: "3.8"
python-version: "3.9"
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install dependencies
env:
ALLOW_LATEST_GPYTORCH_LINOP: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install dependencies
run: |
# pin dependencies to match Meta-internal versions
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Install dependencies
run: |
pip install flake8 flake8-docstrings
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -34,7 +34,7 @@ jobs:
run: |
pytest -ra --cov=. --cov-report term-missing
- name: Upload coverage
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.9 }}
run: |
bash <(curl -s https://codecov.io/bash)
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
env:
ALLOW_LATEST_GPYTORCH_LINOP: true
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
with:
miniconda-version: "latest"
activate-environment: test
python-version: "3.8"
python-version: "3.9"
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"
- name: Fetch all history for all tags and branches
# We need to do this so setuptools_scm knows how to set the BoTorch version.
run: git fetch --prune --unshallow
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- if: ${{ !inputs.publish_versioned_website }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -37,7 +37,7 @@ jobs:
run: |
pytest -ra --cov=. --cov-report term-missing
- name: Upload coverage
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
if: ${{ runner.os == 'Linux' && matrix.python-version == 3.9 }}
run: |
bash <(curl -s https://codecov.io/bash)
Expand All @@ -48,7 +48,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ run `flake8` as above to check.

#### Type Hints

BoTorch is fully typed using python 3.8+
BoTorch is fully typed using python 3.9+
[type hints](https://www.python.org/dev/peps/pep-0484/).
We expect any contributions to also use proper type annotations. While we
currently do not enforce full consistency of these in our continuous integration
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Optimization simply use Ax.
## Installation

**Installation Requirements**
- Python >= 3.8
- Python >= 3.9
- PyTorch >= 1.12
- gpytorch == 1.10
- linear_operator == 0.4.0
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Minimum required python version
REQUIRED_MAJOR = 3
REQUIRED_MINOR = 8
REQUIRED_MINOR = 9

# Requirements for testing, formatting, and tutorials
TEST_REQUIRES = ["pytest", "pytest-cov"]
Expand Down Expand Up @@ -96,7 +96,7 @@ def read_deps_from_file(filname):
],
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.8",
python_requires=">=3.9",
packages=find_packages(exclude=["test", "test.*"]),
install_requires=install_requires,
extras_require={
Expand Down

0 comments on commit 8c763b3

Please sign in to comment.