From df2d182635392dbfaf2a6f5a30e5966ee010c749 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 7 May 2026 08:16:22 +0300 Subject: [PATCH] Update package version to 4.15.0 --- check-version.sh | 12 ++++++++++ pkg.info | 13 ++++++++-- source-files/fix-test-on-python-3.14.patch | 28 ++++++++++++++++++++++ source.sh | 20 +++++++++------- 4 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 check-version.sh create mode 100644 source-files/fix-test-on-python-3.14.patch diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..48c40eb --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Github repository +REPO="python/typing_extensions" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index afe0e56..e6dc64f 100644 --- a/pkg.info +++ b/pkg.info @@ -1,14 +1,23 @@ name: python-typing_extensions description: Backported and experimental type hints for Python -version: 4.4.0 +version: 4.15.0 revision: 1 license: Python-2.0.1 +maintainers: + - enumdev@enumerated.dev architecture: any output_architecture: any type: source depends: - - python3 + - python3=3.14.* make_depends: - python-build - python-flit-core - python-installer +check_depends: + - python3-tests +downloads: + - url: https://github.com/python/typing_extensions/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 40e4fd945fb070e470976538741ee85add33de5e8ab2f1583e9e264d8386916b diff --git a/source-files/fix-test-on-python-3.14.patch b/source-files/fix-test-on-python-3.14.patch new file mode 100644 index 0000000..4108118 --- /dev/null +++ b/source-files/fix-test-on-python-3.14.patch @@ -0,0 +1,28 @@ +From 16cc1566a6a4b8e729e8b91e1a4e6a31526823a0 Mon Sep 17 00:00:00 2001 +From: Jelle Zijlstra +Date: Fri, 19 Sep 2025 07:22:40 -0700 +Subject: [PATCH] fix test on 3.14 (#683) + +--- + src/test_typing_extensions.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py +index 27f4059c..f07e1eb0 100644 +--- a/src/test_typing_extensions.py ++++ b/src/test_typing_extensions.py +@@ -4508,8 +4508,12 @@ def _make_td(future, class_name, annos, base, extra_names=None): + child = _make_td( + child_future, "Child", {"child": "int"}, "Base", {"Base": base} + ) +- base_anno = typing.ForwardRef("int", module="builtins") if base_future else int +- child_anno = typing.ForwardRef("int", module="builtins") if child_future else int ++ if sys.version_info >= (3, 14): ++ base_anno = typing.ForwardRef("int", module="builtins", owner=base) if base_future else int ++ child_anno = typing.ForwardRef("int", module="builtins", owner=child) if child_future else int ++ else: ++ base_anno = typing.ForwardRef("int", module="builtins") if base_future else int ++ child_anno = typing.ForwardRef("int", module="builtins") if child_future else int + self.assertEqual(base.__annotations__, {'base': base_anno}) + self.assertEqual( + child.__annotations__, {'child': child_anno, 'base': base_anno} diff --git a/source.sh b/source.sh index 03c9fc8..a090e22 100644 --- a/source.sh +++ b/source.sh @@ -2,20 +2,23 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://files.pythonhosted.org/packages/source/t/typing_extensions/typing_extensions-${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - # The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location +# This function is used for putting downloaded files to the correct location or applying patches prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/fix-test-on-python-3.14.patch } # The build function is executed in the source directory # This function is used to compile the source code build() { - python3 -m build --wheel --no-isolation . + python3 -m build --wheel --skip-dependency-check --no-isolation . +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + PYTHONPATH="$PWD/src" python -m unittest discover src } # The package function is executed in the source directory @@ -23,5 +26,6 @@ build() { package() { python3 -m installer --destdir "$BPM_OUTPUT" dist/*.whl - install -Dm644 LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-typing_extensions/LICENSE + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-typing_extensions/LICENSE }