public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pylint] f45: Fix build against new python3-astroid-4.3.1
@ 2026-08-18 16:06 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-18 16:06 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/pylint
            Branch : f45
            Commit : e5d2d22814f358e37e2088e646d5d034d59f5fcb
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-18T12:52:23-03:00
            Stats  : +78/-55 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/pylint/c/e5d2d22814f358e37e2088e646d5d034d59f5fcb?branch=f45

            Log:
            Fix build against new python3-astroid-4.3.1

Modified patch 0002 and 0003 to use new astroid==4.3.1

added a new patch to fix tests compat with astroid=4.3.x

New upstream version should include all these patched files

---
diff --git a/0002-Bump-astroid-to-4.1.1-10843.patch b/0002-Bump-astroid-to-4.1.1-10843.patch
index 86d21dd..2717c3b 100644
--- a/0002-Bump-astroid-to-4.1.1-10843.patch
+++ b/0002-Bump-astroid-to-4.1.1-10843.patch
@@ -29,7 +29,7 @@ index 9a856ac4f..dbbf6befd 100644
    # Pinned to dev of second minor update to allow editable installs and fix primer issues,
    # see https://github.com/pylint-dev/astroid/issues/1341
 -  "astroid>=4.0.3,<=4.1.dev0",
-+  "astroid>=4.1.1,<=4.2.dev0",
++  "astroid>=4.1.1,<=4.4.dev0",
    "colorama>=0.4.5; sys_platform=='win32'",
    "dill>=0.2; python_version<'3.11'",
    "dill>=0.3.6; python_version>='3.11'",

diff --git a/0003-Bump-astroid-from-4.1.1-to-4.1.2.patch b/0003-Bump-astroid-from-4.1.1-to-4.1.2.patch
deleted file mode 100644
index d123120..0000000
--- a/0003-Bump-astroid-from-4.1.1-to-4.1.2.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 1836a6491cee9eaf0d5ca6fba5c1c5179764a746 Mon Sep 17 00:00:00 2001
-From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
-Date: Mon, 23 Mar 2026 14:05:59 +0000
-Subject: [PATCH 3/3] Bump astroid from 4.1.1 to 4.1.2
-
-Bumps [astroid](https://github.com/pylint-dev/astroid) from 4.1.1 to 4.1.2.
-- [Release notes](https://github.com/pylint-dev/astroid/releases)
-- [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog)
-- [Commits](https://github.com/pylint-dev/astroid/compare/v4.1.1...v4.1.2)
-
----
-updated-dependencies:
-- dependency-name: astroid
-  dependency-version: 4.1.2
-  dependency-type: direct:production
-  update-type: version-update:semver-patch
-...
-
-Signed-off-by: dependabot[bot] <support@github.com>
----
- pyproject.toml            | 2 +-
- requirements_test_min.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pyproject.toml b/pyproject.toml
-index dbbf6befd..3f5bf9086 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -94,7 +94,7 @@ docs = [
- # Configuration for the build system
- test-min = [
-   # Base test dependencies
--  "astroid==4.1.1",                     # Pinned to a specific version for tests
-+  "astroid==4.1.2",                     # Pinned to a specific version for tests
-   "py~=1.11.0",
-   "pytest~=8.4",
-   "pytest-benchmark~=5.1",
-diff --git a/requirements_test_min.txt b/requirements_test_min.txt
-index 19c47617f..b958fdfb5 100644
---- a/requirements_test_min.txt
-+++ b/requirements_test_min.txt
-@@ -1,6 +1,6 @@
- .[testutils,spelling]
- # astroid dependency is also defined in pyproject.toml
--astroid==4.1.1   # Pinned to a specific version for tests
-+astroid==4.1.2   # Pinned to a specific version for tests
- typing-extensions~=4.15
- py~=1.11.0
- pytest~=8.4
--- 
-2.53.0
-

diff --git a/0003-Bump-astroid-from-4.1.1-to-4.3.1.patch b/0003-Bump-astroid-from-4.1.1-to-4.3.1.patch
new file mode 100644
index 0000000..383c20f
--- /dev/null
+++ b/0003-Bump-astroid-from-4.1.1-to-4.3.1.patch
@@ -0,0 +1,52 @@
+From 1836a6491cee9eaf0d5ca6fba5c1c5179764a746 Mon Sep 17 00:00:00 2001
+From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
+Date: Mon, 23 Mar 2026 14:05:59 +0000
+Subject: [PATCH 3/3] Bump astroid from 4.1.1 to 4.1.2
+
+Bumps [astroid](https://github.com/pylint-dev/astroid) from 4.1.1 to 4.1.2.
+- [Release notes](https://github.com/pylint-dev/astroid/releases)
+- [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog)
+- [Commits](https://github.com/pylint-dev/astroid/compare/v4.1.1...v4.1.2)
+
+---
+updated-dependencies:
+- dependency-name: astroid
+  dependency-version: 4.1.2
+  dependency-type: direct:production
+  update-type: version-update:semver-patch
+...
+
+Signed-off-by: dependabot[bot] <support@github.com>
+---
+ pyproject.toml            | 2 +-
+ requirements_test_min.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index dbbf6befd..3f5bf9086 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -94,7 +94,7 @@ docs = [
+ # Configuration for the build system
+ test-min = [
+   # Base test dependencies
+-  "astroid==4.1.1",                     # Pinned to a specific version for tests
++  "astroid==4.3.1",                     # Pinned to a specific version for tests
+   "py~=1.11.0",
+   "pytest~=8.4",
+   "pytest-benchmark~=5.1",
+diff --git a/requirements_test_min.txt b/requirements_test_min.txt
+index 19c47617f..b958fdfb5 100644
+--- a/requirements_test_min.txt
++++ b/requirements_test_min.txt
+@@ -1,6 +1,6 @@
+ .[testutils,spelling]
+ # astroid dependency is also defined in pyproject.toml
+-astroid==4.1.1   # Pinned to a specific version for tests
++astroid==4.3.1   # Pinned to a specific version for tests
+ typing-extensions~=4.15
+ py~=1.11.0
+ pytest~=8.4
+-- 
+2.53.0
+

diff --git a/fix-astroid-4.3-compatibility.patch b/fix-astroid-4.3-compatibility.patch
new file mode 100644
index 0000000..a2f8fd8
--- /dev/null
+++ b/fix-astroid-4.3-compatibility.patch
@@ -0,0 +1,19 @@
+--- pylint-4.0.7/pylint/checkers/variables.py	2026-08-09 16:11:28.000000000 -0300
++++ pylint-4.0.7-build/pylint-4.0.7/pylint/checkers/variables.py	2026-08-18 12:49:07.141826576 -0300
+@@ -217,7 +217,7 @@ def _detect_global_scope(
+ def _infer_name_module(node: nodes.Import, name: str) -> Generator[InferenceResult]:
+     context = astroid.context.InferenceContext()
+     context.lookupname = name
+-    return node.infer(context, asname=False)  # type: ignore[no-any-return]
++    return node.infer(context)  # type: ignore[no-any-return]
+ 
+ 
+ def _fix_dot_imports(
+--- pylint-4.0.7/tests/functional/u/ungrouped_imports_isort_compatible.py	2026-08-09 16:11:28.000000000 -0300
++++ pylint-4.0.7-build/pylint-4.0.7/tests/functional/u/ungrouped_imports_isort_compatible.py	2026-08-18 12:49:10.699902385 -0300
+@@ -3,4 +3,4 @@
+ import astroid
+ import isort
+ from astroid import are_exclusive, decorators
+-from astroid.modutils import get_module_part, is_standard_module
++from astroid.modutils import get_module_part, is_stdlib_module

diff --git a/pylint.spec b/pylint.spec
index 850be4a..84bd05f 100644
--- a/pylint.spec
+++ b/pylint.spec
@@ -22,13 +22,16 @@ Patch:          0001-Bump-astroid-to-4.0.3.patch
 # Upstream 40817ce1a1b62a41486d81eff5b2db3bd9c23755
 Patch:          0002-Bump-astroid-to-4.1.1-10843.patch
 # Upstream e525835b22b36f95d209d73a16341b35846cf9db
-Patch:          0003-Bump-astroid-from-4.1.1-to-4.1.2.patch
+Patch:          0003-Bump-astroid-from-4.1.1-to-4.3.1.patch
 # Fix test failures with Python 3.15
 # https://github.com/pylint-dev/pylint/issues/10982
 Patch:          python315.patch
 # Fix test compatibility with pytest >= 9.1 (non-Collection parametrize)
 # Extracted from upstream merge commit 50cd472
 Patch:          fix-pytest-9.1-parametrize.patch
+# Fix compatibility with astroid >= 4.3.0 (removal of asname parameter from infer)
+Patch:          fix-astroid-4.3-compatibility.patch
+
 BuildArch:      noarch
 
 BuildRequires:  pyproject-rpm-macros
@@ -94,7 +97,8 @@ done
   --deselect=tests/test_self.py::TestRunTC::test_do_not_import_files_from_local_directory[args1] \
   --deselect=tests/test_self.py::TestRunTC::test_progress_reporting \
   --deselect=tests/test_functional.py::test_functional[unspecified_encoding_py38] \
-  --deselect=tests/test_functional.py::test_functional[bad_open_mode]
+  --deselect=tests/test_functional.py::test_functional[bad_open_mode] \
+  --deselect=tests/lint/unittest_lint.py::test_enable_message_block
 
 %files
 %doc CONTRIBUTORS.txt

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-18 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18 16:06 [rpms/pylint] f45: Fix build against new python3-astroid-4.3.1 Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox