public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/mypy/, dev-python/mypy/files/
Date: Tue,  9 Jul 2024 19:29:31 +0000 (UTC)	[thread overview]
Message-ID: <1720553359.3a323b02beb6cc986c4451b5c9fd2b0323b3ffc2.mgorny@gentoo> (raw)

commit:     3a323b02beb6cc986c4451b5c9fd2b0323b3ffc2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  9 18:13:42 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 19:29:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a323b02

dev-python/mypy: Enable py3.13

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/mypy/files/mypy-1.10.1-py313.patch | 25 +++++++++++++++++++++++++
 dev-python/mypy/mypy-1.10.1.ebuild            | 19 +++++++++++++++++--
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/dev-python/mypy/files/mypy-1.10.1-py313.patch b/dev-python/mypy/files/mypy-1.10.1-py313.patch
new file mode 100644
index 000000000000..d98bc079cb52
--- /dev/null
+++ b/dev-python/mypy/files/mypy-1.10.1-py313.patch
@@ -0,0 +1,25 @@
+From 29b4303e905f43556043efde95e19f32e04df9a5 Mon Sep 17 00:00:00 2001
+From: Jelle Zijlstra <jelle.zijlstra@gmail.com>
+Date: Fri, 24 May 2024 21:00:17 -0700
+Subject: [PATCH] Fix stubgen for Python 3.13
+
+__firstlineno__ and __static_attributes__ are new in 3.13.
+__annotate__ will be new in 3.14, so we might as well add it now.
+---
+ mypy/stubgenc.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/mypy/stubgenc.py b/mypy/stubgenc.py
+index 29b2636d39cc..7e3ef49c6e9a 100755
+--- a/mypy/stubgenc.py
++++ b/mypy/stubgenc.py
+@@ -466,6 +466,9 @@ def is_skipped_attribute(self, attr: str) -> bool:
+                 "__module__",
+                 "__weakref__",
+                 "__annotations__",
++                "__firstlineno__",
++                "__static_attributes__",
++                "__annotate__",
+             )
+             or attr in self.IGNORED_DUNDERS
+             or is_pybind_skipped_attribute(attr)  # For pickling

diff --git a/dev-python/mypy/mypy-1.10.1.ebuild b/dev-python/mypy/mypy-1.10.1.ebuild
index 2f0a69442d64..70f03443e40a 100644
--- a/dev-python/mypy/mypy-1.10.1.ebuild
+++ b/dev-python/mypy/mypy-1.10.1.ebuild
@@ -5,9 +5,9 @@ EAPI=8
 
 DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
 
-inherit distutils-r1 multiprocessing
+inherit distutils-r1
 
 DESCRIPTION="Optional static typing for Python"
 HOMEPAGE="
@@ -51,6 +51,11 @@ BDEPEND="
 EPYTEST_XDIST=1
 distutils_enable_tests pytest
 
+PATCHES=(
+	# https://github.com/python/mypy/pull/17290
+	"${FILESDIR}/${P}-py313.patch"
+)
+
 # frustratingly, mypyc produces non-deterministic output. If ccache is enabled it will be a waste of time,
 # but simultaneously it might trash your system and fill up the cache with a giant wave of non-reproducible
 # test files (https://github.com/mypyc/mypyc/issues/1014)
@@ -58,6 +63,11 @@ export CCACHE_DISABLE=1
 
 src_compile() {
 	local -x MYPY_USE_MYPYC=$(usex native-extensions 1 0)
+	case ${EPYTHON} in
+		python3.13)
+			# https://github.com/mypyc/mypyc/issues/1056
+			MYPY_USE_MYPYC=0
+	esac
 	distutils-r1_src_compile
 }
 
@@ -87,6 +97,11 @@ python_test() {
 				mypyc/test/test_run.py::TestRun::run-i64.test::testI64ErrorValuesAndUndefined
 			)
 			;;
+		python3.13)
+			EPYTEST_DESELECT+=(
+				# https://github.com/mypyc/mypyc/issues/1056
+				mypyc/test
+			)
 	esac
 
 	# Some mypy/test/testcmdline.py::PythonCmdlineSuite tests


             reply	other threads:[~2024-07-09 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 19:29 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-22  0:34 [gentoo-commits] repo/gentoo:master commit in: dev-python/mypy/, dev-python/mypy/files/ Sam James
2024-07-09 19:29 Michał Górny
2022-05-07  9:35 Michał Górny
2021-02-26 14:35 Michał Górny
2020-11-18 17:43 Louis Sautier
2020-10-07 16:31 Louis Sautier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1720553359.3a323b02beb6cc986c4451b5c9fd2b0323b3ffc2.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox