Skip to content

Commit

Permalink
[v1.1.0] Drop Python 3.7 and add support for Python 3.12 (#120)
Browse files Browse the repository at this point in the history
* docs: update python supported versions list

* docs: update changelog

* chore: bump up release to 1.0.6

* chore: CI only covers supported versions

* fix: deploying package uses py3.8 instead of py3.7

* fix: exclude 3.13

* fix: switch release from 1.0.6 to 1.1.0

* refactor: replace deprecated package `distutils`

`distutils` was deprecated and removed in Python 3.12 [1].

`distutils.dir_util.copy_tree` function can be replaced by the `shutil.copytree`
counterpart.

[1]: https://docs.python.org/3.10/whatsnew/3.10.html#distutils-deprecated

* docs: added deprecated distutils fix to changelog

---------

Co-authored-by: PauloASilva <pauloasilva@gmail.com>
  • Loading branch information
bih and PauloASilva committed Jan 4, 2024
1 parent d2891d8 commit b1965a2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
python-version: ["3", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@master
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: 3.7
python-version: 3.8
- name: Install Python dependencies
run: ./__tests__/setup-pip.sh
- name: Build Docs
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: 3.7
python-version: 3.8
- name: Build Python distribution
run: |
pip install wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: ["3", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@main
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ $ tree .

## Supported Versions

- Python 3 &mdash; 3.7, 3.8, 3.9, 3.10, 3.11
- Python 3.8, 3.9, 3.10, 3.11, 3.12
- [Mkdocs] 1.0.4 and above.

## Changelog
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.1.0

- Dropped official support for Python 3.7
- Added official support for Python 3.12
- Replaced deprecated package `distutils` [#118](https://github.com/backstage/mkdocs-monorepo-plugin/pull/118) courtesy of @PauloASilva and @piotr1212

## 1.0.4

- Resolve a bug that prevented this plugin from working with mkdocs >= v1.4.0
Expand Down
4 changes: 2 additions & 2 deletions mkdocs_monorepo_plugin/merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

from tempfile import TemporaryDirectory
from distutils.dir_util import copy_tree
from shutil import copytree

import logging
import os
Expand Down Expand Up @@ -59,7 +59,7 @@ def merge(self):
dest_dir = os.path.join(self.temp_docs_dir.name, *split_alias)

if os.path.exists(source_dir):
copy_tree(source_dir, dest_dir)
copytree(source_dir, dest_dir, dirs_exist_ok=True)
for file_abs_path in Path(source_dir).rglob('*.md'):
file_abs_path = str(file_abs_path) # python 3.5 compatibility
if os.path.isfile(file_abs_path):
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

setuptools.setup(
name='mkdocs-monorepo-plugin',
version='1.0.5',
version='1.1.0',
description='Plugin for adding monorepository support in Mkdocs.',
long_description="""
This introduces support for the !include syntax in mkdocs.yml, allowing you to import additional Mkdocs navigation.
It enables large or complex repositories to have their own sets of docs/ folders, whilst generating only a single Mkdocs site.
This is built and maintained by the engineering community at Spotify.
This is built and maintained by the Backstage open source team.
""", # noqa: E501
keywords='mkdocs monorepo',
url='https://github.com/backstage/mkdocs-monorepo-plugin',
Expand All @@ -26,11 +26,11 @@
'Intended Audience :: Information Technology',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'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.11',
'Programming Language :: Python :: 3.12'
],
packages=setuptools.find_packages(),
entry_points={
Expand Down

0 comments on commit b1965a2

Please sign in to comment.