From 426a4e433a6b6cc59190f87c16f8b6461b4e341d Mon Sep 17 00:00:00 2001 From: neatc0der <2805028+neatc0der@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:10:39 +0100 Subject: [PATCH 1/5] Replace use of findChild with find (#69) --- mkdocs_markmap/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs_markmap/plugin.py b/mkdocs_markmap/plugin.py index ccd6d95..9ba71d5 100644 --- a/mkdocs_markmap/plugin.py +++ b/mkdocs_markmap/plugin.py @@ -121,7 +121,7 @@ def on_page_content(self, html: str, page: Page, **kwargs) -> str: code: Tag if markmap.name == "pre": pre = markmap - code = markmap.findChild("code") + code = markmap.find("code") else: pre = markmap.parent code = markmap From 270945e1059d9a4b8bc86522c5e540bdc7614f0a Mon Sep 17 00:00:00 2001 From: neatc0der <2805028+neatc0der@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:11:11 +0100 Subject: [PATCH 2/5] Fix for PEP 625 (#70) --- .build/mkdocs_markmap_build/common.py | 6 +++--- mkdocs_markmap/__meta__.py | 3 +-- setup.py | 13 +++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.build/mkdocs_markmap_build/common.py b/.build/mkdocs_markmap_build/common.py index 85e94d1..1b83153 100644 --- a/.build/mkdocs_markmap_build/common.py +++ b/.build/mkdocs_markmap_build/common.py @@ -2,7 +2,7 @@ import os import sys from pathlib import Path -from typing import Dict, List +from typing import List from urllib3.poolmanager import PoolManager from urllib3.response import HTTPResponse @@ -10,7 +10,7 @@ from github.GitRelease import GitRelease from github.Repository import Repository -from mkdocs_markmap.__meta__ import PACKAGE_NAME, PROJECT_NAME, PROJECT_VERSION, REPOSITORY_NAME +from mkdocs_markmap.__meta__ import PROJECT_NAME, PROJECT_VERSION, REPOSITORY_NAME PROJECT_PATH: Path = Path(__file__).parent.parent.parent.absolute() @@ -18,7 +18,7 @@ CHANGELOG_PATH: Path = PROJECT_PATH / 'changelog' GZ_WILDCARD: str = f'{PROJECT_NAME}-{{version}}*.gz' -WHL_WILDCARD: str = f'{PACKAGE_NAME}-{{version}}*.whl' +WHL_WILDCARD: str = f'{PROJECT_NAME}-{{version}}*.whl' class GithubHandler(object): diff --git a/mkdocs_markmap/__meta__.py b/mkdocs_markmap/__meta__.py index 61c550f..7483716 100644 --- a/mkdocs_markmap/__meta__.py +++ b/mkdocs_markmap/__meta__.py @@ -1,5 +1,4 @@ -PACKAGE_NAME: str = "mkdocs_markmap" -PROJECT_NAME: str = PACKAGE_NAME.replace("_", "-") +PROJECT_NAME: str = "mkdocs_markmap" PROJECT_VERSION: str = "2.5.1" OWNER: str = "neatc0der" diff --git a/setup.py b/setup.py index f755a94..e529930 100755 --- a/setup.py +++ b/setup.py @@ -5,16 +5,10 @@ from mkdocs_markmap.__meta__ import OWNER, PROJECT_NAME, PROJECT_VERSION, REPOSITORY_URL -def readme() -> str: - """print long description""" - with open('README.md') as f: - return f.read() - - def get_requirements(filename: str, base_dir: str = 'requirements') -> List[str]: """Load list of dependencies.""" install_requires = [] - with open(Path(base_dir) / filename) as fp: + with (Path(base_dir) / filename).open() as fp: for line in fp: stripped_line = line.partition('#')[0].strip() if stripped_line: @@ -27,7 +21,7 @@ def get_requirements(filename: str, base_dir: str = 'requirements') -> List[str] name=PROJECT_NAME, version=PROJECT_VERSION, description='MkDocs plugin and extension to creates mindmaps from markdown using markmap', - long_description=readme(), + long_description=Path('README.md').read_text(), long_description_content_type='text/markdown', keywords='mkdocs python markdown markmap mindmap include', url=REPOSITORY_URL, @@ -46,6 +40,9 @@ def get_requirements(filename: str, base_dir: str = 'requirements') -> List[str] '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', + 'Programming Language :: Python :: 3.13', ], packages=find_packages(exclude=['*.tests']), package_dir={ From 4878c048b5a17776bc0d78f7ae49c9a5a2549c5c Mon Sep 17 00:00:00 2001 From: neatc0der <2805028+neatc0der@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:13:17 +0100 Subject: [PATCH 3/5] Add changelog for v2.5.2 --- changelog/v2.5.2.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/v2.5.2.md diff --git a/changelog/v2.5.2.md b/changelog/v2.5.2.md new file mode 100644 index 0000000..e609b41 --- /dev/null +++ b/changelog/v2.5.2.md @@ -0,0 +1,4 @@ +# v2.5.2 + +* Fix for DeprecationWarning due to use of `findChild` (#70) +* Fix for PEP 625 (#69) From 53275538339901ecb6ad76940f5b8c06d2312972 Mon Sep 17 00:00:00 2001 From: neatc0der <2805028+neatc0der@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:13:43 +0100 Subject: [PATCH 4/5] Bump version to 2.5.2 --- mkdocs_markmap/__meta__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs_markmap/__meta__.py b/mkdocs_markmap/__meta__.py index 7483716..6c5c0a1 100644 --- a/mkdocs_markmap/__meta__.py +++ b/mkdocs_markmap/__meta__.py @@ -1,5 +1,5 @@ PROJECT_NAME: str = "mkdocs_markmap" -PROJECT_VERSION: str = "2.5.1" +PROJECT_VERSION: str = "2.5.2" OWNER: str = "neatc0der" ORGANISATION: str = "markmap" From 22b696a8460d143d673966c50bde422b7cc7d4ae Mon Sep 17 00:00:00 2001 From: neatc0der <2805028+neatc0der@users.noreply.github.com> Date: Tue, 11 Feb 2025 21:25:06 +0100 Subject: [PATCH 5/5] Update verify.yml --- .github/workflows/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index f32d9cd..65bb45c 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -7,7 +7,7 @@ on: jobs: build: - name: Distribute + name: Ensure Integrity runs-on: ubuntu-latest steps: - name: Checkout code