From 877e4f36e90f43b7f0bb63ea16077e3c80ca4f2e Mon Sep 17 00:00:00 2001 From: Stephen McDowell Date: Thu, 19 Oct 2023 01:30:22 -0400 Subject: [PATCH] Update exhale requirements (py3.8, breathe>=4.33.1) Exhale now requires: - Python 3.8+ - Sphinx>=4 - Breathe>=4.33.1 See #191 for more information. --- .github/workflows/test_extras.yaml | 4 +-- .github/workflows/test_python.yaml | 43 ++++++++++++------------------ docs/changelog.rst | 12 +++++++++ pyproject.toml | 4 --- setup.cfg | 14 +++++----- tox.ini | 7 ++--- 6 files changed, 40 insertions(+), 44 deletions(-) diff --git a/.github/workflows/test_extras.yaml b/.github/workflows/test_extras.yaml index e4a217e..51cfa33 100644 --- a/.github/workflows/test_extras.yaml +++ b/.github/workflows/test_extras.yaml @@ -62,10 +62,10 @@ jobs: steps: - uses: actions/checkout@v4 # Use minimum version of python needed for this project in setup.cfg. - - name: Use Python 3.7 + - name: Use Python 3.8 uses: actions/setup-python@v4 with: - python-version: '3.7' + python-version: '3.8' - name: Install Tools run: | pip install -U tox diff --git a/.github/workflows/test_python.yaml b/.github/workflows/test_python.yaml index 12432c8..3e73697 100644 --- a/.github/workflows/test_python.yaml +++ b/.github/workflows/test_python.yaml @@ -23,7 +23,7 @@ jobs: fail-fast: true matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 ################################################################################## @@ -63,33 +63,16 @@ jobs: - name: Install Python Tools run: | pip install -U pip tox codecov coverage - # Sphinx 3.0.0 ################################################################### - - name: Test Python ${{ matrix.python-version }} / sphinx==3.0.0 + # Sphinx 4.0.0 ################################################################### + - name: Test Python ${{ matrix.python-version }} / sphinx==4.0.0 env: # NOTE: this is the current minimum supported. - SPHINX_VERSION: '==3.0.0' + SPHINX_VERSION: '==4.0.0' run: | tox -e py -- --cov-report xml:coverage.xml --cov - - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx==3.0.0 + - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx==4.0.0 run: | - codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx3.0.0" - # Don't let code coverage utilities share anything, force clean it all. - - name: Cleanup Python ${{ matrix.python-version }} Testing / Coverage Artifacts - run: | - mv .gitignore nolongerignored - git clean -n - git clean -f - git reset --hard - # Sphinx 4.x ##################################################################### - - name: Test Python ${{ matrix.python-version }} / sphinx 4.x - env: - # Test sphinx 4.x. - SPHINX_VERSION: '>=4,<5' - run: | - tox -e py -- --cov-report xml:coverage.xml --cov - - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx 4.x - run: | - codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx4.x" + codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx4.0.0" # Don't let code coverage utilities share anything, force clean it all. - name: Cleanup Python ${{ matrix.python-version }} Testing / Coverage Artifacts run: | @@ -116,14 +99,22 @@ jobs: git reset --hard # Sphinx 6.x ##################################################################### - name: Test Python ${{ matrix.python-version }} / sphinx 6.x - # sphinx 6.x requires python 3.8+ - if: ${{ matrix.python-version != '3.7' }} env: # Test sphinx 6.x. SPHINX_VERSION: '>=6,<7' run: | tox -e py -- --cov-report xml:coverage.xml --cov - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx 6.x - if: ${{ matrix.python-version != '3.7' }} run: | codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx6.x" + # Sphinx 7.x ##################################################################### + - name: Test Python ${{ matrix.python-version }} / sphinx 6.x + env: + # Test sphinx 7.x. + SPHINX_VERSION: '>=7,<8' + run: | + tox -e py -- --cov-report xml:coverage.xml --cov + - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx 7.x + run: | + codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx7.x" + diff --git a/docs/changelog.rst b/docs/changelog.rst index 71719be..49b85b3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,18 @@ Changelog :local: :backlinks: none +v0.3.7 +---------------------------------------------------------------------------------------- + +- Update packaging requirements (:pr:`204`). Exhale will be less restrictive in its + dependency requirements: + - Python 3.8+ (3.7 is EOSL). + - Breathe 4.33.1. + - Sphinx>=4. + - See :issue:`191` for more information. +- Miscellaneous packaging and CI fixes courtesy of + `@Rotzbua `_ -- thanks for poking me on this project! + v0.3.6 ---------------------------------------------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 98799e1..8fe2d75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,10 +18,6 @@ filterwarnings = [ "default::PendingDeprecationWarning", # Bypass docutils warning: DeprecationWarning: 'U' mode is deprecated "ignore::DeprecationWarning:docutils.io", - # Bypass breathe bug: - # RemovedInSphinx30Warning: function based directive support is now deprecated. - # Use class based directive instead. - "ignore::PendingDeprecationWarning:sphinx.util.docutils", ] ######################################################################################## diff --git a/setup.cfg b/setup.cfg index 200fac9..b6a8c07 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,24 +23,24 @@ classifiers = Natural Language :: English Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Topic :: Documentation :: Sphinx Topic :: Software Development :: Documentation [options] -python_requires = >=3.7 +python_requires = >=3.8 zip_safe = False packages = find: # NOTE: making changes here? Please also update tox.ini [testenv{deps}]! install_requires = - # From breathe==4.32.0 - docutils>=0.12 - Sphinx>=3.0,<7 - # For exhale - breathe>=4.32.0 + breathe>=4.33.1 + # We're forcing a more modern sphinx to remove cruft from this repository, + # see the discussion: https://github.com/svenevs/exhale/issues/191 + Sphinx>=4.0 beautifulsoup4 lxml # TODO: remove this dependency diff --git a/tox.ini b/tox.ini index f12ae29..cbaf944 100644 --- a/tox.ini +++ b/tox.ini @@ -10,15 +10,12 @@ passenv = # usedevelop = true skip_install = true # NOTE: environment variables *MUST* include the `==`, e.g., -# SPHINX_VERSION="==3.0.0" tox -e py +# SPHINX_VERSION="==X.Y.Z" tox -e py # This way, if the variable is not set, it uses the latest version. deps = - # TODO: drop this when sphinx 3.x is dropped. - # https://github.com/sphinx-doc/sphinx/issues/10291 - Jinja2<3.1 # requirements for exhale sphinx{env:SPHINX_VERSION:} - breathe{env:BREATHE_VERSION:>=4.32.0} + breathe{env:BREATHE_VERSION:>=4.33.1} beautifulsoup4 # NOTE: for dev convenience, see https://github.com/svenevs/exhale/issues/131 lxml>=4.6.4