openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2024
- 1 participants
- 428 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python310 for openSUSE:Factory checked in at 2024-07-05 19:45:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python310 (Old)
and /work/SRC/openSUSE:Factory/.python310.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python310"
Fri Jul 5 19:45:12 2024 rev:45 rq:1185398 version:3.10.14
Changes:
--------
--- /work/SRC/openSUSE:Factory/python310/python310.changes 2024-06-29 15:17:08.587604688 +0200
+++ /work/SRC/openSUSE:Factory/.python310.new.2080/python310.changes 2024-07-05 19:49:58.387711842 +0200
@@ -1,0 +2,7 @@
+Tue Jul 2 10:31:26 UTC 2024 - Daniel Garcia <daniel.garcia(a)suse.com>
+
+- Update F00251-change-user-install-location.patch to make pip and
+ modern tools install directly in /usr/local when used by the user.
+ bsc#1225660
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ F00251-change-user-install-location.patch ++++++
--- /var/tmp/diff_new_pack.O4fN90/_old 2024-07-05 19:50:01.655832007 +0200
+++ /var/tmp/diff_new_pack.O4fN90/_new 2024-07-05 19:50:01.659832154 +0200
@@ -13,8 +13,10 @@
Lib/site.py | 9 ++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)
---- a/Lib/distutils/command/install.py
-+++ b/Lib/distutils/command/install.py
+Index: Python-3.10.14/Lib/distutils/command/install.py
+===================================================================
+--- Python-3.10.14.orig/Lib/distutils/command/install.py
++++ Python-3.10.14/Lib/distutils/command/install.py
@@ -441,8 +441,19 @@ class install(Command):
raise DistutilsOptionError(
"must not supply exec-prefix without prefix")
@@ -37,8 +39,10 @@
else:
if self.exec_prefix is None:
---- a/Lib/site.py
-+++ b/Lib/site.py
+Index: Python-3.10.14/Lib/site.py
+===================================================================
+--- Python-3.10.14.orig/Lib/site.py
++++ Python-3.10.14/Lib/site.py
@@ -390,8 +390,15 @@ def getsitepackages(prefixes=None):
return sitepackages
@@ -56,4 +60,129 @@
for sitedir in getsitepackages(prefixes):
if os.path.isdir(sitedir):
addsitedir(sitedir, known_paths)
+Index: Python-3.10.14/Lib/sysconfig.py
+===================================================================
+--- Python-3.10.14.orig/Lib/sysconfig.py
++++ Python-3.10.14/Lib/sysconfig.py
+@@ -117,6 +117,19 @@ if _HAS_USER_BASE:
+ },
+ }
+
++# This is used by distutils.command.install in the stdlib
++# as well as pypa/distutils (e.g. bundled in setuptools).
++# The self.prefix value is set to sys.prefix + /local/
++# if neither RPM build nor virtual environment is
++# detected to make distutils install packages
++# into the separate location.
++# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
++if (not (hasattr(sys, 'real_prefix') or
++ sys.prefix != sys.base_prefix) and
++ 'RPM_BUILD_ROOT' not in os.environ):
++ _prefix_addition = '/local'
++
++
+ _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include',
+ 'scripts', 'data')
+
+@@ -136,6 +149,16 @@ _variable_rx = r"([a-zA-Z][a-zA-Z0-9_]+)
+ _findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)"
+ _findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}"
+
++# For a brief period of time in the Fedora 36 life cycle,
++# this installation scheme existed and was documented in the release notes.
++# For backwards compatibility, we keep it here (at least on 3.10 and 3.11).
++_INSTALL_SCHEMES['rpm_prefix'] = _INSTALL_SCHEMES['posix_prefix']
++
++# For a brief period of time in the Fedora 36 life cycle,
++# this installation scheme existed and was documented in the release notes.
++# For backwards compatibility, we keep it here (at least on 3.10 and 3.11).
++_INSTALL_SCHEMES['rpm_prefix'] = _INSTALL_SCHEMES['posix_prefix']
++
+
+ def _safe_realpath(path):
+ try:
+@@ -211,11 +234,39 @@ def _extend_dict(target_dict, other_dict
+ target_dict[key] = value
+
+
++_CONFIG_VARS_LOCAL = None
++
++
++def _config_vars_local():
++ # This function returns the config vars with prefixes amended to /usr/local
++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
++ global _CONFIG_VARS_LOCAL
++ if _CONFIG_VARS_LOCAL is None:
++ _CONFIG_VARS_LOCAL = dict(get_config_vars())
++ _CONFIG_VARS_LOCAL['base'] = '/usr/local'
++ _CONFIG_VARS_LOCAL['platbase'] = '/usr/local'
++ return _CONFIG_VARS_LOCAL
++
++
+ def _expand_vars(scheme, vars):
+ res = {}
+ if vars is None:
+ vars = {}
+- _extend_dict(vars, get_config_vars())
++
++ # when we are not in a virtual environment or an RPM build
++ # we change '/usr' to '/usr/local'
++ # to avoid surprises, we explicitly check for the /usr/ prefix
++ # Python virtual environments have different prefixes
++ # we only do this for posix_prefix, not to mangle the venv scheme
++ # posix_prefix is used by sudo pip install
++ # we only change the defaults here, so explicit --prefix will take precedence
++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
++ if (scheme == 'posix_prefix' and
++ _PREFIX == '/usr' and
++ 'RPM_BUILD_ROOT' not in os.environ):
++ _extend_dict(vars, _config_vars_local())
++ else:
++ _extend_dict(vars, get_config_vars())
+
+ for key, value in _INSTALL_SCHEMES[scheme].items():
+ if os.name in ('posix', 'nt'):
+Index: Python-3.10.14/Lib/test/test_sysconfig.py
+===================================================================
+--- Python-3.10.14.orig/Lib/test/test_sysconfig.py
++++ Python-3.10.14/Lib/test/test_sysconfig.py
+@@ -105,8 +105,19 @@ class TestSysConfig(unittest.TestCase):
+ for scheme in _INSTALL_SCHEMES:
+ for name in _INSTALL_SCHEMES[scheme]:
+ expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars)
++ tested = get_path(name, scheme)
++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
++ if tested.startswith('/usr/local'):
++ # /usr/local should only be used in posix_prefix
++ self.assertEqual(scheme, 'posix_prefix')
++ # Fedora CI runs tests for venv and virtualenv that check for other prefixes
++ self.assertEqual(sys.prefix, '/usr')
++ # When building the RPM of Python, %check runs this with RPM_BUILD_ROOT set
++ # Fedora CI runs this with RPM_BUILD_ROOT unset
++ self.assertNotIn('RPM_BUILD_ROOT', os.environ)
++ tested = tested.replace('/usr/local', '/usr')
+ self.assertEqual(
+- os.path.normpath(get_path(name, scheme)),
++ os.path.normpath(tested),
+ os.path.normpath(expected),
+ )
+
+@@ -263,7 +274,7 @@ class TestSysConfig(unittest.TestCase):
+ self.assertTrue(os.path.isfile(config_h), config_h)
+
+ def test_get_scheme_names(self):
+- wanted = ['nt', 'posix_home', 'posix_prefix']
++ wanted = ['nt', 'posix_home', 'posix_prefix', 'rpm_prefix']
+ if HAS_USER_BASE:
+ wanted.extend(['nt_user', 'osx_framework_user', 'posix_user'])
+ self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
+@@ -274,6 +285,8 @@ class TestSysConfig(unittest.TestCase):
+ cmd = "-c", "import sysconfig; print(sysconfig.get_platform())"
+ self.assertEqual(py.call_real(*cmd), py.call_link(*cmd))
+
++ @unittest.skipIf('RPM_BUILD_ROOT' not in os.environ,
++ "Test doesn't expect Fedora's paths")
+ def test_user_similar(self):
+ # Issue #8759: make sure the posix scheme for the users
+ # is similar to the global posix_prefix one
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-astroid for openSUSE:Factory checked in at 2024-07-05 19:45:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-astroid (Old)
and /work/SRC/openSUSE:Factory/.python-astroid.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astroid"
Fri Jul 5 19:45:10 2024 rev:51 rq:1185391 version:3.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes 2024-03-25 21:07:53.704515238 +0100
+++ /work/SRC/openSUSE:Factory/.python-astroid.new.2080/python-astroid.changes 2024-07-05 19:49:45.983255744 +0200
@@ -1,0 +2,21 @@
+Sun Jun 30 22:03:18 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 3.2.2:
+ * Improve inference for generic classes using the PEP 695
+ syntax (Python 3.12).
+ * Fix ``RecursionError`` in ``infer_call_result()`` for certain
+ ``__call__`` methods.
+ * Add ``AstroidManager.prefer_stubs`` attribute to control the
+ astroid 3.2.0 feature that prefers stubs.
+ * ``igetattr()`` returns the last same-named function in a
+ class (instead of the first). This avoids false positives
+ in pylint with ``@overload``.
+ * Adds ``module_denylist`` to ``AstroidManager`` for modules to
+ be skipped during AST generation. Modules in this list will
+ cause an ``AstroidImportError`` to be raised when an AST
+ for them is requested.
+ * Make ``astroid.interpreter._import.util.is_namespace`` only
+ consider modules using a loader set to ``NamespaceLoader``
+ or ``None`` as namespaces.
+
+-------------------------------------------------------------------
Old:
----
astroid-3.1.0-gh.tar.gz
New:
----
astroid-3.2.2-gh.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-astroid.spec ++++++
--- /var/tmp/diff_new_pack.giFOJu/_old 2024-07-05 19:49:49.987402971 +0200
+++ /var/tmp/diff_new_pack.giFOJu/_new 2024-07-05 19:49:49.987402971 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-astroid
-Version: 3.1.0
+Version: 3.2.2
Release: 0
Summary: Representation of Python source as an AST for pylint
License: LGPL-2.1-or-later
++++++ astroid-3.1.0-gh.tar.gz -> astroid-3.2.2-gh.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/.git-blame-ignore-revs new/astroid-3.2.2/.git-blame-ignore-revs
--- old/astroid-3.1.0/.git-blame-ignore-revs 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/.git-blame-ignore-revs 2024-05-20 00:21:03.000000000 +0200
@@ -1 +1,6 @@
+# Initial formatting of astroid
add5f7b8eba427de9d39caae864bbc6dc37ef980
+# Apply black on doc/conf.py
+2dd9027054db541871713ef1cb1ae89513d05555
+# Black's 2024 style
+396f01a15d1cb0351b33654acdeedde64f537a0c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/.github/workflows/ci.yaml new/astroid-3.2.2/.github/workflows/ci.yaml
--- old/astroid-3.1.0/.github/workflows/ci.yaml 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/.github/workflows/ci.yaml 2024-05-20 00:21:03.000000000 +0200
@@ -24,10 +24,10 @@
timeout-minutes: 20
steps:
- name: Check out code from GitHub
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
@@ -39,7 +39,7 @@
'requirements_full.txt', 'requirements_minimal.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache(a)v4.0.0
+ uses: actions/cache(a)v4.0.2
with:
path: venv
key: >-
@@ -59,7 +59,7 @@
hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
- name: Restore pre-commit environment
id: cache-precommit
- uses: actions/cache(a)v4.0.0
+ uses: actions/cache(a)v4.0.2
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
@@ -86,10 +86,10 @@
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -106,7 +106,7 @@
'requirements_full.txt', 'requirements_minimal.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache(a)v4.0.0
+ uses: actions/cache(a)v4.0.2
with:
path: venv
key: >-
@@ -125,7 +125,7 @@
. venv/bin/activate
pytest --cov
- name: Upload coverage artifact
- uses: actions/upload-artifact(a)v4.3.1
+ uses: actions/upload-artifact(a)v4.3.3
with:
name: coverage-linux-${{ matrix.python-version }}
path: .coverage
@@ -145,10 +145,10 @@
# Workaround to set correct temp directory on Windows
# https://github.com/actions/virtual-environments/issues/712
- name: Check out code from GitHub
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -160,7 +160,7 @@
'requirements_full.txt', 'requirements_minimal.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache(a)v4.0.0
+ uses: actions/cache(a)v4.0.2
with:
path: venv
key: >-
@@ -179,7 +179,7 @@
. venv\\Scripts\\activate
pytest --cov
- name: Upload coverage artifact
- uses: actions/upload-artifact(a)v4.3.1
+ uses: actions/upload-artifact(a)v4.3.3
with:
name: coverage-windows-${{ matrix.python-version }}
path: .coverage
@@ -195,10 +195,10 @@
python-version: ["pypy3.8", "pypy3.10"]
steps:
- name: Check out code from GitHub
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python ${{ matrix.python-version }}
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ matrix.python-version }}
check-latest: true
@@ -210,7 +210,7 @@
}}" >> $GITHUB_OUTPUT
- name: Restore Python virtual environment
id: cache-venv
- uses: actions/cache(a)v4.0.0
+ uses: actions/cache(a)v4.0.2
with:
path: venv
key: >-
@@ -229,7 +229,7 @@
. venv/bin/activate
pytest --cov
- name: Upload coverage artifact
- uses: actions/upload-artifact(a)v4.3.1
+ uses: actions/upload-artifact(a)v4.3.3
with:
name: coverage-pypy-${{ matrix.python-version }}
path: .coverage
@@ -241,22 +241,22 @@
needs: ["tests-linux", "tests-windows", "tests-pypy"]
steps:
- name: Check out code from GitHub
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python 3.12
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
python-version: "3.12"
check-latest: true
- name: Install dependencies
run: pip install -U -r requirements_minimal.txt
- name: Download all coverage artifacts
- uses: actions/download-artifact(a)v4.1.2
+ uses: actions/download-artifact(a)v4.1.7
- name: Combine Linux coverage results
run: |
coverage combine coverage-linux*/.coverage
coverage xml -o coverage-linux.xml
- - uses: codecov/codecov-action@v3
+ - uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
@@ -267,7 +267,7 @@
run: |
coverage combine coverage-windows*/.coverage
coverage xml -o coverage-windows.xml
- - uses: codecov/codecov-action@v3
+ - uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
@@ -278,7 +278,7 @@
run: |
coverage combine coverage-pypy*/.coverage
coverage xml -o coverage-pypy.xml
- - uses: codecov/codecov-action@v3
+ - uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/.github/workflows/codeql-analysis.yml new/astroid-3.2.2/.github/workflows/codeql-analysis.yml
--- old/astroid-3.1.0/.github/workflows/codeql-analysis.yml 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/.github/workflows/codeql-analysis.yml 2024-05-20 00:21:03.000000000 +0200
@@ -46,7 +46,7 @@
steps:
- name: Checkout repository
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/.github/workflows/release-tests.yml new/astroid-3.2.2/.github/workflows/release-tests.yml
--- old/astroid-3.1.0/.github/workflows/release-tests.yml 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/.github/workflows/release-tests.yml 2024-05-20 00:21:03.000000000 +0200
@@ -13,10 +13,10 @@
timeout-minutes: 5
steps:
- name: Check out code from GitHub
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python 3.9
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
# virtualenv 15.1.0 cannot be installed on Python 3.10+
python-version: 3.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/.github/workflows/release.yml new/astroid-3.2.2/.github/workflows/release.yml
--- old/astroid-3.1.0/.github/workflows/release.yml 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/.github/workflows/release.yml 2024-05-20 00:21:03.000000000 +0200
@@ -20,10 +20,10 @@
url: https://pypi.org/project/astroid/
steps:
- name: Check out code from Github
- uses: actions/checkout(a)v4.1.1
+ uses: actions/checkout(a)v4.1.5
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
- uses: actions/setup-python(a)v5.0.0
+ uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/.pre-commit-config.yaml new/astroid-3.2.2/.pre-commit-config.yaml
--- old/astroid-3.1.0/.pre-commit-config.yaml 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/.pre-commit-config.yaml 2024-05-20 00:21:03.000000000 +0200
@@ -3,14 +3,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.5.0
+ rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: .github/|tests/testdata
- id: end-of-file-fixer
exclude: tests/testdata
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: "v0.2.1"
+ rev: "v0.4.3"
hooks:
- id: ruff
exclude: tests/testdata
@@ -23,7 +23,7 @@
exclude: tests/testdata|setup.py
types: [python]
- repo: https://github.com/asottile/pyupgrade
- rev: v3.15.0
+ rev: v3.15.2
hooks:
- id: pyupgrade
exclude: tests/testdata
@@ -34,7 +34,7 @@
- id: black-disable-checker
exclude: tests/test_nodes_lineno.py
- repo: https://github.com/psf/black
- rev: 24.2.0
+ rev: 24.4.2
hooks:
- id: black
args: [--safe, --quiet]
@@ -54,7 +54,7 @@
]
exclude: tests/testdata|conf.py
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.8.0
+ rev: v1.10.0
hooks:
- id: mypy
name: mypy
@@ -66,7 +66,7 @@
additional_dependencies: ["types-typed-ast"]
exclude: tests/testdata| # exclude everything, we're not ready
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: v3.1.0
+ rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/CONTRIBUTORS.txt new/astroid-3.2.2/CONTRIBUTORS.txt
--- old/astroid-3.1.0/CONTRIBUTORS.txt 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/CONTRIBUTORS.txt 2024-05-20 00:21:03.000000000 +0200
@@ -204,3 +204,5 @@
- carl
- alain lefroy
- Mark Gius
+- Jérome Perrin <perrinjerome(a)gmail.com>
+- Jamie Scott <jamie(a)jami.org.uk>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/ChangeLog new/astroid-3.2.2/ChangeLog
--- old/astroid-3.1.0/ChangeLog 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/ChangeLog 2024-05-20 00:21:03.000000000 +0200
@@ -3,18 +3,69 @@
===================
-What's New in astroid 3.2.0?
+What's New in astroid 3.3.0?
============================
Release date: TBA
-What's New in astroid 3.1.1?
+What's New in astroid 3.2.3?
============================
Release date: TBA
+What's New in astroid 3.2.2?
+============================
+Release date: 2024-05-20
+
+* Improve inference for generic classes using the PEP 695 syntax (Python 3.12).
+
+ Closes pylint-dev/pylint#9406
+
+
+What's New in astroid 3.2.1?
+============================
+Release date: 2024-05-16
+
+* Fix ``RecursionError`` in ``infer_call_result()`` for certain ``__call__`` methods.
+
+ Closes pylint-dev/pylint#9139
+
+* Add ``AstroidManager.prefer_stubs`` attribute to control the astroid 3.2.0 feature that prefers stubs.
+
+ Refs pylint-dev/pylint#9626
+ Refs pylint-dev/pylint#9623
+
+
+What's New in astroid 3.2.0?
+============================
+Release date: 2024-05-07
+
+* ``.pyi`` stub files are now preferred over ``.py`` files when resolving imports, (except for numpy).
+
+ Closes pylint-dev/#9185
+
+* ``igetattr()`` returns the last same-named function in a class (instead of
+ the first). This avoids false positives in pylint with ``@overload``.
+
+ Closes #1015
+ Refs pylint-dev/pylint#4696
+
+* Adds ``module_denylist`` to ``AstroidManager`` for modules to be skipped during AST
+ generation. Modules in this list will cause an ``AstroidImportError`` to be raised
+ when an AST for them is requested.
+
+ Refs pylint-dev/pylint#9442
+
+* Make ``astroid.interpreter._import.util.is_namespace`` only consider modules
+ using a loader set to ``NamespaceLoader`` or ``None`` as namespaces.
+ This fixes a problem that ``six.moves`` brain was not effective if ``six.moves``
+ was already imported.
+
+ Closes #1107
+
+
What's New in astroid 3.1.0?
============================
Release date: 2024-02-23
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/__pkginfo__.py new/astroid-3.2.2/astroid/__pkginfo__.py
--- old/astroid-3.1.0/astroid/__pkginfo__.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/__pkginfo__.py 2024-05-20 00:21:03.000000000 +0200
@@ -2,5 +2,5 @@
# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE
# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt
-__version__ = "3.1.0"
+__version__ = "3.2.2"
version = __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/bases.py new/astroid-3.2.2/astroid/bases.py
--- old/astroid-3.1.0/astroid/bases.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/bases.py 2024-05-20 00:21:03.000000000 +0200
@@ -326,6 +326,11 @@
for node in self._proxied.igetattr("__call__", context):
if isinstance(node, UninferableBase) or not node.callable():
continue
+ if isinstance(node, BaseInstance) and node._proxied is self._proxied:
+ inferred = True
+ yield node
+ # Prevent recursion.
+ continue
for res in node.infer_call_result(caller, context):
inferred = True
yield res
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/brain/brain_typing.py new/astroid-3.2.2/astroid/brain/brain_typing.py
--- old/astroid-3.1.0/astroid/brain/brain_typing.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/brain/brain_typing.py 2024-05-20 00:21:03.000000000 +0200
@@ -196,6 +196,20 @@
return node.infer(context=ctx)
+def _looks_like_generic_class_pep695(node: ClassDef) -> bool:
+ """Check if class is using type parameter. Python 3.12+."""
+ return len(node.type_params) > 0
+
+
+def infer_typing_generic_class_pep695(
+ node: ClassDef, ctx: context.InferenceContext | None = None
+) -> Iterator[ClassDef]:
+ """Add __class_getitem__ for generic classes. Python 3.12+."""
+ func_to_add = _extract_single_node(CLASS_GETITEM_TEMPLATE)
+ node.locals["__class_getitem__"] = [func_to_add]
+ return iter([node])
+
+
def _looks_like_typedDict( # pylint: disable=invalid-name
node: FunctionDef | ClassDef,
) -> bool:
@@ -490,3 +504,8 @@
if PY312_PLUS:
register_module_extender(manager, "typing", _typing_transform)
+ manager.register_transform(
+ ClassDef,
+ inference_tip(infer_typing_generic_class_pep695),
+ _looks_like_generic_class_pep695,
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/interpreter/_import/spec.py new/astroid-3.2.2/astroid/interpreter/_import/spec.py
--- old/astroid-3.1.0/astroid/interpreter/_import/spec.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/interpreter/_import/spec.py 2024-05-20 00:21:03.000000000 +0200
@@ -15,7 +15,8 @@
import types
import warnings
import zipimport
-from collections.abc import Iterator, Sequence
+from collections.abc import Iterable, Iterator, Sequence
+from functools import lru_cache
from pathlib import Path
from typing import Any, Literal, NamedTuple, Protocol
@@ -160,9 +161,10 @@
pass
submodule_path = sys.path
+ suffixes = (".py", ".pyi", importlib.machinery.BYTECODE_SUFFIXES[0])
for entry in submodule_path:
package_directory = os.path.join(entry, modname)
- for suffix in (".py", ".pyi", importlib.machinery.BYTECODE_SUFFIXES[0]):
+ for suffix in suffixes:
package_file_name = "__init__" + suffix
file_path = os.path.join(package_directory, package_file_name)
if os.path.isfile(file_path):
@@ -423,7 +425,7 @@
raise ImportError(f"No module named {'.'.join(module_parts)}")
-def find_spec(modpath: list[str], path: Sequence[str] | None = None) -> ModuleSpec:
+def find_spec(modpath: Iterable[str], path: Iterable[str] | None = None) -> ModuleSpec:
"""Find a spec for the given module.
:type modpath: list or tuple
@@ -440,10 +442,15 @@
:return: A module spec, which describes how the module was
found and where.
"""
+ return _find_spec(tuple(modpath), tuple(path) if path else None)
+
+
+@lru_cache(maxsize=1024)
+def _find_spec(module_path: tuple, path: tuple) -> ModuleSpec:
_path = path or sys.path
# Need a copy for not mutating the argument.
- modpath = modpath[:]
+ modpath = list(module_path)
submodule_path = None
module_parts = modpath[:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/interpreter/_import/util.py new/astroid-3.2.2/astroid/interpreter/_import/util.py
--- old/astroid-3.1.0/astroid/interpreter/_import/util.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/interpreter/_import/util.py 2024-05-20 00:21:03.000000000 +0200
@@ -12,6 +12,11 @@
from astroid.const import IS_PYPY
+if sys.version_info >= (3, 11):
+ from importlib.machinery import NamespaceLoader
+else:
+ from importlib._bootstrap_external import _NamespaceLoader as NamespaceLoader
+
@lru_cache(maxsize=4096)
def is_namespace(modname: str) -> bool:
@@ -101,4 +106,7 @@
found_spec is not None
and found_spec.submodule_search_locations is not None
and found_spec.origin is None
+ and (
+ found_spec.loader is None or isinstance(found_spec.loader, NamespaceLoader)
+ )
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/manager.py new/astroid-3.2.2/astroid/manager.py
--- old/astroid-3.1.0/astroid/manager.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/manager.py 2024-05-20 00:21:03.000000000 +0200
@@ -59,7 +59,9 @@
"optimize_ast": False,
"max_inferable_values": 100,
"extension_package_whitelist": set(),
+ "module_denylist": set(),
"_transform": TransformVisitor(),
+ "prefer_stubs": False,
}
def __init__(self) -> None:
@@ -70,7 +72,9 @@
self.extension_package_whitelist = AstroidManager.brain[
"extension_package_whitelist"
]
+ self.module_denylist = AstroidManager.brain["module_denylist"]
self._transform = AstroidManager.brain["_transform"]
+ self.prefer_stubs = AstroidManager.brain["prefer_stubs"]
@property
def always_load_extensions(self) -> bool:
@@ -109,6 +113,14 @@
def builtins_module(self) -> nodes.Module:
return self.astroid_cache["builtins"]
+ @property
+ def prefer_stubs(self) -> bool:
+ return AstroidManager.brain["prefer_stubs"]
+
+ @prefer_stubs.setter
+ def prefer_stubs(self, value: bool) -> None:
+ AstroidManager.brain["prefer_stubs"] = value
+
def visit_transforms(self, node: nodes.NodeNG) -> InferenceResult:
"""Visit the transforms and apply them to the given *node*."""
return self._transform.visit(node)
@@ -134,7 +146,9 @@
# Call get_source_file() only after a cache miss,
# since it calls os.path.exists().
try:
- filepath = get_source_file(filepath, include_no_ext=True)
+ filepath = get_source_file(
+ filepath, include_no_ext=True, prefer_stubs=self.prefer_stubs
+ )
source = True
except NoSourceFile:
pass
@@ -200,6 +214,8 @@
# importing a module with the same name as the file that is importing
# we want to fallback on the import system to make sure we get the correct
# module.
+ if modname in self.module_denylist:
+ raise AstroidImportError(f"Skipping ignored module {modname!r}")
if modname in self.astroid_cache and use_cache:
return self.astroid_cache[modname]
if modname == "__main__":
@@ -305,7 +321,6 @@
modname.split("."), context_file=contextfile
)
except ImportError as e:
- # pylint: disable-next=redefined-variable-type
value = AstroidImportError(
"Failed to import module {modname} with error:\n{error}.",
modname=modname,
@@ -402,8 +417,7 @@
# take care, on living object __module__ is regularly wrong :(
modastroid = self.ast_from_module_name(modname)
if klass is obj:
- for inferred in modastroid.igetattr(name, context):
- yield inferred
+ yield from modastroid.igetattr(name, context)
else:
for inferred in modastroid.igetattr(name, context):
yield inferred.instantiate_class()
@@ -440,6 +454,7 @@
# pylint: disable=import-outside-toplevel
from astroid.brain.helpers import register_all_brains
from astroid.inference_tip import clear_inference_tip_cache
+ from astroid.interpreter._import.spec import _find_spec
from astroid.interpreter.objectmodel import ObjectModel
from astroid.nodes._base_nodes import LookupMixIn
from astroid.nodes.scoped_nodes import ClassDef
@@ -457,6 +472,7 @@
util.is_namespace,
ObjectModel.attributes,
ClassDef._metaclass_lookup_attribute,
+ _find_spec,
):
lru_cache.cache_clear() # type: ignore[attr-defined]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/modutils.py new/astroid-3.2.2/astroid/modutils.py
--- old/astroid-3.1.0/astroid/modutils.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/modutils.py 2024-05-20 00:21:03.000000000 +0200
@@ -45,9 +45,11 @@
if sys.platform.startswith("win"):
PY_SOURCE_EXTS = ("py", "pyw", "pyi")
+ PY_SOURCE_EXTS_STUBS_FIRST = ("pyi", "pyw", "py")
PY_COMPILED_EXTS = ("dll", "pyd")
else:
PY_SOURCE_EXTS = ("py", "pyi")
+ PY_SOURCE_EXTS_STUBS_FIRST = ("pyi", "py")
PY_COMPILED_EXTS = ("so",)
@@ -484,7 +486,9 @@
return files
-def get_source_file(filename: str, include_no_ext: bool = False) -> str:
+def get_source_file(
+ filename: str, include_no_ext: bool = False, prefer_stubs: bool = False
+) -> str:
"""Given a python module's file name return the matching source file
name (the filename will be returned identically if it's already an
absolute path to a python source file).
@@ -499,7 +503,7 @@
base, orig_ext = os.path.splitext(filename)
if orig_ext == ".pyi" and os.path.exists(f"{base}{orig_ext}"):
return f"{base}{orig_ext}"
- for ext in PY_SOURCE_EXTS:
+ for ext in PY_SOURCE_EXTS_STUBS_FIRST if prefer_stubs else PY_SOURCE_EXTS:
source_path = f"{base}.{ext}"
if os.path.exists(source_path):
return source_path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/nodes/scoped_nodes/scoped_nodes.py new/astroid-3.2.2/astroid/nodes/scoped_nodes/scoped_nodes.py
--- old/astroid-3.1.0/astroid/nodes/scoped_nodes/scoped_nodes.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/nodes/scoped_nodes/scoped_nodes.py 2024-05-20 00:21:03.000000000 +0200
@@ -2194,7 +2194,10 @@
and name in AstroidManager().builtins_module
)
if (
- any(node == base or base.parent_of(node) for base in self.bases)
+ any(
+ node == base or base.parent_of(node) and not self.type_params
+ for base in self.bases
+ )
or lookup_upper_frame
):
# Handle the case where we have either a name
@@ -2508,12 +2511,21 @@
# to the attribute happening *after* the attribute's definition (e.g. AugAssigns on lists)
if len(attributes) > 1:
first_attr, attributes = attributes[0], attributes[1:]
- first_scope = first_attr.scope()
+ first_scope = first_attr.parent.scope()
attributes = [first_attr] + [
attr
for attr in attributes
if attr.parent and attr.parent.scope() == first_scope
]
+ functions = [attr for attr in attributes if isinstance(attr, FunctionDef)]
+ if functions:
+ # Prefer only the last function, unless a property is involved.
+ last_function = functions[-1]
+ attributes = [
+ a
+ for a in attributes
+ if a not in functions or a is last_function or bases._is_property(a)
+ ]
for inferred in bases._infer_stmts(attributes, context, frame=self):
# yield Uninferable object instead of descriptors when necessary
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/protocols.py new/astroid-3.2.2/astroid/protocols.py
--- old/astroid-3.1.0/astroid/protocols.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/protocols.py 2024-05-20 00:21:03.000000000 +0200
@@ -924,8 +924,7 @@
context: InferenceContext | None = None,
assign_path: None = None,
) -> Generator[nodes.NodeNG, None, None]:
- """Return empty generator (return -> raises StopIteration) so inferred value
- is Uninferable.
+ """Hack. Return any Node so inference doesn't fail
+ when evaluating __class_getitem__. Revert if it's causing issues.
"""
- return
- yield
+ yield nodes.Const(None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/astroid/test_utils.py new/astroid-3.2.2/astroid/test_utils.py
--- old/astroid-3.1.0/astroid/test_utils.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/astroid/test_utils.py 2024-05-20 00:21:03.000000000 +0200
@@ -74,4 +74,5 @@
m._mod_file_cache = {}
m._transform = transforms.TransformVisitor()
m.extension_package_whitelist = set()
+ m.module_denylist = set()
return m
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/doc/conf.py new/astroid-3.2.2/doc/conf.py
--- old/astroid-3.1.0/doc/conf.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/doc/conf.py 2024-05-20 00:21:03.000000000 +0200
@@ -9,7 +9,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath("../../"))
+sys.path.insert(0, os.path.abspath(".."))
# -- General configuration -----------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/doc/requirements.txt new/astroid-3.2.2/doc/requirements.txt
--- old/astroid-3.1.0/doc/requirements.txt 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/doc/requirements.txt 2024-05-20 00:21:03.000000000 +0200
@@ -1,3 +1,3 @@
-e .
-sphinx~=7.2
-furo==2024.1.29
+sphinx~=7.3
+furo==2024.4.27
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/requirements_full.txt new/astroid-3.2.2/requirements_full.txt
--- old/astroid-3.1.0/requirements_full.txt 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/requirements_full.txt 2024-05-20 00:21:03.000000000 +0200
@@ -4,7 +4,7 @@
# Packages used to run additional tests
attrs
nose
-numpy>=1.17.0; python_version<"3.11"
+numpy>=1.17.0; python_version<"3.12"
python-dateutil
PyQt6
regex
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/requirements_minimal.txt new/astroid-3.2.2/requirements_minimal.txt
--- old/astroid-3.1.0/requirements_minimal.txt 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/requirements_minimal.txt 2024-05-20 00:21:03.000000000 +0200
@@ -3,6 +3,6 @@
tbump~=6.11
# Tools used to run tests
-coverage~=7.3
+coverage~=7.5
pytest
-pytest-cov~=4.1
+pytest-cov~=5.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tbump.toml new/astroid-3.2.2/tbump.toml
--- old/astroid-3.1.0/tbump.toml 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tbump.toml 2024-05-20 00:21:03.000000000 +0200
@@ -1,7 +1,7 @@
github_url = "https://github.com/pylint-dev/astroid"
[version]
-current = "3.1.0"
+current = "3.2.2"
regex = '''
^(?P<major>0|[1-9]\d*)
\.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/brain/test_attr.py new/astroid-3.2.2/tests/brain/test_attr.py
--- old/astroid-3.1.0/tests/brain/test_attr.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/brain/test_attr.py 2024-05-20 00:21:03.000000000 +0200
@@ -90,7 +90,7 @@
def test_attrs_transform(self) -> None:
"""Test brain for decorators of the 'attrs' package.
- Package added support for 'attrs' a long side 'attr' in v21.3.0.
+ Package added support for 'attrs' alongside 'attr' in v21.3.0.
See: https://github.com/python-attrs/attrs/releases/tag/21.3.0
"""
module = astroid.parse(
@@ -153,36 +153,12 @@
@frozen
class Legs:
d = attrs.field(default=attrs.Factory(dict))
-
- m = Legs(d=1)
- m.d['answer'] = 42
-
- @define
- class FooBar:
- d = attrs.field(default=attrs.Factory(dict))
-
- n = FooBar(d=1)
- n.d['answer'] = 42
-
- @mutable
- class BarFoo:
- d = attrs.field(default=attrs.Factory(dict))
-
- o = BarFoo(d=1)
- o.d['answer'] = 42
-
- @my_mutable
- class FooFoo:
- d = attrs.field(default=attrs.Factory(dict))
-
- p = FooFoo(d=1)
- p.d['answer'] = 42
"""
)
- for name in ("f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"):
+ for name in ("f", "g", "h", "i", "j", "k", "l"):
should_be_unknown = next(module.getattr(name)[0].infer()).getattr("d")[0]
- self.assertIsInstance(should_be_unknown, astroid.Unknown)
+ self.assertIsInstance(should_be_unknown, astroid.Unknown, name)
def test_special_attributes(self) -> None:
"""Make sure special attrs attributes exist"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/brain/test_brain.py new/astroid-3.2.2/tests/brain/test_brain.py
--- old/astroid-3.1.0/tests/brain/test_brain.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/brain/test_brain.py 2024-05-20 00:21:03.000000000 +0200
@@ -627,6 +627,24 @@
assert isinstance(inferred, nodes.ClassDef)
assert isinstance(inferred.getattr("__class_getitem__")[0], nodes.FunctionDef)
+ @test_utils.require_version(minver="3.12")
+ def test_typing_generic_subscriptable_pep695(self):
+ """Test class using type parameters is subscriptable with __class_getitem__ (added in PY312)"""
+ node = builder.extract_node(
+ """
+ class Foo[T]: ...
+ class Bar[T](Foo[T]): ...
+ """
+ )
+ inferred = next(node.infer())
+ assert isinstance(inferred, nodes.ClassDef)
+ assert inferred.name == "Bar"
+ assert isinstance(inferred.getattr("__class_getitem__")[0], nodes.FunctionDef)
+ ancestors = list(inferred.ancestors())
+ assert len(ancestors) == 2
+ assert ancestors[0].name == "Foo"
+ assert ancestors[1].name == "object"
+
@test_utils.require_version(minver="3.9")
def test_typing_annotated_subscriptable(self):
"""Test typing.Annotated is subscriptable with __class_getitem__"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/brain/test_six.py new/astroid-3.2.2/tests/brain/test_six.py
--- old/astroid-3.1.0/tests/brain/test_six.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/brain/test_six.py 2024-05-20 00:21:03.000000000 +0200
@@ -29,6 +29,8 @@
six.moves.urllib_parse #@
six.moves.urllib_error #@
six.moves.urllib.request #@
+ from six.moves import StringIO
+ StringIO #@
"""
)
assert isinstance(ast_nodes, list)
@@ -64,6 +66,18 @@
self.assertIsInstance(urlretrieve, nodes.FunctionDef)
self.assertEqual(urlretrieve.qname(), "urllib.request.urlretrieve")
+ StringIO = next(ast_nodes[4].infer())
+ self.assertIsInstance(StringIO, nodes.ClassDef)
+ self.assertEqual(StringIO.qname(), "_io.StringIO")
+ self.assertTrue(StringIO.callable())
+
+ def test_attribute_access_with_six_moves_imported(self) -> None:
+ astroid.MANAGER.clear_cache()
+ astroid.MANAGER._mod_file_cache.clear()
+ import six.moves # type: ignore[import] # pylint: disable=import-outside-toplevel,unused-import,redefined-outer-name
+
+ self.test_attribute_access()
+
def test_from_imports(self) -> None:
ast_node = builder.extract_node(
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/resources.py new/astroid-3.2.2/tests/resources.py
--- old/astroid-3.1.0/tests/resources.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/resources.py 2024-05-20 00:21:03.000000000 +0200
@@ -9,7 +9,6 @@
from pathlib import Path
from astroid import builder
-from astroid.manager import AstroidManager
from astroid.nodes.scoped_nodes import Module
DATA_DIR = Path("testdata") / "python3"
@@ -34,28 +33,3 @@
for key in list(sys.path_importer_cache):
if key.startswith(datadir):
del sys.path_importer_cache[key]
-
-
-class AstroidCacheSetupMixin:
- """Mixin for handling test isolation issues with the astroid cache.
-
- When clearing the astroid cache, some tests fail due to
- cache inconsistencies, where some objects had a different
- builtins object referenced.
- This saves the builtins module and TransformVisitor and
- replaces them after the tests finish.
- The builtins module is special, since some of the
- transforms for a couple of its objects (str, bytes etc)
- are executed only once, so astroid_bootstrapping will be
- useless for retrieving the original builtins module.
- """
-
- @classmethod
- def setup_class(cls):
- cls._builtins = AstroidManager().astroid_cache.get("builtins")
- cls._transforms = AstroidManager.brain["_transform"]
-
- @classmethod
- def teardown_class(cls):
- AstroidManager().astroid_cache["builtins"] = cls._builtins
- AstroidManager.brain["_transform"] = cls._transforms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/test_inference.py new/astroid-3.2.2/tests/test_inference.py
--- old/astroid-3.1.0/tests/test_inference.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/test_inference.py 2024-05-20 00:21:03.000000000 +0200
@@ -30,7 +30,7 @@
)
from astroid import decorators as decoratorsmod
from astroid.arguments import CallSite
-from astroid.bases import BoundMethod, Instance, UnboundMethod, UnionType
+from astroid.bases import BoundMethod, Generator, Instance, UnboundMethod, UnionType
from astroid.builder import AstroidBuilder, _extract_single_node, extract_node, parse
from astroid.const import IS_PYPY, PY39_PLUS, PY310_PLUS, PY312_PLUS
from astroid.context import CallContext, InferenceContext
@@ -4090,6 +4090,18 @@
inferred = next(node.infer())
self.assertRaises(InferenceError, next, inferred.infer_call_result(node))
+ def test_infer_call_result_same_proxied_class(self) -> None:
+ node = extract_node(
+ """
+ class A:
+ __call__ = A()
+ A() #@
+ """
+ )
+ inferred = next(node.infer())
+ fully_evaluated_inference_results = list(inferred.infer_call_result(node))
+ assert fully_evaluated_inference_results[0].name == "A"
+
def test_infer_call_result_with_metaclass(self) -> None:
node = extract_node("def with_metaclass(meta, *bases): return 42")
inferred = next(node.infer_call_result(caller=node))
@@ -4321,6 +4333,53 @@
assert isinstance(inferred, nodes.Const)
assert inferred.value == 123
+ def test_infer_method_empty_body(self) -> None:
+ # https://github.com/PyCQA/astroid/issues/1015
+ node = extract_node(
+ """
+ class A:
+ def foo(self): ...
+
+ A().foo() #@
+ """
+ )
+ inferred = next(node.infer())
+ assert isinstance(inferred, nodes.Const)
+ assert inferred.value is None
+
+ def test_infer_method_overload(self) -> None:
+ # https://github.com/PyCQA/astroid/issues/1015
+ node = extract_node(
+ """
+ class A:
+ def foo(self): ...
+
+ def foo(self):
+ yield
+
+ A().foo() #@
+ """
+ )
+ inferred = list(node.infer())
+ assert len(inferred) == 1
+ assert isinstance(inferred[0], Generator)
+
+ def test_infer_function_under_if(self) -> None:
+ node = extract_node(
+ """
+ if 1 in [1]:
+ def func():
+ return 42
+ else:
+ def func():
+ return False
+
+ func() #@
+ """
+ )
+ inferred = list(node.inferred())
+ assert [const.value for const in inferred] == [42, False]
+
def test_delayed_attributes_without_slots(self) -> None:
ast_node = extract_node(
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/test_manager.py new/astroid-3.2.2/tests/test_manager.py
--- old/astroid-3.1.0/tests/test_manager.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/test_manager.py 2024-05-20 00:21:03.000000000 +0200
@@ -36,12 +36,11 @@
return obj.__file__
-class AstroidManagerTest(
- resources.SysPathSetup, resources.AstroidCacheSetupMixin, unittest.TestCase
-):
+class AstroidManagerTest(resources.SysPathSetup, unittest.TestCase):
def setUp(self) -> None:
super().setUp()
self.manager = test_utils.brainless_manager()
+ self.manager.clear_cache()
def test_ast_from_file(self) -> None:
filepath = unittest.__file__
@@ -383,10 +382,18 @@
with pytest.raises(AstroidBuildingError):
self.manager.ast_from_module_name(None)
+ def test_denied_modules_raise(self) -> None:
+ self.manager.module_denylist.add("random")
+ with pytest.raises(AstroidImportError, match="random"):
+ self.manager.ast_from_module_name("random")
+ # and module not in the deny list shouldn't raise
+ self.manager.ast_from_module_name("math")
-class IsolatedAstroidManagerTest(resources.AstroidCacheSetupMixin, unittest.TestCase):
+
+class IsolatedAstroidManagerTest(unittest.TestCase):
def test_no_user_warning(self):
mgr = manager.AstroidManager()
+ self.addCleanup(mgr.clear_cache)
with warnings.catch_warnings():
warnings.filterwarnings("error", category=UserWarning)
mgr.ast_from_module_name("setuptools")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/test_modutils.py new/astroid-3.2.2/tests/test_modutils.py
--- old/astroid-3.1.0/tests/test_modutils.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/test_modutils.py 2024-05-20 00:21:03.000000000 +0200
@@ -41,6 +41,7 @@
package = "mypypa"
def tearDown(self) -> None:
+ astroid.MANAGER.clear_cache()
for k in list(sys.path_importer_cache):
if "MyPyPa" in k:
del sys.path_importer_cache[k]
@@ -290,11 +291,19 @@
def test_raise(self) -> None:
self.assertRaises(modutils.NoSourceFile, modutils.get_source_file, "whatever")
- def test_(self) -> None:
+ def test_pyi(self) -> None:
package = resources.find("pyi_data")
module = os.path.join(package, "__init__.pyi")
self.assertEqual(modutils.get_source_file(module), os.path.normpath(module))
+ def test_pyi_preferred(self) -> None:
+ package = resources.find("pyi_data/find_test")
+ module = os.path.join(package, "__init__.py")
+ self.assertEqual(
+ modutils.get_source_file(module, prefer_stubs=True),
+ os.path.normpath(module) + "i",
+ )
+
class IsStandardModuleTest(resources.SysPathSetup, unittest.TestCase):
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/test_protocols.py new/astroid-3.2.2/tests/test_protocols.py
--- old/astroid-3.1.0/tests/test_protocols.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/test_protocols.py 2024-05-20 00:21:03.000000000 +0200
@@ -425,7 +425,10 @@
assign_stmts = extract_node("type Point[T] = tuple[float, float]")
type_var: nodes.TypeVar = assign_stmts.type_params[0]
assigned = next(type_var.name.assigned_stmts())
- assert assigned is Uninferable
+ # Hack so inference doesn't fail when evaluating __class_getitem__
+ # Revert if it's causing issues.
+ assert isinstance(assigned, nodes.Const)
+ assert assigned.value is None
@staticmethod
def test_assigned_stmts_type_var_tuple():
@@ -433,7 +436,10 @@
assign_stmts = extract_node("type Alias[*Ts] = tuple[*Ts]")
type_var_tuple: nodes.TypeVarTuple = assign_stmts.type_params[0]
assigned = next(type_var_tuple.name.assigned_stmts())
- assert assigned is Uninferable
+ # Hack so inference doesn't fail when evaluating __class_getitem__
+ # Revert if it's causing issues.
+ assert isinstance(assigned, nodes.Const)
+ assert assigned.value is None
@staticmethod
def test_assigned_stmts_param_spec():
@@ -441,4 +447,7 @@
assign_stmts = extract_node("type Alias[**P] = Callable[P, int]")
param_spec: nodes.ParamSpec = assign_stmts.type_params[0]
assigned = next(param_spec.name.assigned_stmts())
- assert assigned is Uninferable
+ # Hack so inference doesn't fail when evaluating __class_getitem__
+ # Revert if it's causing issues.
+ assert isinstance(assigned, nodes.Const)
+ assert assigned.value is None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.1.0/tests/test_regrtest.py new/astroid-3.2.2/tests/test_regrtest.py
--- old/astroid-3.1.0/tests/test_regrtest.py 2024-02-23 17:01:03.000000000 +0100
+++ new/astroid-3.2.2/tests/test_regrtest.py 2024-05-20 00:21:03.000000000 +0200
@@ -26,10 +26,11 @@
HAS_NUMPY = True
-class NonRegressionTests(resources.AstroidCacheSetupMixin, unittest.TestCase):
+class NonRegressionTests(unittest.TestCase):
def setUp(self) -> None:
sys.path.insert(0, resources.find("data"))
MANAGER.always_load_extensions = True
+ self.addCleanup(MANAGER.clear_cache)
def tearDown(self) -> None:
MANAGER.always_load_extensions = False
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-validators for openSUSE:Factory checked in at 2024-07-05 19:45:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-validators (Old)
and /work/SRC/openSUSE:Factory/.python-validators.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-validators"
Fri Jul 5 19:45:07 2024 rev:25 rq:1185281 version:0.30.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-validators/python-validators.changes 2024-07-02 18:14:51.111910922 +0200
+++ /work/SRC/openSUSE:Factory/.python-validators.new.2080/python-validators.changes 2024-07-05 19:49:34.930849359 +0200
@@ -1,0 +2,8 @@
+Thu Jul 4 06:00:40 UTC 2024 - Mia Herkt <mia(a)0x0.st>
+
+- Update to 0.30.0
+Features:
+ * add validator for trx_addresses
+ gh#kvesteri/validators#384
+
+-------------------------------------------------------------------
Old:
----
validators-0.29.0.tar.gz
New:
----
validators-0.30.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-validators.spec ++++++
--- /var/tmp/diff_new_pack.INVNB3/_old 2024-07-05 19:49:36.426904367 +0200
+++ /var/tmp/diff_new_pack.INVNB3/_new 2024-07-05 19:49:36.426904367 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-validators
-Version: 0.29.0
+Version: 0.30.0
Release: 0
Summary: Python Data Validation
License: MIT
++++++ validators-0.29.0.tar.gz -> validators-0.30.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/CHANGES.md new/validators-0.30.0/CHANGES.md
--- old/validators-0.29.0/CHANGES.md 2024-07-01 17:21:40.000000000 +0200
+++ new/validators-0.30.0/CHANGES.md 2024-07-04 04:34:28.000000000 +0200
@@ -9,6 +9,24 @@
-->
+## 0.30.0 (2024-07-04)
+
+_**Breaking**_
+
+> No breaking changes were introduced in this version.
+
+_**Features**_
+
+- feat: add validator for trx addresses by @msamsami in [#384](https://github.com/python-validators/validators/pull/384)
+
+_**Maintenance**_
+
+- maint: bump version by @msamsami in [#384](https://github.com/python-validators/validators/pull/384)
+
+**Full Changelog**: [`0.29.0...0.30.0`](https://github.com/python-validators/validators/compare/0.29.0...0.30.0)
+
+---
+
## 0.29.0 (2024-07-01)
_**Breaking**_ ⚠️
@@ -25,6 +43,8 @@
**Full Changelog**: [`0.28.3...0.29.0`](https://github.com/python-validators/validators/compare/0.28.3...0.29.0)
+---
+
## 0.28.3 (2024-05-25)
_**Breaking**_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/PKG-INFO new/validators-0.30.0/PKG-INFO
--- old/validators-0.29.0/PKG-INFO 2024-07-01 17:22:44.121817600 +0200
+++ new/validators-0.30.0/PKG-INFO 2024-07-04 04:35:55.351689600 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: validators
-Version: 0.29.0
+Version: 0.30.0
Summary: Python Data Validation for Humans™
Author-email: Konsta Vesterinen <konsta(a)fastmonkeys.com>
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/docs/api/crypto_addresses.md new/validators-0.30.0/docs/api/crypto_addresses.md
--- old/validators-0.29.0/docs/api/crypto_addresses.md 2024-07-01 17:21:40.000000000 +0200
+++ new/validators-0.30.0/docs/api/crypto_addresses.md 2024-07-04 04:34:28.000000000 +0200
@@ -2,3 +2,4 @@
::: validators.crypto_addresses.btc_address
::: validators.crypto_addresses.eth_address
+::: validators.crypto_addresses.trx_address
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/docs/api/crypto_addresses.rst new/validators-0.30.0/docs/api/crypto_addresses.rst
--- old/validators-0.29.0/docs/api/crypto_addresses.rst 2024-07-01 17:22:40.000000000 +0200
+++ new/validators-0.30.0/docs/api/crypto_addresses.rst 2024-07-04 04:35:51.000000000 +0200
@@ -4,3 +4,4 @@
.. module:: validators.crypto_addresses
.. autofunction:: btc_address
.. autofunction:: eth_address
+.. autofunction:: trx_address
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/docs/validators.1 new/validators-0.30.0/docs/validators.1
--- old/validators-0.29.0/docs/validators.1 2024-07-01 17:22:41.000000000 +0200
+++ new/validators-0.30.0/docs/validators.1 2024-07-04 04:35:52.000000000 +0200
@@ -27,7 +27,7 @@
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.TH "VALIDATORS" "1" "Jul 01, 2024" "0.29.0" "validators"
+.TH "VALIDATORS" "1" "Jul 04, 2024" "0.30.0" "validators"
.SH NAME
validators \- Python Data Validation for Humans™
.sp
@@ -650,6 +650,36 @@
.TP
.B Return type
(Literal[True])
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B validators.crypto_addresses.trx_address(value: str, /)
+Return whether or not given value is a valid tron address.
+.sp
+Full validation is implemented for TRC20 tron addresses.
+.sp
+Examples
+.sp
+.nf
+.ft C
+>>> trx_address(\(aqTLjfbTbpZYDQ4EoA4N5CLNgGjfbF8ZWz38\(aq)
+# Output: True
+>>> trx_address(\(aqTR2G7Rm4vFqF8EpY4U5xdLdQ7XgJ2U8Vd\(aq)
+# Output: ValidationError(func=trx_address, args=...)
+.ft P
+.fi
+.INDENT 7.0
+.TP
+.B Parameters
+\fBvalue\fP \-\- Tron address string to validate.
+.TP
+.B Returns
+If \fIvalue\fP is a valid tron address.
+(ValidationError): If \fIvalue\fP is an invalid tron address.
+.TP
+.B Return type
+(Literal[True])
.UNINDENT
.UNINDENT
.SS domain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/src/validators/__init__.py new/validators-0.30.0/src/validators/__init__.py
--- old/validators-0.29.0/src/validators/__init__.py 2024-07-01 17:21:40.000000000 +0200
+++ new/validators-0.30.0/src/validators/__init__.py 2024-07-04 04:34:28.000000000 +0200
@@ -5,7 +5,7 @@
from .card import amex, card_number, diners, discover, jcb, mastercard, unionpay, visa
from .country import calling_code, country_code, currency
from .cron import cron
-from .crypto_addresses import btc_address, eth_address
+from .crypto_addresses import btc_address, eth_address, trx_address
from .domain import domain
from .email import email
from .encoding import base58, base64
@@ -39,6 +39,7 @@
# crypto_addresses
"btc_address",
"eth_address",
+ "trx_address",
# cards
"amex",
"card_number",
@@ -104,4 +105,4 @@
"validator",
)
-__version__ = "0.29.0"
+__version__ = "0.30.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/src/validators/crypto_addresses/__init__.py new/validators-0.30.0/src/validators/crypto_addresses/__init__.py
--- old/validators-0.29.0/src/validators/crypto_addresses/__init__.py 2024-07-01 17:21:40.000000000 +0200
+++ new/validators-0.30.0/src/validators/crypto_addresses/__init__.py 2024-07-04 04:34:28.000000000 +0200
@@ -3,5 +3,6 @@
# local
from .btc_address import btc_address
from .eth_address import eth_address
+from .trx_address import trx_address
-__all__ = ("btc_address", "eth_address")
+__all__ = ("btc_address", "eth_address", "trx_address")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/src/validators/crypto_addresses/trx_address.py new/validators-0.30.0/src/validators/crypto_addresses/trx_address.py
--- old/validators-0.29.0/src/validators/crypto_addresses/trx_address.py 1970-01-01 01:00:00.000000000 +0100
+++ new/validators-0.30.0/src/validators/crypto_addresses/trx_address.py 2024-07-04 04:34:28.000000000 +0200
@@ -0,0 +1,62 @@
+"""TRX Address."""
+
+# standard
+import hashlib
+import re
+
+# local
+from validators.utils import validator
+
+
+def _base58_decode(addr: str) -> bytes:
+ """Decode a base58 encoded address."""
+ alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
+ num = 0
+ for char in addr:
+ num = num * 58 + alphabet.index(char)
+ return num.to_bytes(25, byteorder="big")
+
+
+def _validate_trx_checksum_address(addr: str) -> bool:
+ """Validate TRX type checksum address."""
+ if len(addr) != 34:
+ return False
+
+ try:
+ address = _base58_decode(addr)
+ except ValueError:
+ return False
+
+ if len(address) != 25 or address[0] != 0x41:
+ return False
+
+ check_sum = hashlib.sha256(hashlib.sha256(address[:-4]).digest()).digest()[:4]
+ return address[-4:] == check_sum
+
+
+@validator
+def trx_address(value: str, /):
+ """Return whether or not given value is a valid tron address.
+
+ Full validation is implemented for TRC20 tron addresses.
+
+ Examples:
+ >>> trx_address('TLjfbTbpZYDQ4EoA4N5CLNgGjfbF8ZWz38')
+ # Output: True
+ >>> trx_address('TR2G7Rm4vFqF8EpY4U5xdLdQ7XgJ2U8Vd')
+ # Output: ValidationError(func=trx_address, args=...)
+
+ Args:
+ value:
+ Tron address string to validate.
+
+ Returns:
+ (Literal[True]): If `value` is a valid tron address.
+ (ValidationError): If `value` is an invalid tron address.
+ """
+ if not value:
+ return False
+
+ return re.compile(r"^[T][a-km-zA-HJ-NP-Z1-9]{33}$").match(
+ value
+ ) and _validate_trx_checksum_address(value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/src/validators.egg-info/PKG-INFO new/validators-0.30.0/src/validators.egg-info/PKG-INFO
--- old/validators-0.29.0/src/validators.egg-info/PKG-INFO 2024-07-01 17:22:44.000000000 +0200
+++ new/validators-0.30.0/src/validators.egg-info/PKG-INFO 2024-07-04 04:35:55.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: validators
-Version: 0.29.0
+Version: 0.30.0
Summary: Python Data Validation for Humans™
Author-email: Konsta Vesterinen <konsta(a)fastmonkeys.com>
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/src/validators.egg-info/SOURCES.txt new/validators-0.30.0/src/validators.egg-info/SOURCES.txt
--- old/validators-0.29.0/src/validators.egg-info/SOURCES.txt 2024-07-01 17:22:44.000000000 +0200
+++ new/validators-0.30.0/src/validators.egg-info/SOURCES.txt 2024-07-04 04:35:55.000000000 +0200
@@ -84,6 +84,7 @@
src/validators/crypto_addresses/__init__.py
src/validators/crypto_addresses/btc_address.py
src/validators/crypto_addresses/eth_address.py
+src/validators/crypto_addresses/trx_address.py
src/validators/i18n/__init__.py
src/validators/i18n/es.py
src/validators/i18n/fi.py
@@ -110,6 +111,7 @@
tests/test_validation_failure.py
tests/crypto_addresses/test_btc_address.py
tests/crypto_addresses/test_eth_address.py
+tests/crypto_addresses/test_trx_address.py
tests/i18n/test_es.py
tests/i18n/test_fi.py
tests/i18n/test_fr.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.29.0/tests/crypto_addresses/test_trx_address.py new/validators-0.30.0/tests/crypto_addresses/test_trx_address.py
--- old/validators-0.29.0/tests/crypto_addresses/test_trx_address.py 1970-01-01 01:00:00.000000000 +0100
+++ new/validators-0.30.0/tests/crypto_addresses/test_trx_address.py 2024-07-04 04:34:28.000000000 +0200
@@ -0,0 +1,54 @@
+"""Test TRX address."""
+
+# external
+import pytest
+
+# local
+from validators import ValidationError, trx_address
+
+
+(a)pytest.mark.parametrize(
+ "value",
+ [
+ "TLjfbTbpZYDQ4EoA4N5CLNgGjfbF8ZWz38",
+ "TDQ6C92wuNqvMWE967sMptCFaXq77uj1PF",
+ "TFuGbxCQGSL4oLnJzVsen844LDwFbrUY4e",
+ "TFAPKADDRhkSe3v27CsR8TZSjN8eJ8ycDK",
+ "TSJHywLNva2MNjCD5iYfn5QAKD9Rk5Ncit",
+ "TEi1qhi5LuTicg1u9oAstyXCSf5uibSyqo",
+ "TAGvx5An6VBeHTu91cQwdABNcAYMRPcP4n",
+ "TXbE5tXTejqT3Q47sYKCDb9NJDm3xrFpab",
+ "TMTxQWNuWHXvHcYXc5D1wQhFmZFJijAxcG",
+ "TPHgw9E8QYM3esNWih5KVnUVpUHwLTPfpA",
+ "TFFLtBTi9jdaGwV3hznjCmPYaJme5AeqwU",
+ "TC74QG8tbtixG5Raa4fEifywgjrFs45fNz",
+ ],
+)
+def test_returns_true_on_valid_trx_address(value: str):
+ """Test returns true on valid trx address."""
+ assert trx_address(value)
+
+
+(a)pytest.mark.parametrize(
+ "value",
+ [
+ "T12345678901234567890123456789012345",
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678",
+ "TR2G7Rm4vFqF8EpY4U5xdLdQ7XgJ2U8Vd",
+ "TP6ah2v5mdsj8Z3hGz1yDMvDq7BzEbK8o",
+ "TQmmhp6uz2Xre8yL3FsPYZyo4mhtw4vg4XX",
+ "TQNy2C6VHJPk4P32bsEX3QSGx2Qqm4J2k9",
+ "TP6ah2v5mdsj8Z3hGz1yDMvDq7BzEbK8oN",
+ "TSTVdfU1x4L7K3Bc3v5C28Gp2J1rPyeL3f",
+ "THPByuCzvU5QER9j2NC2mUQ2JPyRCam4e7",
+ "TW5eZqUZgdW4rxFKAKsc2ryJbfFA94WXvD",
+ "TR2G7Rm4vFqF8EpY4U5xdLdQ7XgJ2U8Vdd",
+ "tQmmhp6uz2Xre8yL3FsPYZyo4mhtw4vg4X",
+ "TR2G7Rm4vFqF8EpY4U5xdLdQ7Xg",
+ "TQmmhp6uz2Xre8yL3FsPYZyo4mhtw4vg4x",
+ "my-trox-address.trx",
+ ],
+)
+def test_returns_failed_validation_on_invalid_trx_address(value: str):
+ """Test returns failed validation on invalid trx address."""
+ assert isinstance(trx_address(value), ValidationError)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-rdflib for openSUSE:Factory checked in at 2024-07-05 19:45:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rdflib (Old)
and /work/SRC/openSUSE:Factory/.python-rdflib.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rdflib"
Fri Jul 5 19:45:05 2024 rev:30 rq:1185182 version:7.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rdflib/python-rdflib.changes 2023-12-15 21:46:41.780871740 +0100
+++ /work/SRC/openSUSE:Factory/.python-rdflib.new.2080/python-rdflib.changes 2024-07-05 19:49:28.850625795 +0200
@@ -1,0 +2,33 @@
+Wed Jul 3 11:44:54 UTC 2024 - Daniel Garcia <daniel.garcia(a)suse.com>
+
+- Create doc subpackage with _multibuild to move
+ python3-sphnix-autodoc-typehints build requirement out of ring1
+
+-------------------------------------------------------------------
+Tue Feb 27 06:23:55 UTC 2024 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Update to 7.0.0:
+ * BREAKING CHANGE: drop support for python 3.7 (#2436)
+ * feat: add curie method to NamespaceManager (#2365)
+ * feat: add optional target_graph argument to Graph.cbd and use it for
+ DESCRIBE queries (#2322)
+ * feat: Don't generate prefixes for unknown URIs (#2467)
+ * feat: Longturtle improvements (#2500)
+ * fix: SPARQL count with optionals (#2448)
+ * fix: GROUP_CONCAT handling of empty separator (issue) (#2474)
+ * fix: add NORMALIZE_LITERALS to rdflib.__all__ (#2489)
+ * fix: correct imports and __all__ (#2340)
+ * fix: dbpedia URL to use https instead of http (#2444)
+ * fix: eliminate bare except: (#2350)
+ * fix: eliminate some mutable default arguments in SPARQL code (#2301)
+ * fix: formatting of SequencePath and AlternativePath (#2504)
+ * fix: handling of rdf:HTML literals (#2490)
+ * fix: HTTP 308 Permanent Redirect status code handling (#2389)
+ * fix: lexical-to-value mapping of rdf:HTML literals (#2483)
+ * fix: TriG handling of GRAPH keyword without a graph ID (#2469)
+ * fix: TriG parser error handling for nested graphs (#2468)
+- Switch to autosetup and pyproject macros.
+- Shift docs build to the install phase, the module needs to be queryable.
+- Drop patch reproducible.patch, included.
+
+-------------------------------------------------------------------
Old:
----
rdflib-6.1.1.tar.gz
reproducible.patch
New:
----
_multibuild
rdflib-7.0.0.tar.gz
BETA DEBUG BEGIN:
Old:- Shift docs build to the install phase, the module needs to be queryable.
- Drop patch reproducible.patch, included.
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rdflib.spec ++++++
--- /var/tmp/diff_new_pack.Ic7DR7/_old 2024-07-05 19:49:29.450647858 +0200
+++ /var/tmp/diff_new_pack.Ic7DR7/_new 2024-07-05 19:49:29.450647858 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-rdflib
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,86 +16,107 @@
#
-%{?!python_module:%define python_module() python3-%{**}}
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "doc"
+%bcond_without doc
+%define psuffix -doc
+%else
+%bcond_with doc
+%define psuffix %{nil}
+%endif
+
# Tests don't work and cause a dependency loop with python-SPARQLWrapper
%bcond_with tests
-Name: python-rdflib
-Version: 6.1.1
+Name: python-rdflib%{psuffix}
+Version: 7.0.0
Release: 0
Summary: A Python library for working with RDF
License: BSD-3-Clause
URL: http://rdflib.net/
Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.t…
-Patch0: reproducible.patch
-BuildRequires: %{python_module html5lib}
-BuildRequires: %{python_module isodate}
-BuildRequires: %{python_module pyparsing}
-BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module xml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-BuildRequires: python3-Sphinx
-BuildRequires: python3-sphinxcontrib-apidoc
-Requires: python-html5lib
-Requires: python-isodate
-Requires: python-pyparsing
Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
BuildArch: noarch
+
%if %{with tests}
BuildRequires: %{python_module SPARQLWrapper}
BuildRequires: %{python_module flake8}
BuildRequires: %{python_module pytest}
%endif
-%python_subpackages
-%description
-RDFLib is a Python library for working with RDF, a simple yet powerful
-language for representing information. The library contains an RDF/XML
-parser/serializer that conforms to the RDF/XML Syntax Specification (Revised).
-The library also contains both in-memory and persistent Graph backends.
-
-%package -n %{name}-doc
-Summary: A Python library for working with RDF
+%if %{with doc}
+BuildRequires: %{python_module rdflib = %{version}}
+BuildRequires: python3-Sphinx
+BuildRequires: python3-myst-parser
+BuildRequires: python3-sphinx-autodoc-typehints
+BuildRequires: python3-sphinxcontrib-apidoc
Provides: %{python_module rdflib-doc = %{version}}
+%else
+BuildRequires: %{python_module base >= 3.8}
+BuildRequires: %{python_module html5lib}
+BuildRequires: %{python_module isodate}
+BuildRequires: %{python_module pip}
+BuildRequires: %{python_module poetry-core}
+BuildRequires: %{python_module pyparsing}
+BuildRequires: %{python_module wheel}
+BuildRequires: %{python_module xml}
+Requires: python-html5lib
+Requires: python-isodate
+Requires: python-pyparsing
+%python_subpackages
+%endif
-%description -n %{name}-doc
+%description
RDFLib is a Python library for working with RDF, a simple yet powerful
language for representing information. The library contains an RDF/XML
parser/serializer that conforms to the RDF/XML Syntax Specification (Revised).
The library also contains both in-memory and persistent Graph backends.
%prep
-%setup -q -n rdflib-%{version}
-%patch0 -p1
+%autosetup -p1 -n rdflib-%{version}
# remove unwanted shebang
find rdflib -name "*.py" | xargs sed -i '1 { /^#!/ d }'
+chmod -x rdflib/plugins/parsers/notation3.py
+%if %{without doc}
%build
-%python_build
+%pyproject_wheel
+%endif
+%install
+%if %{with doc}
+# Build the docs, we need the module queryable
pushd docs
-%make_build html
+PYTHONPATH=%{buildroot}%{python3_sitelib} %make_build html
+
# Remove hidden file
rm -r _build/html/.buildinfo
popd
+%fdupes docs/_build/html
+%else
-%install
-%python_install
+%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/rdfs2dot
%python_clone -a %{buildroot}%{_bindir}/rdfpipe
%python_clone -a %{buildroot}%{_bindir}/rdfgraphisomorphism
%python_clone -a %{buildroot}%{_bindir}/rdf2dot
%python_clone -a %{buildroot}%{_bindir}/csv2rdf
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-
-%fdupes docs/_build/html
+%endif
%if %{with tests}
%check
%pytest
%endif
+%if %{with doc}
+%files -n %{name}
+%doc docs/_build/html
+
+%else
+
%post
%python_install_alternative rdfs2dot
%python_install_alternative rdfpipe
@@ -112,15 +133,13 @@
%files %{python_files}
%license LICENSE
-%doc CHANGELOG.md CONTRIBUTORS README.md
+%doc README.md
%python_alternative %{_bindir}/csv2rdf
%python_alternative %{_bindir}/rdf2dot
%python_alternative %{_bindir}/rdfgraphisomorphism
%python_alternative %{_bindir}/rdfpipe
%python_alternative %{_bindir}/rdfs2dot
-%{python_sitelib}/rdflib/
-%{python_sitelib}/rdflib-%{version}-py*.egg-info
-
-%files -n %{name}-doc
-%doc docs/_build/html
+%{python_sitelib}/rdflib
+%{python_sitelib}/rdflib-%{version}.dist-info
+%endif
++++++ _multibuild ++++++
<multibuild>
<package>doc</package>
</multibuild>
++++++ rdflib-6.1.1.tar.gz -> rdflib-7.0.0.tar.gz ++++++
++++ 1006112 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package Mesa for openSUSE:Factory checked in at 2024-07-05 19:45:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/Mesa (Old)
and /work/SRC/openSUSE:Factory/.Mesa.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "Mesa"
Fri Jul 5 19:45:02 2024 rev:512 rq:1185393 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/Mesa/Mesa.changes 2024-06-29 15:17:06.399525067 +0200
+++ /work/SRC/openSUSE:Factory/.Mesa.new.2080/Mesa.changes 2024-07-05 19:49:25.454500924 +0200
@@ -1,0 +2,17 @@
+Thu Jul 4 12:26:06 UTC 2024 - Stefan Dirsch <sndirsch(a)suse.com>
+
+- Update to bugfix release 24.1.3
+ --> https://docs.mesa3d.org/relnotes/24.1.3
+- supersedes the following patches:
+ * u_dri-Fix-BGR-format-exclusion.patch
+ * u_egl-gbm-Enable-RGBA-configs.patch
+ * u_egl-surfaceless-Enable-RGBA-configs.patch
+ * boo1226725-test-fix1.patch
+
+-------------------------------------------------------------------
+Thu Jul 4 09:47:12 UTC 2024 - Stefan Dirsch <sndirsch(a)suse.com>
+
+- use gcc-13 on SLE 15/Leap 15.x in order to fix build; credits
+ go to "Friedrich Haubensak" <hsk17(a)mail.de> to figure this out!
+
+-------------------------------------------------------------------
@@ -6 +23 @@
-- re-enabled patchtes only applied on s390x with previous change
+- re-enabled patches only applied on s390x with previous change
Old:
----
boo1226725-test-fix1.patch
mesa-24.1.2.tar.xz
mesa-24.1.2.tar.xz.sig
u_dri-Fix-BGR-format-exclusion.patch
u_egl-gbm-Enable-RGBA-configs.patch
u_egl-surfaceless-Enable-RGBA-configs.patch
New:
----
mesa-24.1.3.tar.xz
mesa-24.1.3.tar.xz.sig
BETA DEBUG BEGIN:
Old: * u_egl-surfaceless-Enable-RGBA-configs.patch
* boo1226725-test-fix1.patch
Old:- supersedes the following patches:
* u_dri-Fix-BGR-format-exclusion.patch
* u_egl-gbm-Enable-RGBA-configs.patch
Old: * u_dri-Fix-BGR-format-exclusion.patch
* u_egl-gbm-Enable-RGBA-configs.patch
* u_egl-surfaceless-Enable-RGBA-configs.patch
Old: * u_egl-gbm-Enable-RGBA-configs.patch
* u_egl-surfaceless-Enable-RGBA-configs.patch
* boo1226725-test-fix1.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ Mesa.spec ++++++
--- /var/tmp/diff_new_pack.bPmEhW/_old 2024-07-05 19:49:28.534614177 +0200
+++ /var/tmp/diff_new_pack.bPmEhW/_new 2024-07-05 19:49:28.534614177 +0200
@@ -1,5 +1,5 @@
#
-# spec file
+# spec file for package Mesa
#
# Copyright (c) 2024 SUSE LLC
#
@@ -42,7 +42,7 @@
%define glamor 1
%define _name_archive mesa
-%define _version 24.1.2
+%define _version 24.1.3
%define with_opencl 0
%define with_rusticl 0
%define with_vulkan 0
@@ -145,7 +145,7 @@
%global _paste_crate_ver 1.0.14
Name: Mesa%{psuffix}
-Version: 24.1.2
+Version: 24.1.3
Release: 0
Summary: System for rendering 3-D graphics
License: MIT
@@ -183,10 +183,6 @@
Patch58: u_dep_xcb.patch
Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
Patch400: n_stop-iris-flicker.patch
-Patch500: u_dri-Fix-BGR-format-exclusion.patch
-Patch501: u_egl-gbm-Enable-RGBA-configs.patch
-Patch502: u_egl-surfaceless-Enable-RGBA-configs.patch
-Patch503: boo1226725-test-fix1.patch
%ifarch %{ix86} x86_64
BuildRequires: DirectX-Headers
%endif
@@ -195,7 +191,7 @@
BuildRequires: fdupes
BuildRequires: flex
%if 0%{?sle_version} >= 150400
-BuildRequires: gcc12-c++
+BuildRequires: gcc13-c++
%else
BuildRequires: gcc-c++
%endif
@@ -841,10 +837,6 @@
%patch -P 58 -p1
%patch -P 100 -p1
%patch -P 400 -p1
-%patch -P 500 -p1
-%patch -P 501 -p1
-%patch -P 502 -p1
-%patch -P 503 -p1
# Remove requires to vulkan libs from baselibs.conf on platforms
# where vulkan build is disabled; ugly ...
@@ -859,8 +851,8 @@
%limit_build -m 1024
%endif
%if 0%{?sle_version} >= 150400
-export CC=gcc-12
-export CXX=g++-12
+export CC=gcc-13
+export CXX=g++-13
%endif
egl_platforms=x11,wayland
++++++ mesa-24.1.2.tar.xz -> mesa-24.1.3.tar.xz ++++++
/work/SRC/openSUSE:Factory/Mesa/mesa-24.1.2.tar.xz /work/SRC/openSUSE:Factory/.Mesa.new.2080/mesa-24.1.3.tar.xz differ: char 26, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package toolbox for openSUSE:Factory checked in at 2024-07-05 19:45:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/toolbox (Old)
and /work/SRC/openSUSE:Factory/.toolbox.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "toolbox"
Fri Jul 5 19:45:01 2024 rev:26 rq:1185366 version:2.3+git20240704.84ec25e
Changes:
--------
--- /work/SRC/openSUSE:Factory/toolbox/toolbox.changes 2023-10-30 22:09:56.950365741 +0100
+++ /work/SRC/openSUSE:Factory/.toolbox.new.2080/toolbox.changes 2024-07-05 19:49:22.942408557 +0200
@@ -1,0 +2,6 @@
+Thu Jul 04 09:45:43 UTC 2024 - kukuk(a)suse.com
+
+- Update to version 2.3+git20240704.84ec25e:
+ * toolbox: use correct container state tense in msg
+
+-------------------------------------------------------------------
Old:
----
microos-toolbox-2.3+git20231030.3a6ef35.tar.xz
New:
----
microos-toolbox-2.3+git20240704.84ec25e.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ toolbox.spec ++++++
--- /var/tmp/diff_new_pack.zjE4mo/_old 2024-07-05 19:49:23.638434149 +0200
+++ /var/tmp/diff_new_pack.zjE4mo/_new 2024-07-05 19:49:23.642434297 +0200
@@ -1,7 +1,7 @@
#
# spec file for package toolbox
#
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: toolbox
-Version: 2.3+git20231030.3a6ef35
+Version: 2.3+git20240704.84ec25e
Release: 0
Summary: Script to start a toolbox container for system debugging
License: Apache-2.0
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.zjE4mo/_old 2024-07-05 19:49:23.682435767 +0200
+++ /var/tmp/diff_new_pack.zjE4mo/_new 2024-07-05 19:49:23.686435915 +0200
@@ -1,7 +1,7 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/openSUSE/microos-toolbox.git</param>
- <param name="changesrevision">3a6ef35d392295752584e7e888c4469b53eed7ee</param>
+ <param name="changesrevision">84ec25e7dd2f6c0677c5e91d8de7f9dbc4e9fa19</param>
</service>
</servicedata>
(No newline at EOF)
++++++ microos-toolbox-2.3+git20231030.3a6ef35.tar.xz -> microos-toolbox-2.3+git20240704.84ec25e.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/microos-toolbox-2.3+git20231030.3a6ef35/toolbox new/microos-toolbox-2.3+git20240704.84ec25e/toolbox
--- old/microos-toolbox-2.3+git20231030.3a6ef35/toolbox 2023-10-30 14:37:45.000000000 +0100
+++ new/microos-toolbox-2.3+git20240704.84ec25e/toolbox 2024-07-04 11:44:56.000000000 +0200
@@ -47,7 +47,7 @@
}
create() {
- local msg="create"
+ local msg="created"
if ! container_exists; then
if ! image_exists || [ -z "$NO_PULL" ]; then
image_pull
@@ -68,7 +68,7 @@
else
echo "Container '$TOOLBOX_NAME' already exists. Trying to start..."
echo "(To remove the container and start with a fresh toolbox, run: $CLI rm '$TOOLBOX_NAME')"
- msg="start"
+ msg="started"
fi
local state
@@ -115,7 +115,7 @@
${SUDO} $CLI exec --user root "${TOOLBOX_NAME}" rm "${tmp_user_setup}"
fi
- echo "Container ${msg}ed."
+ echo "Container ${msg}."
}
run() {
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package texlive-specs-z for openSUSE:Factory checked in at 2024-07-05 19:44:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texlive-specs-z (Old)
and /work/SRC/openSUSE:Factory/.texlive-specs-z.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texlive-specs-z"
Fri Jul 5 19:44:45 2024 rev:52 rq:1185321 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/texlive-specs-z/texlive-specs-z.changes 2024-03-22 15:27:55.241043614 +0100
+++ /work/SRC/openSUSE:Factory/.texlive-specs-z.new.2080/texlive-specs-z.changes 2024-07-05 19:48:47.321098799 +0200
@@ -1,0 +2,10 @@
+Wed Jul 3 08:09:23 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- More fine tuning to catch all python3 shebangs
+
+-------------------------------------------------------------------
+Thu Jun 27 13:38:11 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- Add fix for bug boo#1212476 -- fix python shebang
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ texlive-specs-z.spec ++++++
--- /var/tmp/diff_new_pack.kHSdAz/_old 2024-07-05 19:48:54.493362517 +0200
+++ /var/tmp/diff_new_pack.kHSdAz/_new 2024-07-05 19:48:54.505362957 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package texlive-specs-z.spec.new
+# spec file for package texlive-specs-z.spec
#
# Copyright (c) 2024 SUSE LLC
#
@@ -14,12 +14,14 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+##### WARNING: Please do not edit this auto generated spec file.
+#
%define texlive_version 2024
%define texlive_previous 2022
%define texlive_release 20240311
-%define texlive_noarch 213
+%define texlive_noarch 216
%define biber_version 2.19
#!BuildIgnore: texlive
@@ -55,6 +57,10 @@
%define _x11inc %{_includedir}
%define _appdefdir %{_x11data}/app-defaults
+%if ! %{defined python3_bin_suffix}
+%global python3_bin_suffix 3
+%endif
+
Name: texlive-specs-z
Version: 2024
Release: 0
@@ -43576,10 +43582,10 @@
%{_texmfdistdir}/doc/fonts/xcharter/altone.py
do
test -e %{buildroot}/$scr || continue
- head -n 1 %{buildroot}/$scr | grep -q python3 && continue
+ head -n 1 %{buildroot}/$scr | grep -q python%python3_bin_suffix && continue
ed %{buildroot}/${scr} <<-'EOF'
1
- s@python@python3@
+ s@python[23]\?[^\s]*@python%python3_bin_suffix@
.
w
q
@@ -43739,7 +43745,7 @@
ed %{buildroot}/${scr} <<-'EOF'
1
i
- #! /usr/bin/python3
+ #! /usr/bin/python%python3_bin_suffix
.
w
q
@@ -43752,10 +43758,10 @@
%{_texmfdistdir}/doc/xelatex/xepersian/unldk-0.2.py
do
test -e %{buildroot}/$scr || continue
- head -n 1 %{buildroot}/$scr | grep -q python3 && continue
+ head -n 1 %{buildroot}/$scr | grep -q python%python3_bin_suffix && continue
ed %{buildroot}/${scr} <<-'EOF'
1
- s@python@python3@
+ s@python[23]\?[^\s]*@python%python3_bin_suffix@
.
w
q
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package texlive-specs-v for openSUSE:Factory checked in at 2024-07-05 19:44:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texlive-specs-v (Old)
and /work/SRC/openSUSE:Factory/.texlive-specs-v.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texlive-specs-v"
Fri Jul 5 19:44:41 2024 rev:57 rq:1185317 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/texlive-specs-v/texlive-specs-v.changes 2024-03-22 15:26:17.713457926 +0100
+++ /work/SRC/openSUSE:Factory/.texlive-specs-v.new.2080/texlive-specs-v.changes 2024-07-05 19:48:01.675420457 +0200
@@ -1,0 +2,10 @@
+Wed Jul 3 08:09:23 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- More fine tuning to catch all python3 shebangs
+
+-------------------------------------------------------------------
+Thu Jun 27 13:38:11 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- Add fix for bug boo#1212476 -- fix python shebang
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ texlive-specs-v.spec ++++++
--- /var/tmp/diff_new_pack.l26PMo/_old 2024-07-05 19:48:09.027690792 +0200
+++ /var/tmp/diff_new_pack.l26PMo/_new 2024-07-05 19:48:09.039691233 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package texlive-specs-v.spec.new
+# spec file for package texlive-specs-v.spec
#
# Copyright (c) 2024 SUSE LLC
#
@@ -14,12 +14,14 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+##### WARNING: Please do not edit this auto generated spec file.
+#
%define texlive_version 2024
%define texlive_previous 2022
%define texlive_release 20240311
-%define texlive_noarch 213
+%define texlive_noarch 216
%define biber_version 2.19
#!BuildIgnore: texlive
@@ -55,6 +57,10 @@
%define _x11inc %{_includedir}
%define _appdefdir %{_x11data}/app-defaults
+%if ! %{defined python3_bin_suffix}
+%global python3_bin_suffix 3
+%endif
+
Name: texlive-specs-v
Version: 2024
Release: 0
@@ -27752,6 +27758,18 @@
done
tar --use-compress-program=xz -xf %{S:61} -C %{buildroot}%{_datadir}/texlive/texmf-dist
tar --use-compress-program=xz -xf %{S:62} -C %{buildroot}%{_datadir}/texlive/texmf-dist
+ # Extend python3 scripts with major version only if any
+ for scr in %{_texmfdistdir}/doc/latex/songproj/song2tex.py
+ do
+ test -e %{buildroot}/$scr || continue
+ ed %{buildroot}/${scr} <<-'EOF'
+ 1
+ s@python3@python%python3_bin_suffix@
+ .
+ w
+ q
+ EOF
+ done
# Avoid /usr/bin/env <prog>
for scr in %{_texmfdistdir}/doc/latex/songproj/song2tex.py
do
@@ -28103,6 +28121,18 @@
tar --use-compress-program=xz -xf %{S:104} -C %{buildroot}%{_datadir}/texlive/texmf-dist
tar --use-compress-program=xz -xf %{S:105} -C %{buildroot}%{_datadir}/texlive
tar --use-compress-program=xz -xf %{S:106} -C %{buildroot}%{_datadir}/texlive
+ # Extend python3 scripts with major version only if any
+ for scr in %{_texmfdistdir}/scripts/spix/spix.py
+ do
+ test -e %{buildroot}/$scr || continue
+ ed %{buildroot}/${scr} <<-'EOF'
+ 1
+ s@python3@python%python3_bin_suffix@
+ .
+ w
+ q
+ EOF
+ done
# Avoid /usr/bin/env <prog>
for scr in %{_texmfdistdir}/scripts/spix/spix.py
do
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package texlive-specs-u for openSUSE:Factory checked in at 2024-07-05 19:44:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texlive-specs-u (Old)
and /work/SRC/openSUSE:Factory/.texlive-specs-u.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texlive-specs-u"
Fri Jul 5 19:44:39 2024 rev:53 rq:1185316 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/texlive-specs-u/texlive-specs-u.changes 2024-03-22 15:26:06.485045103 +0100
+++ /work/SRC/openSUSE:Factory/.texlive-specs-u.new.2080/texlive-specs-u.changes 2024-07-05 19:47:51.935062872 +0200
@@ -1,0 +2,10 @@
+Wed Jul 3 08:09:23 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- More fine tuning to catch all python3 shebangs
+
+-------------------------------------------------------------------
+Thu Jun 27 13:38:11 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- Add fix for bug boo#1212476 -- fix python shebang
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ texlive-specs-u.spec ++++++
--- /var/tmp/diff_new_pack.cg451W/_old 2024-07-05 19:47:59.979358095 +0200
+++ /var/tmp/diff_new_pack.cg451W/_new 2024-07-05 19:47:59.995358683 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package texlive-specs-u.spec.new
+# spec file for package texlive-specs-u.spec
#
# Copyright (c) 2024 SUSE LLC
#
@@ -14,12 +14,14 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+##### WARNING: Please do not edit this auto generated spec file.
+#
%define texlive_version 2024
%define texlive_previous 2022
%define texlive_release 20240311
-%define texlive_noarch 213
+%define texlive_noarch 216
%define biber_version 2.19
#!BuildIgnore: texlive
@@ -55,6 +57,10 @@
%define _x11inc %{_includedir}
%define _appdefdir %{_x11data}/app-defaults
+%if ! %{defined python3_bin_suffix}
+%global python3_bin_suffix 3
+%endif
+
Name: texlive-specs-u
Version: 2024
Release: 0
@@ -20528,10 +20534,10 @@
for scr in %{_texmfdistdir}/doc/latex/scanpages/replicate.py
do
test -e %{buildroot}/$scr || continue
- head -n 1 %{buildroot}/$scr | grep -q python3 && continue
+ head -n 1 %{buildroot}/$scr | grep -q python%python3_bin_suffix && continue
ed %{buildroot}/${scr} <<-'EOF'
1
- s@python@python3@
+ s@python[23]\?[^\s]*@python%python3_bin_suffix@
.
w
q
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package texlive-specs-q for openSUSE:Factory checked in at 2024-07-05 19:44:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texlive-specs-q (Old)
and /work/SRC/openSUSE:Factory/.texlive-specs-q.new.2080 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texlive-specs-q"
Fri Jul 5 19:44:35 2024 rev:54 rq:1185312 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/texlive-specs-q/texlive-specs-q.changes 2024-03-22 15:24:51.614292413 +0100
+++ /work/SRC/openSUSE:Factory/.texlive-specs-q.new.2080/texlive-specs-q.changes 2024-07-05 19:47:01.921227786 +0200
@@ -1,0 +2,10 @@
+Wed Jul 3 08:09:23 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- More fine tuning to catch all python3 shebangs
+
+-------------------------------------------------------------------
+Thu Jun 27 13:38:11 UTC 2024 - Dr. Werner Fink <werner(a)suse.de>
+
+- Add fix for bug boo#1212476 -- fix python shebang
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ texlive-specs-q.spec ++++++
--- /var/tmp/diff_new_pack.nlTe5I/_old 2024-07-05 19:47:11.649584733 +0200
+++ /var/tmp/diff_new_pack.nlTe5I/_new 2024-07-05 19:47:11.661585174 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package texlive-specs-q.spec.new
+# spec file for package texlive-specs-q.spec
#
# Copyright (c) 2024 SUSE LLC
#
@@ -14,12 +14,14 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+##### WARNING: Please do not edit this auto generated spec file.
+#
%define texlive_version 2024
%define texlive_previous 2022
%define texlive_release 20240311
-%define texlive_noarch 213
+%define texlive_noarch 216
%define biber_version 2.19
#!BuildIgnore: texlive
@@ -55,6 +57,10 @@
%define _x11inc %{_includedir}
%define _appdefdir %{_x11data}/app-defaults
+%if ! %{defined python3_bin_suffix}
+%global python3_bin_suffix 3
+%endif
+
Name: texlive-specs-q
Version: 2024
Release: 0
@@ -42165,6 +42171,19 @@
pushd %{buildroot}%{_datadir}/texlive/texmf-dist
patch --reject-format=unified --quoting-style=literal -f -p1 -F0 -T < %{S:57}
popd
+ # Correct shebang of python3 scripts if any
+ for scr in %{_texmfdistdir}/doc/latex/newcommand/newcommand.py
+ do
+ test -e %{buildroot}/$scr || continue
+ head -n 1 %{buildroot}/$scr | grep -q python%python3_bin_suffix && continue
+ ed %{buildroot}/${scr} <<-'EOF'
+ 1
+ s@python[23]\?[^\s]*@python%python3_bin_suffix@
+ .
+ w
+ q
+ EOF
+ done
# Make possible scripts usable if any
for scr in %{_texmfdistdir}/doc/latex/newcommand/newcommand.py
do
@@ -43099,6 +43118,18 @@
tar --use-compress-program=xz -xf %{S:275} -C %{buildroot}%{_datadir}/texlive/texmf-dist
tar --use-compress-program=xz -xf %{S:276} -C %{buildroot}%{_datadir}/texlive/texmf-dist
tar --use-compress-program=xz -xf %{S:277} -C %{buildroot}%{_datadir}/texlive/texmf-dist
+ # Extend python3 scripts with major version only if any
+ for scr in %{_texmfdistdir}/doc/luatex/opbible/txs-gen/maketxs.py
+ do
+ test -e %{buildroot}/$scr || continue
+ ed %{buildroot}/${scr} <<-'EOF'
+ 1
+ s@python3@python%python3_bin_suffix@
+ .
+ w
+ q
+ EOF
+ done
# Strip executable bit from non-scripts
for txt in %{_texmfdistdir}/doc/luatex/opbible/txs-gen/mod2tex
do
@@ -43169,6 +43200,18 @@
tar --use-compress-program=xz -xf %{S:289} -C %{buildroot}%{_datadir}/texlive
tar --use-compress-program=xz -xf %{S:290} -C %{buildroot}%{_datadir}/texlive
tar --use-compress-program=xz -xf %{S:291} -C %{buildroot}%{_datadir}/texlive
+ # Extend python3 scripts with major version only if any
+ for scr in %{_texmfdistdir}/scripts/optexcount/optexcount
+ do
+ test -e %{buildroot}/$scr || continue
+ ed %{buildroot}/${scr} <<-'EOF'
+ 1
+ s@python3@python%python3_bin_suffix@
+ .
+ w
+ q
+ EOF
+ done
# Avoid /usr/bin/env <prog>
for scr in %{_texmfdistdir}/scripts/optexcount/optexcount
do
1
0