dev-python/*: change SRC_URI
Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
DIST pure-pcapy3-1.0.1.tar.gz 5911 BLAKE2B e132ce6336c1f91a4963522fe2a5fa4072ece5e1beff65f86b9fad410e7b5540575f2bac88169fac92bec435b066048a2f22b3a4134d50a910548b4636bce803 SHA512 8c7ca20b1bbb40195a884798c28bd9187d8f209190778daf424e6a2d03a6ca5284c664e8fef54d29d91834c49cda116680f6b3af448751bb694d93ab18fc7cad
|
||||
EBUILD pure-pcapy3-1.0.1-r1.ebuild 700 BLAKE2B 21ecea9f0092d69093fbbfe438035239192b64bed3d49ac193ce83d58bceea93df65e36ee05a3db453b61bf41427ebfbb7ddcec73ea3b4e732a0539b02b5e737 SHA512 3915f58c6f73f6ef48508a571589a6172031d3c54cc84dc9b38445a115ac719f43bdae098e92e50f58875329ed35d868697556bd7d1c538eb06f7bb7456f9aa2
|
||||
EBUILD pure-pcapy3-1.0.1-r1.ebuild 706 BLAKE2B 24c7e023edee69f68490aac5eaf878b1d3672b767bdfbf436757f55a030e799a32f4e339f63e4f4d212d6726397a47d19866877732a7a7c57d0eb3fc172cbf5b SHA512 6db85f15981c5a4e0a98b9b545bd54996b7c6984d9014fa9e4f8c3becf6ed2705284b12ffe1aba30c05daaabe01a3485ae8d52167dd86e9381fb8aeef9045a86
|
||||
MISC metadata.xml 459 BLAKE2B ee4b508a08234e27adf673e1efae1b27a64a78109b99114516a430c6f3203c8c30d465d854444dc35ba34a49939c8a83e66d67ac8ebfe862884fa201734b7332 SHA512 1e6f06d62e8bd8a4b472de9f7d5c961cfeac1050fa89930289b92b028996e9bb4bba8dac46ff71cccc7a2f60e93185754ee9d0dd78f14f930d823318dc5f9748
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
|
||||
inherit distutils-r1
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Pure Python reimplementation of pcapy. This package is API compatible and a drop-in replacement."
|
||||
HOMEPAGE="http://bitbucket.org/viraptor/pure-pcapy/overview https://pypi.org/project/pure-pcapy3/"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
DIST pytest-timeout-2.0.1.tar.gz 16328 BLAKE2B 138fecc8927a350a4f333af848d28c892ac6808e7f7b37a31db1603a96fd9da07f2030e680cc9f3fea035682e89b29d3a6f5889a0f79799392bc33f1a5b8b54c SHA512 4f94e1a1365dec1615d11da9e86d0166f1316be0ec338a8dd55176364355164cb0470b1130a01ea4e5b93be5ce3773d6faee0fcde6a21dd6fe9e56855e6c6499
|
||||
EBUILD pytest-timeout-2.0.1.ebuild 733 BLAKE2B d2166cca30ca78378c59d4d97eae751a07c02744d9af462ae3d0bf68186d8524aa628bedeb8b4cd6dec5d9ddf42beb37ccd11ab40ad6e3b322ace82b07dae34a SHA512 d1b0736069581e1f9c09467ee44b2f322f17153112de59ec84801428cf5ffb2d686f4dc21f963590521e790788531ad868b39504c39d8e524f844c4633733312
|
||||
EBUILD pytest-timeout-2.0.1.ebuild 647 BLAKE2B 6f84fa91404eba056028c58bc41c4eae906038f21fb625921bba01833cd8a11d9bc50b75faf70016a6517ba41ee18bac1e515173ceffdaf22a5de50d6b7180cd SHA512 87d7364fde1578375b30ef2d1bbba7493b566c61fb779052701a4ab1c73c35f792d32b53db89001b03e299b96ac9457f8eb1cfc9163747969c98010fc9c43dc5
|
||||
MISC metadata.xml 458 BLAKE2B 26c33def9c4938e32eb3704d141605a94e997206154cfc3ab2a6bbbfa9955d672a0a071da6c9ee993bdf7fad891bd1074d35b06babc989fdac0cd084391f74f4 SHA512 3eaf00fa7c31a053fd5ea02d440318f13b9688ed0e9541fbedb6a367bc7a0d8542c4065c61444bf967bc7a74b0ff800f6f2e737c3731d635d37b1f887605a38d
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} pypy3 )
|
||||
inherit distutils-r1
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="pytest plugin to abort hanging tests"
|
||||
HOMEPAGE="https://pypi.org/project/pytest-timeout/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="MIT"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
KEYWORDS="amd64 arm arm64 x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# do not rdepend on pytest, it won't be used without it anyway
|
||||
# pytest-cov used to test compatibility
|
||||
@@ -23,5 +25,3 @@ BDEPEND="
|
||||
dev-python/pytest-cov[${PYTHON_USEDEP}]
|
||||
)
|
||||
)"
|
||||
|
||||
distutils_enable_tests --install pytest
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
DIST pytest-unordered-0.5.2.tar.gz 5622 BLAKE2B 93efa2d2fd2fdb9ad9022db49a9a4488dfeeb5e08cc3ee1f2e703eb1fba18dc2288b3462d9b0825feba0a53c6fa6c67bf584824f850e48c53e3cd1afdff1d01c SHA512 21b77cd1f02ce6d0bf48a8fba2b79bac5c21d06fafaaeca72f050af969fc0c94d3b91c28c125c4ac1259c834155799575ccfac1a5b8f52b1ea887c177d7fdf99
|
||||
EBUILD pytest-unordered-0.5.2.ebuild 688 BLAKE2B d019db9016951f44f53f3ade509fda4099c34537e14231301831c4f91bf4a1f9c58a778d1ed77b03931b832a254bf4599f711cf61acdd7d739f25a75783875de SHA512 fed63f6c229c6b97a1c96c1d95be9debf4631a64e6803482c8e2ab3d10331b853687189db2360317c08dfe1adea5bd17a09a01ee691ad595aaa52a374159e062
|
||||
EBUILD pytest-unordered-0.5.2.ebuild 663 BLAKE2B 89b3fdefc56343a30563274aecb7f388a1102d67dfa2d66583029f79c8d919fc4db406137d5061cfb41d713d3daf1f4ef12423bc01f5402c7e12ec875de99059 SHA512 a5a60948e0ef947402bc402bcdae9f8dc43956ebf628c735dbaa8e61b9b384697e5580ac43e50db2b250aec4710655e039a59d00f906e78479ddd80c0cd4f3c7
|
||||
MISC metadata.xml 522 BLAKE2B 6ba65a545760d17086647f9cd2498520dea719cec46c3aafb68bfeb179497c7cb1f00565cec0b8093d2fb91575c68311425805548fcb1b9e438911d4b3b9f392 SHA512 34c06793c51e0bdc5c3f55ee1db3f55b8d58509d72d9837ec609a50fca3fdd35a7a8408dd0728996209974a0f6c9357db52849340116b524810250a7c28d48c3
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit distutils-r1
|
||||
PYPI_NO_NORMALIZE=1
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="Test equality of unordered collections in pytest"
|
||||
HOMEPAGE="https://github.com/utapyngo/pytest-unordered https://pypi.org/project/pytest-unordered/"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
AUX pytest-3.4.2-pypy-syntaxerror-offset.patch 996 BLAKE2B ff6d362d20f6432f73956e1aee4c2bc596e3d8e3347da3624dfd3cbfdd1eabd8872058737e8f9b558f3570878756c7b87a65514956b1e81235c2727e8ff2fc63 SHA512 4a28ddc07389aac79e46528e85229aba126a89c27b7bec73b406766be49f5c8be9bdc2cb3158bfb475b4d6371e2f33960e1ed154e3b9eda15aeb8b151f3d2148
|
||||
AUX pytest-4.5.0-strip-setuptools_scm.patch 674 BLAKE2B 4eab3e26423d81614223a88a0124dc4f35892b18ecbcce34280a00774012822fced0045ac7113a50f8f88d042b88e404dbf4d8d3760140c66a48daa3da2a44c6 SHA512 d34d7c1db57804f0d1ff71f3f51c9a736592945fdf564f54c0c20c398c86f08616eb21f75d77457a71738df4d254ec3d69e46aa3378dea6f7913933bcdf45c08
|
||||
AUX pytest-7.3.1-py312.patch 11621 BLAKE2B 20e7132c8bbd16a8b01af8bf80254148434f7846463dffc4d46b731334d5b7959de9c3c3280d06a340c55bea608a3c516a31969ea0db7ce806581022537377b0 SHA512 17c0e3e2e119b9ce895d97fef9e1729c5f1577b2d5a3f6a650b7e94fccf8783a4686e4ddc7fa80209661dc4397f3c862dc809c531c136cafce477682b37223b6
|
||||
DIST pytest-7.2.2.tar.gz 1320028 BLAKE2B 51742872c03ccba3b305fdb3015a1c2a8f7dbf2988f267ea13e2add438ae52e2d5a6cace483525cf37f7ea72454bb346b81196c6e043dbbc3e5c0c8a1a365ed7 SHA512 100e06a9eeb9f3f5fc4f61ab10cd83a80280dc411fddde9361f101b77e69f8600d2f4846f8611a47f441724cf8ffe6bc2cae4b75703f9b48cacf0eee83eaf3b3
|
||||
DIST pytest-7.3.1.tar.gz 1336938 BLAKE2B 8cabc475056000e393538c6c52e2ee5a9af6c57831c6aba82e3107ae44f88b63a68b37339842eebfa318bd27d4bf5e34959b72052d4646cc8682c84f131f98e7 SHA512 e6c8fcf1449f5e09e33c01ec2ade8812ceb13440324179288b8ca0eeaaffed1e581a65c8acf4c28efe61c19a067e7ceddccc45d8a1582c89259d53fee25ab253
|
||||
EBUILD pytest-7.2.2.ebuild 3359 BLAKE2B 5753c83f753e04c3a034ef747fc3ca12ddbd6d3962e1ee646108525116c32758e50351e0669db06bf7b9b1d0cfb96aea854e89fbc94d3cf2158ba0a93a2141df SHA512 adacf313e63f2f70c5b893d83b2582fad03ac5e492c751fb1653ac8a8e8ceb9d170d322a92ed1e2dad74e4b4ddb7430af7b30bfcf0c03248fd6600ee00fa367a
|
||||
EBUILD pytest-7.3.1-r2.ebuild 3600 BLAKE2B 5cc5616da8688bdcf59f360c94a268003ba762bd0e3bac9acbbb09ef28e581b6c480defac5e07773827b35caa90e803fb201944471f506801e5a295148feff8d SHA512 ef756650088a3d2c1149aa43291772a2f4b8a0b0ac916fe5467fbc9bea4cf24d7887f34ded7ce4f8b6f83beaa38e0efc0142002ee2d1766cee1c14f7620eb4dd
|
||||
MISC metadata.xml 391 BLAKE2B 48d31ecb4c8b171ee4e84a58399211368ddc00dfb5dbe0999f96e03d744294cd4fd5263e90600c93d1f13c7da21052faef84b6d0d56709f3559e37b3392ca31d SHA512 6e9caa57eda23995d21df6f52c52d5868e1ff56abb6c1351ffc0fe14b771639473481a2630e659caaff83f0255379aa2d012175af52a0de41221b27d3ab2f425
|
||||
|
||||
258
dev-python/pytest/files/pytest-7.3.1-py312.patch
Normal file
258
dev-python/pytest/files/pytest-7.3.1-py312.patch
Normal file
@@ -0,0 +1,258 @@
|
||||
From 653606791456f7e6412712bc26428b90092336b5 Mon Sep 17 00:00:00 2001
|
||||
From: Ran Benita <ran@unusedvar.com>
|
||||
Date: Wed, 10 May 2023 10:36:09 +0300
|
||||
Subject: [PATCH] Avoid ast deprecation warnings on Python 3.12
|
||||
|
||||
Fix #10977.
|
||||
---
|
||||
src/_pytest/assertion/rewrite.py | 49 +++++++++++++++++++-------------
|
||||
src/_pytest/mark/expression.py | 8 +++++-
|
||||
2 files changed, 36 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py
|
||||
index 8b182347052..00bb4feb94a 100644
|
||||
--- a/src/_pytest/assertion/rewrite.py
|
||||
+++ b/src/_pytest/assertion/rewrite.py
|
||||
@@ -46,8 +46,14 @@
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
namedExpr = ast.NamedExpr
|
||||
+ astNameConstant = ast.Constant
|
||||
+ astStr = ast.Constant
|
||||
+ astNum = ast.Constant
|
||||
else:
|
||||
namedExpr = ast.Expr
|
||||
+ astNameConstant = ast.NameConstant
|
||||
+ astStr = ast.Str
|
||||
+ astNum = ast.Num
|
||||
|
||||
|
||||
assertstate_key = StashKey["AssertionState"]()
|
||||
@@ -680,9 +686,12 @@ def run(self, mod: ast.Module) -> None:
|
||||
if (
|
||||
expect_docstring
|
||||
and isinstance(item, ast.Expr)
|
||||
- and isinstance(item.value, ast.Str)
|
||||
+ and isinstance(item.value, astStr)
|
||||
):
|
||||
- doc = item.value.s
|
||||
+ if sys.version_info >= (3, 8):
|
||||
+ doc = item.value.value
|
||||
+ else:
|
||||
+ doc = item.value.s
|
||||
if self.is_rewrite_disabled(doc):
|
||||
return
|
||||
expect_docstring = False
|
||||
@@ -814,7 +823,7 @@ def pop_format_context(self, expl_expr: ast.expr) -> ast.Name:
|
||||
current = self.stack.pop()
|
||||
if self.stack:
|
||||
self.explanation_specifiers = self.stack[-1]
|
||||
- keys = [ast.Str(key) for key in current.keys()]
|
||||
+ keys = [astStr(key) for key in current.keys()]
|
||||
format_dict = ast.Dict(keys, list(current.values()))
|
||||
form = ast.BinOp(expl_expr, ast.Mod(), format_dict)
|
||||
name = "@py_format" + str(next(self.variable_counter))
|
||||
@@ -868,16 +877,16 @@ def visit_Assert(self, assert_: ast.Assert) -> List[ast.stmt]:
|
||||
negation = ast.UnaryOp(ast.Not(), top_condition)
|
||||
|
||||
if self.enable_assertion_pass_hook: # Experimental pytest_assertion_pass hook
|
||||
- msg = self.pop_format_context(ast.Str(explanation))
|
||||
+ msg = self.pop_format_context(astStr(explanation))
|
||||
|
||||
# Failed
|
||||
if assert_.msg:
|
||||
assertmsg = self.helper("_format_assertmsg", assert_.msg)
|
||||
gluestr = "\n>assert "
|
||||
else:
|
||||
- assertmsg = ast.Str("")
|
||||
+ assertmsg = astStr("")
|
||||
gluestr = "assert "
|
||||
- err_explanation = ast.BinOp(ast.Str(gluestr), ast.Add(), msg)
|
||||
+ err_explanation = ast.BinOp(astStr(gluestr), ast.Add(), msg)
|
||||
err_msg = ast.BinOp(assertmsg, ast.Add(), err_explanation)
|
||||
err_name = ast.Name("AssertionError", ast.Load())
|
||||
fmt = self.helper("_format_explanation", err_msg)
|
||||
@@ -893,8 +902,8 @@ def visit_Assert(self, assert_: ast.Assert) -> List[ast.stmt]:
|
||||
hook_call_pass = ast.Expr(
|
||||
self.helper(
|
||||
"_call_assertion_pass",
|
||||
- ast.Num(assert_.lineno),
|
||||
- ast.Str(orig),
|
||||
+ astNum(assert_.lineno),
|
||||
+ astStr(orig),
|
||||
fmt_pass,
|
||||
)
|
||||
)
|
||||
@@ -913,7 +922,7 @@ def visit_Assert(self, assert_: ast.Assert) -> List[ast.stmt]:
|
||||
variables = [
|
||||
ast.Name(name, ast.Store()) for name in self.format_variables
|
||||
]
|
||||
- clear_format = ast.Assign(variables, ast.NameConstant(None))
|
||||
+ clear_format = ast.Assign(variables, astNameConstant(None))
|
||||
self.statements.append(clear_format)
|
||||
|
||||
else: # Original assertion rewriting
|
||||
@@ -924,9 +933,9 @@ def visit_Assert(self, assert_: ast.Assert) -> List[ast.stmt]:
|
||||
assertmsg = self.helper("_format_assertmsg", assert_.msg)
|
||||
explanation = "\n>assert " + explanation
|
||||
else:
|
||||
- assertmsg = ast.Str("")
|
||||
+ assertmsg = astStr("")
|
||||
explanation = "assert " + explanation
|
||||
- template = ast.BinOp(assertmsg, ast.Add(), ast.Str(explanation))
|
||||
+ template = ast.BinOp(assertmsg, ast.Add(), astStr(explanation))
|
||||
msg = self.pop_format_context(template)
|
||||
fmt = self.helper("_format_explanation", msg)
|
||||
err_name = ast.Name("AssertionError", ast.Load())
|
||||
@@ -938,7 +947,7 @@ def visit_Assert(self, assert_: ast.Assert) -> List[ast.stmt]:
|
||||
# Clear temporary variables by setting them to None.
|
||||
if self.variables:
|
||||
variables = [ast.Name(name, ast.Store()) for name in self.variables]
|
||||
- clear = ast.Assign(variables, ast.NameConstant(None))
|
||||
+ clear = ast.Assign(variables, astNameConstant(None))
|
||||
self.statements.append(clear)
|
||||
# Fix locations (line numbers/column offsets).
|
||||
for stmt in self.statements:
|
||||
@@ -952,20 +961,20 @@ def visit_NamedExpr(self, name: namedExpr) -> Tuple[namedExpr, str]:
|
||||
# thinks it's acceptable.
|
||||
locs = ast.Call(self.builtin("locals"), [], [])
|
||||
target_id = name.target.id # type: ignore[attr-defined]
|
||||
- inlocs = ast.Compare(ast.Str(target_id), [ast.In()], [locs])
|
||||
+ inlocs = ast.Compare(astStr(target_id), [ast.In()], [locs])
|
||||
dorepr = self.helper("_should_repr_global_name", name)
|
||||
test = ast.BoolOp(ast.Or(), [inlocs, dorepr])
|
||||
- expr = ast.IfExp(test, self.display(name), ast.Str(target_id))
|
||||
+ expr = ast.IfExp(test, self.display(name), astStr(target_id))
|
||||
return name, self.explanation_param(expr)
|
||||
|
||||
def visit_Name(self, name: ast.Name) -> Tuple[ast.Name, str]:
|
||||
# Display the repr of the name if it's a local variable or
|
||||
# _should_repr_global_name() thinks it's acceptable.
|
||||
locs = ast.Call(self.builtin("locals"), [], [])
|
||||
- inlocs = ast.Compare(ast.Str(name.id), [ast.In()], [locs])
|
||||
+ inlocs = ast.Compare(astStr(name.id), [ast.In()], [locs])
|
||||
dorepr = self.helper("_should_repr_global_name", name)
|
||||
test = ast.BoolOp(ast.Or(), [inlocs, dorepr])
|
||||
- expr = ast.IfExp(test, self.display(name), ast.Str(name.id))
|
||||
+ expr = ast.IfExp(test, self.display(name), astStr(name.id))
|
||||
return name, self.explanation_param(expr)
|
||||
|
||||
def visit_BoolOp(self, boolop: ast.BoolOp) -> Tuple[ast.Name, str]:
|
||||
@@ -1001,7 +1010,7 @@ def visit_BoolOp(self, boolop: ast.BoolOp) -> Tuple[ast.Name, str]:
|
||||
self.push_format_context()
|
||||
res, expl = self.visit(v)
|
||||
body.append(ast.Assign([ast.Name(res_var, ast.Store())], res))
|
||||
- expl_format = self.pop_format_context(ast.Str(expl))
|
||||
+ expl_format = self.pop_format_context(astStr(expl))
|
||||
call = ast.Call(app, [expl_format], [])
|
||||
self.expl_stmts.append(ast.Expr(call))
|
||||
if i < levels:
|
||||
@@ -1013,7 +1022,7 @@ def visit_BoolOp(self, boolop: ast.BoolOp) -> Tuple[ast.Name, str]:
|
||||
self.statements = body = inner
|
||||
self.statements = save
|
||||
self.expl_stmts = fail_save
|
||||
- expl_template = self.helper("_format_boolop", expl_list, ast.Num(is_or))
|
||||
+ expl_template = self.helper("_format_boolop", expl_list, astNum(is_or))
|
||||
expl = self.pop_format_context(expl_template)
|
||||
return ast.Name(res_var, ast.Load()), self.explanation_param(expl)
|
||||
|
||||
@@ -1099,9 +1108,9 @@ def visit_Compare(self, comp: ast.Compare) -> Tuple[ast.expr, str]:
|
||||
next_expl = f"({next_expl})"
|
||||
results.append(next_res)
|
||||
sym = BINOP_MAP[op.__class__]
|
||||
- syms.append(ast.Str(sym))
|
||||
+ syms.append(astStr(sym))
|
||||
expl = f"{left_expl} {sym} {next_expl}"
|
||||
- expls.append(ast.Str(expl))
|
||||
+ expls.append(astStr(expl))
|
||||
res_expr = ast.Compare(left_res, [op], [next_res])
|
||||
self.statements.append(ast.Assign([store_names[i]], res_expr))
|
||||
left_res, left_expl = next_res, next_expl
|
||||
diff --git a/src/_pytest/mark/expression.py b/src/_pytest/mark/expression.py
|
||||
index f82a81d44c5..9287bcee50c 100644
|
||||
--- a/src/_pytest/mark/expression.py
|
||||
+++ b/src/_pytest/mark/expression.py
|
||||
@@ -18,6 +18,7 @@
|
||||
import dataclasses
|
||||
import enum
|
||||
import re
|
||||
+import sys
|
||||
import types
|
||||
from typing import Callable
|
||||
from typing import Iterator
|
||||
@@ -26,6 +27,11 @@
|
||||
from typing import Optional
|
||||
from typing import Sequence
|
||||
|
||||
+if sys.version_info >= (3, 8):
|
||||
+ astNameConstant = ast.Constant
|
||||
+else:
|
||||
+ astNameConstant = ast.NameConstant
|
||||
+
|
||||
|
||||
__all__ = [
|
||||
"Expression",
|
||||
@@ -132,7 +138,7 @@ def reject(self, expected: Sequence[TokenType]) -> NoReturn:
|
||||
|
||||
def expression(s: Scanner) -> ast.Expression:
|
||||
if s.accept(TokenType.EOF):
|
||||
- ret: ast.expr = ast.NameConstant(False)
|
||||
+ ret: ast.expr = astNameConstant(False)
|
||||
else:
|
||||
ret = expr(s)
|
||||
s.accept(TokenType.EOF, reject=True)
|
||||
From c945dba571025623a3ace7311d682e3e9448a161 Mon Sep 17 00:00:00 2001
|
||||
From: Ran Benita <ran@unusedvar.com>
|
||||
Date: Fri, 26 May 2023 20:28:21 +0300
|
||||
Subject: [PATCH] testing/python/collect: replace use of deprecated/removed
|
||||
`imp` module
|
||||
|
||||
---
|
||||
testing/python/collect.py | 26 +++++++++++++++-----------
|
||||
1 file changed, 15 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/testing/python/collect.py b/testing/python/collect.py
|
||||
index ac3edd395ab..52b34800965 100644
|
||||
--- a/testing/python/collect.py
|
||||
+++ b/testing/python/collect.py
|
||||
@@ -897,25 +897,29 @@ def pytest_pycollect_makeitem(collector, name, obj):
|
||||
def test_issue2369_collect_module_fileext(self, pytester: Pytester) -> None:
|
||||
"""Ensure we can collect files with weird file extensions as Python
|
||||
modules (#2369)"""
|
||||
- # We'll implement a little finder and loader to import files containing
|
||||
+ # Implement a little meta path finder to import files containing
|
||||
# Python source code whose file extension is ".narf".
|
||||
pytester.makeconftest(
|
||||
"""
|
||||
- import sys, os, imp
|
||||
+ import sys
|
||||
+ import os.path
|
||||
+ from importlib.util import spec_from_loader
|
||||
+ from importlib.machinery import SourceFileLoader
|
||||
from _pytest.python import Module
|
||||
|
||||
- class Loader(object):
|
||||
- def load_module(self, name):
|
||||
- return imp.load_source(name, name + ".narf")
|
||||
- class Finder(object):
|
||||
- def find_module(self, name, path=None):
|
||||
- if os.path.exists(name + ".narf"):
|
||||
- return Loader()
|
||||
- sys.meta_path.append(Finder())
|
||||
+ class MetaPathFinder:
|
||||
+ def find_spec(self, fullname, path, target=None):
|
||||
+ if os.path.exists(fullname + ".narf"):
|
||||
+ return spec_from_loader(
|
||||
+ fullname,
|
||||
+ SourceFileLoader(fullname, fullname + ".narf"),
|
||||
+ )
|
||||
+ sys.meta_path.append(MetaPathFinder())
|
||||
|
||||
def pytest_collect_file(file_path, parent):
|
||||
if file_path.suffix == ".narf":
|
||||
- return Module.from_parent(path=file_path, parent=parent)"""
|
||||
+ return Module.from_parent(path=file_path, parent=parent)
|
||||
+ """
|
||||
)
|
||||
pytester.makefile(
|
||||
".narf",
|
||||
113
dev-python/pytest/pytest-7.3.1-r2.ebuild
Normal file
113
dev-python/pytest/pytest-7.3.1-r2.ebuild
Normal file
@@ -0,0 +1,113 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_TESTED=( python3_{10..12} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 multiprocessing pypi
|
||||
|
||||
DESCRIPTION="Simple powerful testing with Python"
|
||||
HOMEPAGE="
|
||||
https://pytest.org/
|
||||
https://github.com/pytest-dev/pytest/
|
||||
https://pypi.org/project/pytest/
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/iniconfig[${PYTHON_USEDEP}]
|
||||
>=dev-python/more-itertools-4.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/packaging[${PYTHON_USEDEP}]
|
||||
>=dev-python/pluggy-0.12[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
>=dev-python/exceptiongroup-1.0.0_rc8[${PYTHON_USEDEP}]
|
||||
>=dev-python/tomli-1.0.0[${PYTHON_USEDEP}]
|
||||
' 3.{9..10})
|
||||
"
|
||||
BDEPEND="
|
||||
>=dev-python/setuptools-scm-6.2.3[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
${RDEPEND}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/argcomplete[${PYTHON_USEDEP}]
|
||||
>=dev-python/attrs-19.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.7.2[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
dev-python/xmlschema[${PYTHON_USEDEP}]
|
||||
' "${PYTHON_TESTED[@]}")
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# deprecation warning fix
|
||||
# https://github.com/pytest-dev/pytest/pull/10894/
|
||||
"${FILESDIR}/${P}-py312.patch"
|
||||
)
|
||||
|
||||
src_test() {
|
||||
# workaround new readline defaults
|
||||
echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
|
||||
local -x INPUTRC="${T}"/inputrc
|
||||
distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_test() {
|
||||
if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
|
||||
einfo "Skipping tests on ${EPYTHON}"
|
||||
return
|
||||
fi
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x COLUMNS=80
|
||||
|
||||
local EPYTEST_DESELECT=(
|
||||
# broken by epytest args
|
||||
testing/test_warnings.py::test_works_with_filterwarnings
|
||||
|
||||
# tend to be broken by random pytest plugins
|
||||
# (these tests patch PYTEST_DISABLE_PLUGIN_AUTOLOAD out)
|
||||
testing/test_helpconfig.py::test_version_less_verbose
|
||||
testing/test_helpconfig.py::test_version_verbose
|
||||
testing/test_junitxml.py::test_random_report_log_xdist
|
||||
testing/test_junitxml.py::test_runs_twice_xdist
|
||||
testing/test_terminal.py::TestProgressOutputStyle::test_xdist_normal
|
||||
testing/test_terminal.py::TestProgressOutputStyle::test_xdist_normal_count
|
||||
testing/test_terminal.py::TestProgressOutputStyle::test_xdist_verbose
|
||||
testing/test_terminal.py::TestProgressWithTeardown::test_xdist_normal
|
||||
testing/test_terminal.py::TestTerminalFunctional::test_header_trailer_info
|
||||
testing/test_terminal.py::TestTerminalFunctional::test_no_header_trailer_info
|
||||
|
||||
# unstable with xdist
|
||||
testing/test_terminal.py::TestTerminalFunctional::test_verbose_reporting_xdist
|
||||
|
||||
# TODO (XPASS)
|
||||
testing/test_debugging.py::TestDebuggingBreakpoints::test_pdb_not_altered
|
||||
testing/test_debugging.py::TestPDB::test_pdb_interaction_capturing_simple
|
||||
testing/test_debugging.py::TestPDB::test_pdb_interaction_capturing_twice
|
||||
testing/test_debugging.py::TestPDB::test_pdb_with_injected_do_debug
|
||||
testing/test_debugging.py::test_pdb_suspends_fixture_capturing
|
||||
|
||||
# setuptools warnings
|
||||
testing/acceptance_test.py::TestInvocationVariants::test_cmdline_python_namespace_package
|
||||
)
|
||||
|
||||
[[ ${EPYTHON} == pypy3 ]] && EPYTEST_DESELECT+=(
|
||||
# regressions on pypy3.9
|
||||
# https://github.com/pytest-dev/pytest/issues/9787
|
||||
testing/test_skipping.py::test_errors_in_xfail_skip_expressions
|
||||
testing/test_unraisableexception.py
|
||||
)
|
||||
|
||||
epytest -p xdist -n "$(makeopts_jobs)"
|
||||
}
|
||||
Reference in New Issue
Block a user