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 2023-12-28 22:54:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-astroid (Old) and /work/SRC/openSUSE:Factory/.python-astroid.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astroid" Thu Dec 28 22:54:32 2023 rev:49 rq:1135253 version:3.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes 2023-10-19 22:49:38.951501925 +0200 +++ /work/SRC/openSUSE:Factory/.python-astroid.new.28375/python-astroid.changes 2023-12-28 22:54:37.971465939 +0100 @@ -1,0 +2,9 @@ +Wed Dec 27 09:42:24 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 3.0.2: + * Avoid duplicate inference results for some uses of + ``typing.X`` constructs like ``Tuple[Optional[int], ...]``. + This was causing pylint to occasionally omit messages like + ``deprecated-typing-alias``. + +------------------------------------------------------------------- Old: ---- astroid-3.0.1-gh.tar.gz New: ---- astroid-3.0.2-gh.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-astroid.spec ++++++ --- /var/tmp/diff_new_pack.Uh2mej/_old 2023-12-28 22:54:38.623489742 +0100 +++ /var/tmp/diff_new_pack.Uh2mej/_new 2023-12-28 22:54:38.623489742 +0100 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-astroid -Version: 3.0.1 +Version: 3.0.2 Release: 0 Summary: Representation of Python source as an AST for pylint License: LGPL-2.1-or-later ++++++ astroid-3.0.1-gh.tar.gz -> astroid-3.0.2-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.0.1/ChangeLog new/astroid-3.0.2/ChangeLog --- old/astroid-3.0.1/ChangeLog 2023-10-16 02:52:02.000000000 +0200 +++ new/astroid-3.0.2/ChangeLog 2023-12-12 13:43:18.000000000 +0100 @@ -9,12 +9,23 @@ -What's New in astroid 3.0.2? +What's New in astroid 3.0.3? ============================ Release date: TBA +What's New in astroid 3.0.2? +============================ +Release date: 2023-12-12 + +* Avoid duplicate inference results for some uses of ``typing.X`` constructs like + ``Tuple[Optional[int], ...]``. This was causing pylint to occasionally omit + messages like ``deprecated-typing-alias``. + + Closes pylint-dev/pylint#9220 + + What's New in astroid 3.0.1? ============================ Release date: 2023-10-15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.0.1/astroid/__pkginfo__.py new/astroid-3.0.2/astroid/__pkginfo__.py --- old/astroid-3.0.1/astroid/__pkginfo__.py 2023-10-16 02:52:02.000000000 +0200 +++ new/astroid-3.0.2/astroid/__pkginfo__.py 2023-12-12 13:43:18.000000000 +0100 @@ -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.0.1" +__version__ = "3.0.2" version = __version__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.0.1/astroid/brain/brain_typing.py new/astroid-3.0.2/astroid/brain/brain_typing.py --- old/astroid-3.0.1/astroid/brain/brain_typing.py 2023-10-16 02:52:02.000000000 +0200 +++ new/astroid-3.0.2/astroid/brain/brain_typing.py 2023-12-12 13:43:18.000000000 +0100 @@ -188,6 +188,8 @@ cache = node.parent.__cache # type: ignore[attr-defined] # Unrecognized getattr if cache.get(node.parent.slots) is not None: del cache[node.parent.slots] + # Avoid re-instantiating this class every time it's seen + node._explicit_inference = lambda node, context: iter([value]) return iter([value]) node = extract_node(TYPING_TYPE_TEMPLATE.format(value.qname().split(".")[-1])) @@ -393,6 +395,8 @@ class_def.postinit(bases=[res], body=[], decorators=None) func_to_add = _extract_single_node(CLASS_GETITEM_TEMPLATE) class_def.locals["__class_getitem__"] = [func_to_add] + # Avoid re-instantiating this class every time it's seen + node._explicit_inference = lambda node, context: iter([class_def]) return iter([class_def]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.0.1/astroid/const.py new/astroid-3.0.2/astroid/const.py --- old/astroid-3.0.1/astroid/const.py 2023-10-16 02:52:02.000000000 +0200 +++ new/astroid-3.0.2/astroid/const.py 2023-12-12 13:43:18.000000000 +0100 @@ -10,6 +10,7 @@ PY310_PLUS = sys.version_info >= (3, 10) PY311_PLUS = sys.version_info >= (3, 11) PY312_PLUS = sys.version_info >= (3, 12) +PY313_PLUS = sys.version_info >= (3, 13) WIN32 = sys.platform == "win32" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.0.1/tbump.toml new/astroid-3.0.2/tbump.toml --- old/astroid-3.0.1/tbump.toml 2023-10-16 02:52:02.000000000 +0200 +++ new/astroid-3.0.2/tbump.toml 2023-12-12 13:43:18.000000000 +0100 @@ -1,7 +1,7 @@ github_url = "https://github.com/pylint-dev/astroid" [version] -current = "3.0.1" +current = "3.0.2" regex = ''' ^(?P<major>0|[1-9]\d*) \. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-3.0.1/tests/brain/test_brain.py new/astroid-3.0.2/tests/brain/test_brain.py --- old/astroid-3.0.1/tests/brain/test_brain.py 2023-10-16 02:52:02.000000000 +0200 +++ new/astroid-3.0.2/tests/brain/test_brain.py 2023-12-12 13:43:18.000000000 +0100 @@ -15,7 +15,7 @@ from astroid import MANAGER, builder, nodes, objects, test_utils, util from astroid.bases import Instance from astroid.brain.brain_namedtuple_enum import _get_namedtuple_fields -from astroid.const import PY312_PLUS +from astroid.const import PY312_PLUS, PY313_PLUS from astroid.exceptions import ( AttributeInferenceError, InferenceError, @@ -668,6 +668,16 @@ ) assert len(node.inferred()) == 1 + @test_utils.require_version(minver="3.9") + def test_typing_no_duplicates_2(self): + node = builder.extract_node( + """ + from typing import Optional, Tuple + Tuple[Optional[int], ...] + """ + ) + assert len(node.inferred()) == 1 + def test_collections_generic_alias_slots(self): """Test slots for a class which is a subclass of a generic alias type.""" node = builder.extract_node( @@ -1976,6 +1986,7 @@ assert strerror.value == "" +@pytest.mark.skipif(PY313_PLUS, reason="Python >= 3.13 no longer has a crypt module") def test_crypt_brain() -> None: module = MANAGER.ast_from_module_name("crypt") dynamic_attrs = [