Subject: CVS commit: pkgsrc/devel/py-astroid
From: Adam Ciarcinski
Date: 2023-10-09 19:38:30
Message id: 20231009173830.B6754FADC@cvs.NetBSD.org

Log Message:
py-astroid: updated to 3.0.0

What's New in astroid 3.0.0?
=============================

* Add support for Python 3.12, including PEP 695 type parameter syntax.

* Remove support for Python 3.7.

* Use the global inference cache when inferring, even without an explicit
  ``InferenceContext``. This is a significant performance improvement given how
  often methods default to ``None`` for the context argument. (Linting ``astroid``
  itself now takes ~5% less time on Python 3.12; other projects requiring more
  complex inference calculations will see greater speedups.)

* Following a deprecation period starting in astroid 2.7.0, the \ 
``astroid.node_classes``
  and ``astroid.scoped_nodes`` modules have been removed in favor of \ 
``astroid.nodes.node_classes``
  and ``astroid.nodes.scoped_nodes``.

* Following a deprecation period starting in astroid 2.12.0, the \ 
``astroid.mixins`` module
  has been removed in favor of ``astroid.nodes._base_nodes`` (private).

* Return all existing arguments when calling ``Arguments.arguments()``. This \ 
also means ``find_argname`` will now
  use the whole list of arguments for its search.

* Exclude class attributes from the ``__members__`` container of an ``Enum`` \ 
class when they are
  ``nodes.AnnAssign`` nodes with no assigned value.

* Remove ``@cached`` and ``@cachedproperty`` decorator (just use \ 
``@cached_property`` from the stdlib).

* Remove the ``inference`` module. Node inference methods are now in the module
  defining the node, rather than being associated to the node afterward.

* Move ``LookupMixIn`` to ``astroid.nodes._base_nodes`` and make it private.

* Remove the shims for ``OperationError``, ``BinaryOperationError``, and \ 
``UnaryOperationError``
  in ``exceptions``. They were moved to ``util`` in astroid 1.5.0.

* Move ``safe_infer()`` from ``helpers`` to ``util``. This avoids some circular \ 
imports.

* Reduce file system access in ``ast_from_file()``.

* Reduce time to ``import astroid`` by delaying ``astroid_bootstrapping()`` until
  the first instantiation of ``AstroidBuilder``.

* Make ``igetattr()`` idempotent. This addresses some reports of varying results
  when running pylint with ``--jobs``.

* Fix incorrect cache keys for inference results, thereby correctly inferring types
  for calls instantiating types dynamically.

* Fix interrupted ``InferenceContext`` call chains, thereby addressing performance
  problems when linting ``sqlalchemy``.

* ``nodes.FunctionDef`` no longer inherits from ``nodes.Lambda``.
  This is a breaking change but considered a bug fix as the nodes did not share \ 
the same
  API and were not interchangeable.

  We have tried to minimize the amount of breaking changes caused by this change
  but some are unavoidable.

* ``infer_call_result`` now shares the same interface across all \ 
implementations. Namely:
  ```python
  def infer_call_result(
                self,
                caller: SuccessfulInferenceResult | None,
                context: InferenceContext | None = None,
            ) -> Iterator[InferenceResult]:
  ```

  This is a breaking change for ``nodes.FunctionDef`` where previously \ 
``caller`` had a default of
  ``None``. Passing ``None`` again will not create a behaviour change.
  The breaking change allows us to better type and re-use the method within \ 
``astroid``.

* Improved signature of the ``__init__`` and ``__postinit__`` methods of most nodes.
  This includes making ``lineno``, ``col_offset``, ``end_lineno``, \ 
``end_col_offset`` and ``parent``
  required arguments for ``nodes.NodeNG`` and its subclasses.
  For most other nodes, arguments of their ``__postinit__`` methods have been \ 
made required to better
  represent how they would normally be constructed by the standard library \ 
``ast`` module.

Files:
RevisionActionfile
1.81modifypkgsrc/devel/py-astroid/Makefile
1.23modifypkgsrc/devel/py-astroid/PLIST
1.72modifypkgsrc/devel/py-astroid/distinfo