1
0

30 Commits

Author SHA256 Message Date
3b79e52c67 Accepting request 1291404 from devel:languages:python
- Add patch support-pytest-8.4.patch:
  * Do not allow pytest to collect non-test functions.

OBS-URL: https://build.opensuse.org/request/show/1291404
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=15
2025-07-09 15:26:31 +00:00
bf1b0c0f64 - Add patch support-pytest-8.4.patch:
* Do not allow pytest to collect non-test functions.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=28
2025-07-09 06:44:50 +00:00
2225355c1c Accepting request 1251791 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1251791
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=14
2025-03-11 19:44:03 +00:00
b4972a92de - Update to 2.2.0
* fix: backward compatibility fix for changed source positions in 3.12.6 (#85)
  * fix: handle changed positions for __exit__ of ast.With
  * update and fix table of contents link, 'libraries' → 'projects' (#93)
  * fix: check for pytest compatibility (#94)
- Drop new-python-312.patch, merged upstream
- Drop pytest.patch, merged upstream

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=26
2025-03-10 12:24:16 +00:00
c1711054df Accepting request 1238543 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1238543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=13
2025-01-20 16:14:03 +00:00
99e2f9fe62 - Add pytest.patch to fix compatibility with new pytest
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=24
2025-01-17 16:40:30 +00:00
c9ffd7439b Accepting request 1217356 from devel:languages:python
- Remove ipython dependency for Leap

OBS-URL: https://build.opensuse.org/request/show/1217356
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=12
2024-10-23 19:08:08 +00:00
86dd7e31f3 - Remove ipython dependency for Leap
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=22
2024-10-23 13:04:28 +00:00
2bc77f1780 Accepting request 1203862 from devel:languages:python
- Split test run into separate build using _multibuild.
- The test suite has to be run with pytest, unittest is not enough
- Add missing BuildRequires: ipython

OBS-URL: https://build.opensuse.org/request/show/1203862
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=11
2024-09-26 16:52:46 +00:00
670786715f - Split test run into separate build using _multibuild.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=20
2024-09-26 09:29:05 +00:00
8079568381 - The test suite has to be run with pytest, unittest is not enough
- Add missing BuildRequires: ipython

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=19
2024-09-20 20:30:06 +00:00
234322b8d1 Accepting request 1201732 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1201732
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=10
2024-09-20 15:08:52 +00:00
2c4a66a529 - Add new-python-312.patch to fix build with recent Python 3.12 release
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=17
2024-09-18 08:31:43 +00:00
1c99f4c877 Accepting request 1199964 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1199964
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=9
2024-09-12 14:53:56 +00:00
41f8d3f1ec Accepting request 1195976 from devel:languages:python
- Switch to autosetup macro.
- Add patch support-new-python-3.12.patch:
  * Support Python 3.13 (and backported to 3.12.5) AST changes for For.

OBS-URL: https://build.opensuse.org/request/show/1195976
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=8
2024-08-29 13:42:30 +00:00
b3c613d68f - Switch to autosetup macro.
- Add patch support-new-python-3.12.patch:
  * Support Python 3.13 (and backported to 3.12.5) AST changes for For.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=13
2024-08-26 02:32:35 +00:00
8f126b9a45 Accepting request 1124080 from devel:languages:python
- update to 2.0.1:
  * fix: self.fail() is only available in TestCase classes
  * fix: mark expressions which can be evaluated at compile time
    as deadcode
  * fix: implemented DELETE_DEREF
  * feat: 3.12 support for the PositionNodeFinder
  * feat: support LOAD_CONST
  * test: verify exception generation for asserts >= python 3.11.2
  * test: skip test of module_files for the SentinelNodeFinder
  * test: do not check qualnames for files with syntax errors
  * fix: handle List/Set/DictComp inlining
  * fix: handle super optimization
  * fix: type parameter related things
  * fix: f-string
  * fix: disabled type checking for 3.12
  * test: added test results for 3.12
  * fix: workaround for a bug in six
  * remove python2 code
  * feat: support for __iter__
  * feat: support for __next__

      Clear caches when modules are reloaded
- Update to 0.9.0
  * handle new iphython cell code names

OBS-URL: https://build.opensuse.org/request/show/1124080
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=7
2023-11-08 21:17:08 +00:00
e601f2df84 - update to 2.0.1:
* fix: self.fail() is only available in TestCase classes
  * fix: mark expressions which can be evaluated at compile time
    as deadcode
  * fix: implemented DELETE_DEREF
  * feat: 3.12 support for the PositionNodeFinder
  * feat: support LOAD_CONST
  * test: verify exception generation for asserts >= python 3.11.2
  * test: skip test of module_files for the SentinelNodeFinder
  * test: do not check qualnames for files with syntax errors
  * fix: handle List/Set/DictComp inlining
  * fix: handle super optimization
  * fix: type parameter related things
  * fix: f-string
  * fix: disabled type checking for 3.12
  * test: added test results for 3.12
  * fix: workaround for a bug in six
  * remove python2 code
  * feat: support for __iter__
  * feat: support for __next__
      Clear caches when modules are reloaded
- Update to 0.9.0
  * handle new iphython cell code names

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=11
2023-11-07 19:17:01 +00:00
5fa33bd43a Accepting request 1081931 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1081931
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=6
2023-04-22 20:01:06 +00:00
8f5c9fb5e3 Accepting request 1081401 from home:dirkmueller:acdc:as_python3_module
SR for python stack proposal

OBS-URL: https://build.opensuse.org/request/show/1081401
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=9
2023-04-21 14:41:01 +00:00
565b78ffc5 Accepting request 1039671 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1039671
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=5
2022-12-04 13:57:37 +00:00
d0a1905467 Accepting request 1039628 from home:yarunachalam:branches:devel:languages:python
- Update to 1.2.0
  Merge pull request #56 from alexmojaki/init_tokens
      Use new asttokens.ASTText
- Update to 1.1.1
  tox is breaking weirdly with too much parallelism
- Update to 1.1.0
  3.11 in setup.cfg
- Update to 1.0.0
  Merge pull request #46 from alexmojaki/checkcache
      Always check linecache
- Update to 0.10.0
  Merge pull request #45 from alexmojaki/reload
      Clear caches when modules are reloaded  
- Update to 0.9.1
  Merge pull request #41 from alexmojaki/node_linenos
      Extract node_linenos to account for end_lineno and use in assert_linenos
- Update to 0.9.0 
  * Merge pull request #38 from alexmojaki/pwwang/master
      Support STORE_ATTR and STORE_SUBSCR

OBS-URL: https://build.opensuse.org/request/show/1039628
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=7
2022-12-02 21:39:05 +00:00
f73bc40d7f Accepting request 965181 from devel:languages:python
- update to 0.8.3:
  * handle new iphython cell code names 
  * link to futurecoder

OBS-URL: https://build.opensuse.org/request/show/965181
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=4
2022-03-29 16:14:04 +00:00
2011585994 - update to 0.8.3:
* handle new iphython cell code names 
  * link to futurecoder

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=5
2022-03-27 10:50:04 +00:00
3e72f4dff0 Accepting request 935231 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/935231
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=3
2021-12-02 21:30:25 +00:00
7ca05023b8 Accepting request 935171 from home:Guillaume_G:branches:devel:languages:python
- Skip python 3.6 since python-asttokens dropped it

OBS-URL: https://build.opensuse.org/request/show/935171
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=4
2021-12-02 15:47:44 +00:00
74d90c2185 Accepting request 928873 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/928873
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=2
2021-11-03 16:25:54 +00:00
9414af4e35 Accepting request 928807 from home:pgajdos:python
- version update to 0.8.2
  * no upstream changelog
- %check: use %pyunittest rpm macro

OBS-URL: https://build.opensuse.org/request/show/928807
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=3
2021-11-02 21:36:59 +00:00
a58769edb1 Accepting request 858358 from devel:languages:python
New package. Needed for python-entry-sdk

OBS-URL: https://build.opensuse.org/request/show/858358
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-executing?expand=0&rev=1
2020-12-24 18:38:31 +00:00
aba234eac2 Accepting request 852716 from home:ecsos:messenger:matrix
New packages.
Need for python-sentry-sdk

OBS-URL: https://build.opensuse.org/request/show/852716
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=1
2020-12-02 22:09:49 +00:00
8 changed files with 111 additions and 129 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147
size 836501

BIN
executing-2.1.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
executing-2.2.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,46 @@
-------------------------------------------------------------------
Wed Jul 9 06:44:07 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pytest-8.4.patch:
* Do not allow pytest to collect non-test functions.
-------------------------------------------------------------------
Mon Mar 10 09:25:36 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.2.0
* fix: backward compatibility fix for changed source positions in 3.12.6 (#85)
* fix: handle changed positions for __exit__ of ast.With
* update and fix table of contents link, 'libraries' → 'projects' (#93)
* fix: check for pytest compatibility (#94)
- Drop new-python-312.patch, merged upstream
- Drop pytest.patch, merged upstream
-------------------------------------------------------------------
Fri Jan 17 16:19:38 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add pytest.patch to fix compatibility with new pytest
-------------------------------------------------------------------
Wed Oct 23 13:02:57 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Remove ipython dependency for Leap
-------------------------------------------------------------------
Thu Sep 26 09:27:25 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Split test run into separate build using _multibuild.
-------------------------------------------------------------------
Fri Sep 20 20:29:20 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- The test suite has to be run with pytest, unittest is not enough
- Add missing BuildRequires: ipython
-------------------------------------------------------------------
Wed Sep 18 06:18:15 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Add new-python-312.patch to fix build with recent Python 3.12 release
-------------------------------------------------------------------
Tue Sep 10 07:06:40 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-executing
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,25 +16,41 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-executing
Version: 2.1.0
Name: python-executing%{psuffix}
Version: 2.2.0
Release: 0
Summary: Get the currently executing AST node of a frame, and other information
License: MIT
URL: https://github.com/alexmojaki/executing
Source: https://files.pythonhosted.org/packages/source/e/executing/executing-%{version}.tar.gz
BuildRequires: %{python_module asttokens}
# PATCH-FIX-UPSTREAM One commit from gh#alexmojaki/executing#97
Patch0: support-pytest-8.4.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module littleutils}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm >= 4.0.0}
BuildRequires: %{python_module toml}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module asttokens}
%if 0%{?suse_version} > 1600
BuildRequires: %{python_module ipython}
%endif
BuildRequires: %{python_module littleutils}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module rich}
%endif
%python_subpackages
%description
@@ -44,19 +60,34 @@ Get the currently executing AST node of a frame, and other information
%autosetup -p1 -n executing-%{version}
%build
%if %{without test}
%pyproject_wheel
%endif
%install
%if %{without test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%pyunittest discover -v
%if %{with test}
# Don't have ipython build requirement in Leap
%if 0%{?suse_version} <= 1600
%pytest -k "not test_ipython"
%else
%pytest
%endif
%endif
%if %{without test}
%files %{python_files}
%doc README.md
%license LICENSE.txt
%{python_sitelib}/executing
%{python_sitelib}/executing-%{version}.dist-info
%endif
%changelog

View File

@@ -1,116 +0,0 @@
From 0b913873b9db8c157a8dd581e8771242bcb8864b Mon Sep 17 00:00:00 2001
From: Frank Hoffmann <15r10nk-git@polarbit.de>
Date: Fri, 16 Aug 2024 22:51:32 +0200
Subject: [PATCH 1/4] fix: backward compatibility fix for changed source
positions in 3.12.5 (#82)
---
executing/_position_node_finder.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
Index: executing-2.0.1/executing/_position_node_finder.py
===================================================================
--- executing-2.0.1.orig/executing/_position_node_finder.py
+++ executing-2.0.1/executing/_position_node_finder.py
@@ -156,6 +156,8 @@ class PositionNodeFinder(object):
typ=typ,
)
+ self.result = self.fix_result(self.result, self.instruction(lasti))
+
self.known_issues(self.result, self.instruction(lasti))
self.test_for_decorator(self.result, lasti)
@@ -213,6 +215,32 @@ class PositionNodeFinder(object):
if sys.version_info < (3, 12):
index += 4
+ def fix_result(
+ self, node: EnhancedAST, instruction: dis.Instruction
+ ) -> EnhancedAST:
+ if (
+ sys.version_info >= (3, 12, 5)
+ and instruction.opname in ("GET_ITER", "FOR_ITER")
+ and isinstance(node.parent, ast.For)
+ and node is node.parent.iter
+ ):
+ # node positions have changed in 3.12.5
+ # https://github.com/python/cpython/issues/93691
+ # `for` calls __iter__ and __next__ during execution, the calling
+ # expression of these calls was the ast.For node since cpython 3.11 (see test_iter).
+ # cpython 3.12.5 changed this to the `iter` node of the loop, to make tracebacks easier to read.
+ # This keeps backward compatibility with older executing versions.
+
+ # there are also cases like:
+ #
+ # for a in iter(l): pass
+ #
+ # where `iter(l)` would be otherwise the resulting node for the `iter()` call and the __iter__ call of the for implementation.
+ # keeping the old behaviour makes it possible to distinguish both cases.
+
+ return node.parent
+ return node
+
def known_issues(self, node: EnhancedAST, instruction: dis.Instruction) -> None:
if instruction.opname in ("COMPARE_OP", "IS_OP", "CONTAINS_OP") and isinstance(
node, types_cmp_issue
Index: executing-2.0.1/.github/workflows/test.yml
===================================================================
--- executing-2.0.1.orig/.github/workflows/test.yml
+++ executing-2.0.1/.github/workflows/test.yml
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
- python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', 3.11, 3.12-dev, pypy-3.6]
+ python-version: [3.8, 3.9, '3.10', 3.11, 3.12-dev]
steps:
- uses: actions/checkout@v2
Index: executing-2.0.1/setup.cfg
===================================================================
--- executing-2.0.1.orig/setup.cfg
+++ executing-2.0.1/setup.cfg
@@ -25,7 +25,7 @@ packages = executing
zip_safe = False
include_package_data = True
setup_requires = setuptools; setuptools_scm[toml]
-python_requires = >=3.5
+python_requires = >=3.8
[options.extras_require]
tests =
Index: executing-2.0.1/tox.ini
===================================================================
--- executing-2.0.1.orig/tox.ini
+++ executing-2.0.1/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py35,py36,py37,py38,py39,py310,py311,py312,pypy35,pypy36
+envlist = py38,py39,py310,py311,py312,pypy35,pypy36
[testenv]
commands =
@@ -10,7 +10,7 @@ passenv =
ADD_EXECUTING_TESTS
EXECUTING_SLOW_TESTS
-[testenv:generate_small_sample-py{35,36,37,38,39,310,311}]
+[testenv:generate_small_sample-py{38,39,310,311,312}]
extras = tests
deps = pysource-minimize
commands =
Index: executing-2.0.1/tests/test_main.py
===================================================================
--- executing-2.0.1.orig/tests/test_main.py
+++ executing-2.0.1/tests/test_main.py
@@ -802,6 +802,9 @@ class TestFiles:
or 'pyparsing.py' in filename
or 'enum' in filename
)
+ or sys.version_info < (3,11) and (
+ 'python.py' in filename
+ )
):
continue

24
support-pytest-8.4.patch Normal file
View File

@@ -0,0 +1,24 @@
From fae0dd2f4bd0e74b8a928e19407fd4167f4b2295 Mon Sep 17 00:00:00 2001
From: Frank Hoffmann <15r10nk-git@polarbit.de>
Date: Wed, 18 Jun 2025 22:20:25 +0200
Subject: [PATCH] fix: prevent pytest from thinking that Tester() could be a
test function
---
pyproject.toml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index d5cf1ab..226e061 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,4 +14,7 @@ warn_redundant_casts=true
[[tool.mypy.overrides]]
module = "astroid"
-ignore_missing_imports = true
\ No newline at end of file
+ignore_missing_imports = true
+
+[tool.pytest.ini_options]
+python_functions = "test_"