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 2022-10-14 15:40:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-astroid (Old) and /work/SRC/openSUSE:Factory/.python-astroid.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-astroid" Fri Oct 14 15:40:09 2022 rev:38 rq:1010535 version:2.12.11 Changes: -------- --- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes 2022-09-25 15:34:33.931516349 +0200 +++ /work/SRC/openSUSE:Factory/.python-astroid.new.2275/python-astroid.changes 2022-10-14 15:40:12.723685232 +0200 @@ -1,0 +2,7 @@ +Thu Oct 13 19:31:55 UTC 2022 - Dirk M??ller <[email protected]> + +- update to 2.12.11: + * Improve detection of namespace packages for the modules with ``__spec__`` + set to None. + +------------------------------------------------------------------- Old: ---- astroid-2.12.10-gh.tar.gz New: ---- astroid-2.12.11-gh.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-astroid.spec ++++++ --- /var/tmp/diff_new_pack.Luj73o/_old 2022-10-14 15:40:15.695690195 +0200 +++ /var/tmp/diff_new_pack.Luj73o/_new 2022-10-14 15:40:15.727690248 +0200 @@ -17,7 +17,7 @@ Name: python-astroid -Version: 2.12.10 +Version: 2.12.11 Release: 0 Summary: Representation of Python source as an AST for pylint License: LGPL-2.1-or-later ++++++ astroid-2.12.10-gh.tar.gz -> astroid-2.12.11-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/CONTRIBUTORS.txt new/astroid-2.12.11/CONTRIBUTORS.txt --- old/astroid-2.12.10/CONTRIBUTORS.txt 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/CONTRIBUTORS.txt 2022-10-10 13:58:08.000000000 +0200 @@ -23,6 +23,7 @@ - ??ukasz Rogalski <[email protected]> - Florian Bruhin <[email protected]> - Ashley Whetter <[email protected]> +- Mark Byrne <[email protected]> - Dimitri Prybysh <[email protected]> - Areveny <[email protected]> @@ -39,7 +40,6 @@ - David Gilman <[email protected]> - Julien Jehannet <[email protected]> - Calen Pennington <[email protected]> -- Mark Byrne <[email protected]> - Tim Martin <[email protected]> - Phil Schaf <[email protected]> - Hugo van Kemenade <[email protected]> @@ -111,6 +111,7 @@ - Stanislav Levin <[email protected]> - Simon Hewitt <[email protected]> - Serhiy Storchaka <[email protected]> +- Saugat Pachhai (???????????????) <[email protected]> - Roy Wright <[email protected]> - Robin Jarry <[email protected]> - Ren?? Fritze <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/ChangeLog new/astroid-2.12.11/ChangeLog --- old/astroid-2.12.10/ChangeLog 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/ChangeLog 2022-10-10 13:58:08.000000000 +0200 @@ -7,13 +7,27 @@ Release date: TBA +* Add ``_value2member_map_`` member to the ``enum`` brain. -What's New in astroid 2.12.11? + Refs PyCQA/pylint#3941 + +* Improve detection of namespace packages for the modules with ``__spec__`` set to None. + + Closes PyCQA/pylint#7488. + + +What's New in astroid 2.12.12? ============================== Release date: TBA +What's New in astroid 2.12.11? +============================== +Release date: 2022-10-10 + + + What's New in astroid 2.12.10? ============================== Release date: 2022-09-17 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/astroid/__pkginfo__.py new/astroid-2.12.11/astroid/__pkginfo__.py --- old/astroid-2.12.10/astroid/__pkginfo__.py 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/astroid/__pkginfo__.py 2022-10-10 13:58:08.000000000 +0200 @@ -2,5 +2,5 @@ # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt -__version__ = "2.12.10" +__version__ = "2.12.11" version = __version__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/astroid/brain/brain_namedtuple_enum.py new/astroid-2.12.11/astroid/brain/brain_namedtuple_enum.py --- old/astroid-2.12.10/astroid/brain/brain_namedtuple_enum.py 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/astroid/brain/brain_namedtuple_enum.py 2022-10-10 13:58:08.000000000 +0200 @@ -425,6 +425,10 @@ new_targets.append(fake.instantiate_class()) dunder_members[local] = fake node.locals[local] = new_targets + + # The undocumented `_value2member_map_` member: + node.locals["_value2member_map_"] = [nodes.Dict(parent=node)] + members = nodes.Dict(parent=node) members.postinit( [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/astroid/interpreter/_import/util.py new/astroid-2.12.11/astroid/interpreter/_import/util.py --- old/astroid-2.12.10/astroid/interpreter/_import/util.py 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/astroid/interpreter/_import/util.py 2022-10-10 13:58:08.000000000 +0200 @@ -52,8 +52,11 @@ # Check first fragment of modname, e.g. "astroid", not "astroid.interpreter" # because of cffi's behavior # See: https://github.com/PyCQA/astroid/issues/1776 + mod = sys.modules[processed_components[0]] return ( - sys.modules[processed_components[0]].__spec__ is None + mod.__spec__ is None + and getattr(mod, "__file__", None) is None + and hasattr(mod, "__path__") and not IS_PYPY ) except KeyError: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/script/.contributors_aliases.json new/astroid-2.12.11/script/.contributors_aliases.json --- old/astroid-2.12.10/script/.contributors_aliases.json 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/script/.contributors_aliases.json 2022-10-10 13:58:08.000000000 +0200 @@ -62,6 +62,11 @@ "name": "Dimitri Prybysh", "team": "Maintainers" }, + "[email protected]": { + "mails": ["[email protected]", "[email protected]"], + "name": "Mark Byrne", + "team": "Maintainers" + }, "[email protected]": { "mails": ["[email protected]", "[email protected]"], "name": "David Euresti" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/tbump.toml new/astroid-2.12.11/tbump.toml --- old/astroid-2.12.10/tbump.toml 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/tbump.toml 2022-10-10 13:58:08.000000000 +0200 @@ -1,7 +1,7 @@ github_url = "https://github.com/PyCQA/astroid" [version] -current = "2.12.10" +current = "2.12.11" regex = ''' ^(?P<major>0|[1-9]\d*) \. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/tests/unittest_manager.py new/astroid-2.12.11/tests/unittest_manager.py --- old/astroid-2.12.10/tests/unittest_manager.py 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/tests/unittest_manager.py 2022-10-10 13:58:08.000000000 +0200 @@ -144,6 +144,15 @@ finally: astroid_module.__spec__ = original_spec + def test_module_unexpectedly_spec_is_none(self) -> None: + astroid_module = sys.modules["astroid"] + original_spec = astroid_module.__spec__ + astroid_module.__spec__ = None + try: + self.assertFalse(util.is_namespace("astroid")) + finally: + astroid_module.__spec__ = original_spec + def test_implicit_namespace_package(self) -> None: data_dir = os.path.dirname(resources.find("data/namespace_pep_420")) contribute = os.path.join(data_dir, "contribute_to_namespace") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-2.12.10/tests/unittest_scoped_nodes.py new/astroid-2.12.11/tests/unittest_scoped_nodes.py --- old/astroid-2.12.10/tests/unittest_scoped_nodes.py 2022-09-17 18:37:39.000000000 +0200 +++ new/astroid-2.12.11/tests/unittest_scoped_nodes.py 2022-10-10 13:58:08.000000000 +0200 @@ -2534,6 +2534,21 @@ assert inferred_member_value.value is None +def test_enums_value2member_map_() -> None: + """Check the `_value2member_map_` member is present in an Enum class""" + node = builder.extract_node( + """ + from enum import Enum + class Veg(Enum): + TOMATO: 1 + + Veg + """ + ) + inferred_class = node.inferred()[0] + assert "_value2member_map_" in inferred_class.locals + + @pytest.mark.parametrize("annotation, value", [("int", 42), ("bytes", b"")]) def test_enums_type_annotation_non_str_member(annotation, value) -> None: """A type-annotated member of an Enum class where:
