Skip to content

Commit

Permalink
Add CI for Python 3.10
Browse files Browse the repository at this point in the history
This removes sphinxcontrib-bibtex as a dependency, which needs to be upgraded to
support Python 3.10 and was unused.

PiperOrigin-RevId: 503938136
  • Loading branch information
stompchicken authored and ChexDev committed Jan 31, 2023
1 parent 65ef2a3 commit 90cf67d
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sphinx:
fail_on_warning: false

python:
version: 3.7
version: 3.8
install:
- requirements: requirements/requirements-docs.txt
- requirements: requirements/requirements.txt
Expand Down
7 changes: 0 additions & 7 deletions chex/_src/dataclass_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Tests for `dataclass.py`."""
import copy
import dataclasses
import sys
from typing import Any, Mapping, TypeVar, Generic

from absl.testing import absltest
Expand Down Expand Up @@ -499,12 +498,6 @@ def _is_leaf(value) -> bool:
('not_mappable', False),
)
def test_generic_dataclass(self, mappable):
# Running under Python 3.6 results in error "TypeError: Cannot inherit from
# plain Generic", I'm speculating that this is a bug in cpython since
# subsequent versions work
if sys.version_info < (3, 7):
self.skipTest('Skip test on Python version < 3.7')

T = TypeVar('T')

@chex_dataclass(mappable_dataclass=mappable)
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def _recursive_add_annotations_import():
'sphinx.ext.intersphinx',
'sphinx.ext.linkcode',
'sphinx.ext.napoleon',
'sphinxcontrib.bibtex',
'sphinxcontrib.katex',
'sphinx_autodoc_typehints',
'sphinx_rtd_theme',
Expand Down
1 change: 0 additions & 1 deletion requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sphinx==4.5.0
sphinx_rtd_theme==1.0.0
sphinxcontrib-katex==0.8.6
sphinxcontrib-bibtex==1.0.0
sphinx-autodoc-typehints==1.11.1
IPython==7.16.3
ipykernel==5.3.4
Expand Down
1 change: 0 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
absl-py>=0.9.0
dataclasses>=0.7; python_version>="3.6" and python_version<"3.7"
typing_extensions>=4.2.0; python_version<"3.11"
dm-tree>=0.1.5
jax>=0.1.55
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _parse_requirements(path):
os.path.join(_CURRENT_DIR, 'requirements', 'requirements-test.txt')),
zip_safe=False, # Required for full installation.
include_package_data=True,
python_requires='>=3.7',
python_requires='>=3.8',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
Expand Down

0 comments on commit 90cf67d

Please sign in to comment.