Changelog
### 5.1.0
```
Added a function `decoratorx` using the `FunctionMaker` and thus
preserving the signature of `__code__` objects. Then fixed three small bugs:
- Sphinx was printing a few warnings when building the documentation, as
signaled by Tomasz Kłoczko
- functions decorated with `decorator.contextmanager` were one-shot,
as discovered by Alex Pizarro.
- `decorator.decorator` was not passing the kwsyntax argument.
```
### 5.0.9
```
Fixed a test breaking PyPy. Restored support for Sphinx.
```
### 5.0.8
```
Made the decorator module more robust when decorating builtin functions
lacking dunder attributes, like `dict.__setitem__`.
```
### 5.0.7
```
The decorator module was not passing correctly the defaults inside the
`*args` tuple, thanks to Dan Shult for the fix. Also fixed some mispellings
in the documentation and integrated codespell in the CI, thanks to
Christian Clauss.
```
### 5.0.6
```
The decorator module was not copying the __module__ attribute anymore.
Thanks to Nikolay Markov for the notice.
```
### 5.0.5
```
Dropped support for Python < 3.5 with a substantial simplification of
the code base (now building a decorator does not require calling "exec").
Added a way to mimic functools.wraps-generated decorators.
Ported the Continuous Integration from Travis to GitHub.
```
### 4.4.2
```
Sylvan Mosberger (https://github.com/Infinisil) contributed a patch to
some doctests that were breaking on NixOS.
John Vandenberg (https://github.com/jayvdb) made a case for removing the usage
of `__file__`, that was breaking PyOxidizer.
Miro Hrončok (https://github.com/hroncok) contributed some fixes for the
future Python 3.9.
Hugo van Kemenade (https://github.com/hugovk) contributed some fixes for the
future Python 3.10.
```
### 4.4.1
```
Changed the description to "Decorators for Humans" are requested by
several users. Fixed a .rst bug in the description as seen in PyPI.
```
### 4.4.0
```
Fixed a regression with decorator factories breaking the case with no
arguments by going back to the syntax used in version 4.2.
Accepted a small fix from Eric Larson (https://github.com/larsoner) affecting
`isgeneratorfunction` for old Python versions.
Moved the documentation from ReadTheDocs to GitHub to simplify the
release process and replaced ReStructuredText with Markdown: it is
an inferior solution, but it works better with GitHub and it is good enough.
```
### 4.3.2
```
Accepted a patch from Sylvain Marie (https://github.com/smarie): now the
decorator module can decorate generator functions by preserving their
being generator functions. Set `python_requires='>=2.6, !=3.0.*, !=3.1.*'`
in setup.py, as suggested by https://github.com/hugovk.
```
### 4.3.1
```
Added a section "For the impatient" to the README, addressing an issue
raised by Amir Malekpour. Added support for Python 3.7. Now
the path to the decorator module appears in the tracebacks, as suggested
by an user at EuroPython 2018.
```
Links
- PyPI: https://pypi.org/project/decorator
- Changelog: https://pyup.io/changelogs/decorator/
- Repo: https://github.com/micheles/decorator
Changelog
### 3.3
```
++++++++++++++++
- Update to Unicode 14.0.0
- Update to in-line type annotations
- Throw IDNAError exception correctly for some malformed input
- Advertise support for Python 3.10
- Improve testing regime on Github
- Fix Russian typo in documentation
Thanks to Jon Defresne, Hugo van Kemenade, Seth Michael Larson,
Patrick Ventuzelo and Boris Verhovsky for contributions to this
release.
```
### 3.2
```
++++++++++++++++
- Add type hints (Thanks, Seth Michael Larson!)
- Remove support for Python 3.4
```
### 3.1
```
++++++++++++++++
- Ensure license is included in package (Thanks, Julien Schueller)
- No longer mark wheel has universal (Thanks, Matthieu Darbois)
- Test on PowerPC using Travis CI
```
### 3.0
```
++++++++++++++++
- Python 2 is no longer supported (the 2.x branch supports Python 2,
use "idna<3" in your requirements file if you need Python 2 support)
- Support for V2 UTS 46 test vectors.
```
### 2.10
```
+++++++++++++++++
- Update to Unicode 13.0.0.
- Throws a more specific exception if "xn--" is provided as a label.
- This is expected to be the last version that supports Python 2.
```
### 2.9
```
++++++++++++++++
- Update to Unicode 12.1.0.
- Prohibit A-labels ending with a hyphen (Thanks, Julien Bernard!)
- Future-proofing: Test on Python 3.7 and 3.8, don't immediately
fail should Python 4 come along.
- Made BSD 3-clause license clearer
```
### 2.8
```
++++++++++++++++
- Update to Unicode 11.0.0.
- Provide more specific exceptions for some malformed labels.
```
### 2.7
```
++++++++++++++++
- Update to Unicode 10.0.0.
- No longer accepts dot-prefixed domains (e.g. ".example") as valid.
This is to be more conformant with the UTS 46 spec. Users should
strip dot prefixes from domains before processing.
```
Links
- PyPI: https://pypi.org/project/idna
- Changelog: https://pyup.io/changelogs/idna/
- Repo: https://github.com/kjd/idna
Changelog
### 2.26.0
```
-------------------
**Improvements**
- Requests now supports Brotli compression, if either the `brotli` or
`brotlicffi` package is installed. (5783)
- `Session.send` now correctly resolves proxy configurations from both
the Session and Request. Behavior now matches `Session.request`. (5681)
**Bugfixes**
- Fixed a race condition in zip extraction when using Requests in parallel
from zip archive. (5707)
**Dependencies**
- Instead of `chardet`, use the MIT-licensed `charset_normalizer` for Python3
to remove license ambiguity for projects bundling requests. If `chardet`
is already installed on your machine it will be used instead of `charset_normalizer`
to keep backwards compatibility. (5797)
You can also install `chardet` while installing requests by
specifying `[use_chardet_on_py3]` extra as follows:
shell
pip install "requests[use_chardet_on_py3]"
Python2 still depends upon the `chardet` module.
- Requests now supports `idna` 3.x on Python 3. `idna` 2.x will continue to
be used on Python 2 installations. (5711)
**Deprecations**
- The `requests[security]` extra has been converted to a no-op install.
PyOpenSSL is no longer the recommended secure option for Requests. (5867)
- Requests has officially dropped support for Python 3.5. (5867)
```
### 2.25.1
```
-------------------
**Bugfixes**
- Requests now treats `application/json` as `utf8` by default. Resolving
inconsistencies between `r.text` and `r.json` output. (5673)
**Dependencies**
- Requests now supports chardet v4.x.
```
### 2.25.0
```
------------------
**Improvements**
- Added support for NETRC environment variable. (5643)
**Dependencies**
- Requests now supports urllib3 v1.26.
**Deprecations**
- Requests v2.25.x will be the last release series with support for Python 3.5.
- The `requests[security]` extra is officially deprecated and will be removed
in Requests v2.26.0.
```
### 2.24.0
```
-------------------
**Improvements**
- pyOpenSSL TLS implementation is now only used if Python
either doesn't have an `ssl` module or doesn't support
SNI. Previously pyOpenSSL was unconditionally used if available.
This applies even if pyOpenSSL is installed via the
`requests[security]` extra (5443)
- Redirect resolution should now only occur when
`allow_redirects` is True. (5492)
- No longer perform unnecessary Content-Length calculation for
requests that won't use it. (5496)
```
### 2.23.0
```
-------------------
**Improvements**
- Remove defunct reference to `prefetch` in Session `__attrs__` (5110)
**Bugfixes**
- Requests no longer outputs password in basic auth usage warning. (5099)
**Dependencies**
- Pinning for `chardet` and `idna` now uses major version instead of minor.
This hopefully reduces the need for releases everytime a dependency is updated.
```
### 2.22.0
```
-------------------
**Dependencies**
- Requests now supports urllib3 v1.25.2.
(note: 1.25.0 and 1.25.1 are incompatible)
**Deprecations**
- Requests has officially stopped support for Python 3.4.
```
### 2.21.0
```
-------------------
**Dependencies**
- Requests now supports idna v2.8.
```
### 2.20.1
```
-------------------
**Bugfixes**
- Fixed bug with unintended Authorization header stripping for
redirects using default ports (http/80, https/443).
```
### 2.20.0
```
-------------------
**Bugfixes**
- Content-Type header parsing is now case-insensitive (e.g.
charset=utf8 v Charset=utf8).
- Fixed exception leak where certain redirect urls would raise
uncaught urllib3 exceptions.
- Requests removes Authorization header from requests redirected
from https to http on the same hostname. (CVE-2018-18074)
- `should_bypass_proxies` now handles URIs without hostnames (e.g.
files).
**Dependencies**
- Requests now supports urllib3 v1.24.
**Deprecations**
- Requests has officially stopped support for Python 2.6.
```
### 2.19.1
```
-------------------
**Bugfixes**
- Fixed issue where status\_codes.py's `init` function failed trying
to append to a `__doc__` value of `None`.
```
### 2.19.0
```
-------------------
**Improvements**
- Warn user about possible slowdown when using cryptography version
< 1.3.4
- Check for invalid host in proxy URL, before forwarding request to
adapter.
- Fragments are now properly maintained across redirects. (RFC7231
7.1.2)
- Removed use of cgi module to expedite library load time.
- Added support for SHA-256 and SHA-512 digest auth algorithms.
- Minor performance improvement to `Request.content`.
- Migrate to using collections.abc for 3.7 compatibility.
**Bugfixes**
- Parsing empty `Link` headers with `parse_header_links()` no longer
return one bogus entry.
- Fixed issue where loading the default certificate bundle from a zip
archive would raise an `IOError`.
- Fixed issue with unexpected `ImportError` on windows system which do
not support `winreg` module.
- DNS resolution in proxy bypass no longer includes the username and
password in the request. This also fixes the issue of DNS queries
failing on macOS.
- Properly normalize adapter prefixes for url comparison.
- Passing `None` as a file pointer to the `files` param no longer
raises an exception.
- Calling `copy` on a `RequestsCookieJar` will now preserve the cookie
policy correctly.
**Dependencies**
- We now support idna v2.7.
- We now support urllib3 v1.23.
```
Links
- PyPI: https://pypi.org/project/requests
- Changelog: https://pyup.io/changelogs/requests/
- Docs: https://requests.readthedocs.io
Changelog
### 1.26.6
```
===================
* Deprecated the ``urllib3.contrib.ntlmpool`` module. urllib3 is not able to support
it properly due to `reasons listed in this issue <https://github.com/urllib3/urllib3/issues/2282>`_.
If you are a user of this module please leave a comment.
* Changed ``HTTPConnection.request_chunked()`` to not erroneously emit multiple
``Transfer-Encoding`` headers in the case that one is already specified.
* Fixed typo in deprecation message to recommend ``Retry.DEFAULT_ALLOWED_METHODS``.
```
### 1.26.5
```
===================
* Fixed deprecation warnings emitted in Python 3.10.
* Updated vendored ``six`` library to 1.16.0.
* Improved performance of URL parser when splitting
the authority component.
```
### 1.26.4
```
===================
* Changed behavior of the default ``SSLContext`` when connecting to HTTPS proxy
during HTTPS requests. The default ``SSLContext`` now sets ``check_hostname=True``.
```
### 1.26.3
```
===================
* Fixed bytes and string comparison issue with headers (Pull 2141)
* Changed ``ProxySchemeUnknown`` error message to be
more actionable if the user supplies a proxy URL without
a scheme. (Pull 2107)
```
### 1.26.2
```
===================
* Fixed an issue where ``wrap_socket`` and ``CERT_REQUIRED`` wouldn't
be imported properly on Python 2.7.8 and earlier (Pull 2052)
```
### 1.26.1
```
===================
* Fixed an issue where two ``User-Agent`` headers would be sent if a
``User-Agent`` header key is passed as ``bytes`` (Pull 2047)
```
### 1.26.0
```
===================
* **NOTE: urllib3 v2.0 will drop support for Python 2**.
`Read more in the v2.0 Roadmap <https://urllib3.readthedocs.io/en/latest/v2-roadmap.html>`_.
* Added support for HTTPS proxies contacting HTTPS servers (Pull 1923, Pull 1806)
* Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that
still wish to use TLS earlier than 1.2 without a deprecation warning
should opt-in explicitly by setting ``ssl_version=ssl.PROTOCOL_TLSv1_1`` (Pull 2002)
**Starting in urllib3 v2.0: Connections that receive a ``DeprecationWarning`` will fail**
* Deprecated ``Retry`` options ``Retry.DEFAULT_METHOD_WHITELIST``, ``Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST``
and ``Retry(method_whitelist=...)`` in favor of ``Retry.DEFAULT_ALLOWED_METHODS``,
``Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT``, and ``Retry(allowed_methods=...)``
(Pull 2000) **Starting in urllib3 v2.0: Deprecated options will be removed**
* Added default ``User-Agent`` header to every request (Pull 1750)
* Added ``urllib3.util.SKIP_HEADER`` for skipping ``User-Agent``, ``Accept-Encoding``,
and ``Host`` headers from being automatically emitted with requests (Pull 2018)
* Collapse ``transfer-encoding: chunked`` request data and framing into
the same ``socket.send()`` call (Pull 1906)
* Send ``http/1.1`` ALPN identifier with every TLS handshake by default (Pull 1894)
* Properly terminate SecureTransport connections when CA verification fails (Pull 1977)
* Don't emit an ``SNIMissingWarning`` when passing ``server_hostname=None``
to SecureTransport (Pull 1903)
* Disabled requesting TLSv1.2 session tickets as they weren't being used by urllib3 (Pull 1970)
* Suppress ``BrokenPipeError`` when writing request body after the server
has closed the socket (Pull 1524)
* Wrap ``ssl.SSLError`` that can be raised from reading a socket (e.g. "bad MAC")
into an ``urllib3.exceptions.SSLError`` (Pull 1939)
```
### 1.25.11
```
====================
* Fix retry backoff time parsed from ``Retry-After`` header when given
in the HTTP date format. The HTTP date was parsed as the local timezone
rather than accounting for the timezone in the HTTP date (typically
UTC) (Pull 1932, Pull 1935, Pull 1938, Pull 1949)
* Fix issue where an error would be raised when the ``SSLKEYLOGFILE``
environment variable was set to the empty string. Now ``SSLContext.keylog_file``
is not set in this situation (Pull 2016)
```
### 1.25.10
```
====================
* Added support for ``SSLKEYLOGFILE`` environment variable for
logging TLS session keys with use with programs like
Wireshark for decrypting captured web traffic (Pull 1867)
* Fixed loading of SecureTransport libraries on macOS Big Sur
due to the new dynamic linker cache (Pull 1905)
* Collapse chunked request bodies data and framing into one
call to ``send()`` to reduce the number of TCP packets by 2-4x (Pull 1906)
* Don't insert ``None`` into ``ConnectionPool`` if the pool
was empty when requesting a connection (Pull 1866)
* Avoid ``hasattr`` call in ``BrotliDecoder.decompress()`` (Pull 1858)
```
### 1.25.9
```
===================
* Added ``InvalidProxyConfigurationWarning`` which is raised when
erroneously specifying an HTTPS proxy URL. urllib3 doesn't currently
support connecting to HTTPS proxies but will soon be able to
and we would like users to migrate properly without much breakage.
See `this GitHub issue <https://github.com/urllib3/urllib3/issues/1850>`_
for more information on how to fix your proxy config. (Pull 1851)
* Drain connection after ``PoolManager`` redirect (Pull 1817)
* Ensure ``load_verify_locations`` raises ``SSLError`` for all backends (Pull 1812)
* Rename ``VerifiedHTTPSConnection`` to ``HTTPSConnection`` (Pull 1805)
* Allow the CA certificate data to be passed as a string (Pull 1804)
* Raise ``ValueError`` if method contains control characters (Pull 1800)
* Add ``__repr__`` to ``Timeout`` (Pull 1795)
```
### 1.25.8
```
===================
* Drop support for EOL Python 3.4 (Pull 1774)
* Optimize _encode_invalid_chars (Pull 1787)
```
### 1.25.7
```
===================
* Preserve ``chunked`` parameter on retries (Pull 1715, Pull 1734)
* Allow unset ``SERVER_SOFTWARE`` in App Engine (Pull 1704, Issue 1470)
* Fix issue where URL fragment was sent within the request target. (Pull 1732)
* Fix issue where an empty query section in a URL would fail to parse. (Pull 1732)
* Remove TLS 1.3 support in SecureTransport due to Apple removing support (Pull 1703)
```
### 1.25.6
```
===================
* Fix issue where tilde (``~``) characters were incorrectly
percent-encoded in the path. (Pull 1692)
```
### 1.25.5
```
===================
* Add mitigation for BPO-37428 affecting Python <3.7.4 and OpenSSL 1.1.1+ which
caused certificate verification to be enabled when using ``cert_reqs=CERT_NONE``.
(Issue 1682)
```
### 1.25.4
```
===================
* Propagate Retry-After header settings to subsequent retries. (Pull 1607)
* Fix edge case where Retry-After header was still respected even when
explicitly opted out of. (Pull 1607)
* Remove dependency on ``rfc3986`` for URL parsing.
* Fix issue where URLs containing invalid characters within ``Url.auth`` would
raise an exception instead of percent-encoding those characters.
* Add support for ``HTTPResponse.auto_close = False`` which makes HTTP responses
work well with BufferedReaders and other ``io`` module features. (Pull 1652)
* Percent-encode invalid characters in URL for ``HTTPConnectionPool.request()`` (Pull 1673)
```
### 1.25.3
```
===================
* Change ``HTTPSConnection`` to load system CA certificates
when ``ca_certs``, ``ca_cert_dir``, and ``ssl_context`` are
unspecified. (Pull 1608, Issue 1603)
* Upgrade bundled rfc3986 to v1.3.2. (Pull 1609, Issue 1605)
```
### 1.25.2
```
===================
* Change ``is_ipaddress`` to not detect IPvFuture addresses. (Pull 1583)
* Change ``parse_url`` to percent-encode invalid characters within the
path, query, and target components. (Pull 1586)
```
### 1.25.1
```
===================
* Add support for Google's ``Brotli`` package. (Pull 1572, Pull 1579)
* Upgrade bundled rfc3986 to v1.3.1 (Pull 1578)
```
### 1.25
```
=================
* Require and validate certificates by default when using HTTPS (Pull 1507)
* Upgraded ``urllib3.utils.parse_url()`` to be RFC 3986 compliant. (Pull 1487)
* Added support for ``key_password`` for ``HTTPSConnectionPool`` to use
encrypted ``key_file`` without creating your own ``SSLContext`` object. (Pull 1489)
* Add TLSv1.3 support to CPython, pyOpenSSL, and SecureTransport ``SSLContext``
implementations. (Pull 1496)
* Switched the default multipart header encoder from RFC 2231 to HTML 5 working draft. (Issue 303, Pull 1492)
* Fixed issue where OpenSSL would block if an encrypted client private key was
given and no password was given. Instead an ``SSLError`` is raised. (Pull 1489)
* Added support for Brotli content encoding. It is enabled automatically if
``brotlipy`` package is installed which can be requested with
``urllib3[brotli]`` extra. (Pull 1532)
* Drop ciphers using DSS key exchange from default TLS cipher suites.
Improve default ciphers when using SecureTransport. (Pull 1496)
* Implemented a more efficient ``HTTPResponse.__iter__()`` method. (Issue 1483)
```
### 1.24.3
```
===================
* Apply fix for CVE-2019-9740. (Pull 1591)
```
### 1.24.2
```
===================
* Don't load system certificates by default when any other ``ca_certs``, ``ca_certs_dir`` or
``ssl_context`` parameters are specified.
* Remove Authorization header regardless of case when redirecting to cross-site. (Issue 1510)
* Add support for IPv6 addresses in subjectAltName section of certificates. (Issue 1269)
```
### 1.24.1
```
===================
* Remove quadratic behavior within ``GzipDecoder.decompress()`` (Issue 1467)
* Restored functionality of ``ciphers`` parameter for ``create_urllib3_context()``. (Issue 1462)
```
### 1.24
```
=================
* Allow key_server_hostname to be specified when initializing a PoolManager to allow custom SNI to be overridden. (Pull 1449)
* Test against Python 3.7 on AppVeyor. (Pull 1453)
* Early-out ipv6 checks when running on App Engine. (Pull 1450)
* Change ambiguous description of backoff_factor (Pull 1436)
* Add ability to handle multiple Content-Encodings (Issue 1441 and Pull 1442)
* Skip DNS names that can't be idna-decoded when using pyOpenSSL (Issue 1405).
* Add a server_hostname parameter to HTTPSConnection which allows for
overriding the SNI hostname sent in the handshake. (Pull 1397)
* Drop support for EOL Python 2.6 (Pull 1429 and Pull 1430)
* Fixed bug where responses with header Content-Type: message/* erroneously
raised HeaderParsingError, resulting in a warning being logged. (Pull 1439)
* Move urllib3 to src/urllib3 (Pull 1409)
```
### 1.23
```
=================
* Allow providing a list of headers to strip from requests when redirecting
to a different host. Defaults to the ``Authorization`` header. Different
headers can be set via ``Retry.remove_headers_on_redirect``. (Issue 1316)
* Fix ``util.selectors._fileobj_to_fd`` to accept ``long`` (Issue 1247).
* Dropped Python 3.3 support. (Pull 1242)
* Put the connection back in the pool when calling stream() or read_chunked() on
a chunked HEAD response. (Issue 1234)
* Fixed pyOpenSSL-specific ssl client authentication issue when clients
attempted to auth via certificate + chain (Issue 1060)
* Add the port to the connectionpool connect print (Pull 1251)
* Don't use the ``uuid`` module to create multipart data boundaries. (Pull 1380)
* ``read_chunked()`` on a closed response returns no chunks. (Issue 1088)
* Add Python 2.6 support to ``contrib.securetransport`` (Pull 1359)
* Added support for auth info in url for SOCKS proxy (Pull 1363)
```
Links
- PyPI: https://pypi.org/project/urllib3
- Changelog: https://pyup.io/changelogs/urllib3/
- Docs: https://urllib3.readthedocs.io/
Changelog
### 2.9.1
```
============================
Release date: 2021-12-31
* ``NodeNG.frame()`` and ``NodeNG.statement()`` will start raising ``ParentMissingError``
instead of ``AttributeError`` in astroid 3.0. This behaviour can already be triggered
by passing ``future=True`` to a ``frame()`` or ``statement()`` call.
* Prefer the module loader get_source() method in AstroidBuilder's
module_build() when possible to avoid assumptions about source
code being available on a filesystem. Otherwise the source cannot
be found and application behavior changes when running within an
embedded hermetic interpreter environment (pyoxidizer, etc.).
* Require Python 3.6.2 to use astroid.
* Removed custom ``distutils`` handling for resolving paths to submodules.
Ref 1321
* Fix ``deque.insert()`` signature in ``collections`` brain.
Closes 1260
* Fix ``Module`` nodes not having a ``col_offset``, ``end_lineno``, and ``end_col_offset``
attributes.
* Fix typing and update explanation for ``Arguments.args`` being ``None``.
* Fix crash if a variable named ``type`` is subscripted in a generator expression.
Closes PyCQA/pylint5461
* Enable inference of dataclass import from marshmallow_dataclass.
This allows the dataclasses brain to recognize dataclasses annotated by marshmallow_dataclass.
* Resolve symlinks in the import path
Fixes inference error when the import path includes symlinks (e.g. Python
installed on macOS via Homebrew).
Closes 823
Closes PyCQA/pylint3499
Closes PyCQA/pylint4302
Closes PyCQA/pylint4798
Closes PyCQA/pylint5081
```
### 2.9.0
```
============================
Release date: 2021-11-21
* Add ``end_lineno`` and ``end_col_offset`` attributes to astroid nodes.
* Always treat ``__class_getitem__`` as a classmethod.
* Add missing ``as_string`` visitor method for ``Unknown`` node.
Closes 1264
```
### 2.8.6
```
============================
Release date: 2021-11-21
* Fix crash on inference of subclasses created from ``Class().__subclasses__``
Closes PyCQA/pylint4982
* Fix bug with Python 3.7.0 / 3.7.1 and ``typing.NoReturn``.
Closes 1239
```
### 2.8.5
```
============================
Release date: 2021-11-12
* Use more permissive versions for the ``typed-ast`` dependency (<2.0 instead of <1.5)
Closes 1237
* Fix crash on inference of ``__len__``.
Closes PyCQA/pylint5244
* Added missing ``kind`` (for ``Const``) and ``conversion`` (for ``FormattedValue``) fields to repr.
* Fix crash with assignment expressions, nested if expressions and filtering of statements
Closes PyCQA/pylint5178
* Fix incorrect filtering of assignment expressions statements
```
### 2.8.4
```
============================
Release date: 2021-10-25
* Fix the ``scope()`` and ``frame()`` methods of ``NamedExpr`` nodes.
When these nodes occur in ``Arguments``, ``Keyword`` or ``Comprehension`` nodes these
methods now correctly point to the outer-scope of the ``FunctionDef``,
``ClassDef``, or ``Comprehension``.
* Fix the ``set_local`` function for ``NamedExpr`` nodes.
When these nodes occur in ``Arguments``, ``Keyword``, or ``Comprehension`` nodes these
nodes are now correctly added to the locals of the ``FunctionDef``,
``ClassDef``, or ``Comprehension``.
```
### 2.8.3
```
============================
Release date: 2021-10-17
* Add support for wrapt 1.13
* Fixes handling of nested partial functions
Closes PyCQA/pylint2462
Closes 1208
* Fix regression with the import resolver
Closes PyCQA/pylint5131
* Fix crash with invalid dataclass field call
Closes PyCQA/pylint5153
```
### 2.8.2
```
============================
Release date: 2021-10-07
Same content than 2.8.2-dev0 / 2.8.1, released in order to fix a
mistake when creating the tag.
```
### 2.8.1
```
============================
Release date: 2021-10-06
* Adds support of type hints inside numpy's brains.
Closes PyCQA/pylint4326
* Enable inference of dataclass import from pydantic.dataclasses.
This allows the dataclasses brain to recognize pydantic dataclasses.
Closes PyCQA/pylint4899
* Fix regression on ClassDef inference
Closes PyCQA/pylint5030
Closes PyCQA/pylint5036
* Fix regression on Compare node inference
Closes PyCQA/pylint5048
* Extended attrs brain to support the provisional APIs
* Astroid does not trigger it's own deprecation warning anymore.
* Improve brain for ``typing.Callable`` and ``typing.Type``.
* Fix bug with importing namespace packages with relative imports
Closes PyCQA/pylint5059
* The ``is_typing_guard`` and ``is_sys_guard`` functions are deprecated and will
be removed in 3.0.0. They are complex meta-inference functions that are better
suited for pylint. Import them from ``pylint.checkers.utils`` instead
(requires pylint ``2.12``).
* Suppress the conditional between applied brains and dynamic import authorized
modules. (Revert the "The transforms related to a module are applied only if this
module has not been explicitly authorized to be imported" of version 2.7.3)
* Adds a brain to infer the ``numpy.ma.masked_where`` function.
Closes PyCQA/pylint3342
```
### 2.8.0
```
============================
Release date: 2021-09-14
* Add additional deprecation warnings in preparation for astroid 3.0
* Require attributes for some node classes with ``__init__`` call.
* ``name`` (``str``) for ``Name``, ``AssignName``, ``DelName``
* ``attrname`` (``str``) for ``Attribute``, ``AssignAttr``, ``DelAttr``
* ``op`` (``str``) for ``AugAssign``, ``BinOp``, ``BoolOp``, ``UnaryOp``
* ``names`` (``list[tuple[str, str | None]]``) for ``Import``
* Support pyz imports
Closes PyCQA/pylint3887
* Add ``node_ancestors`` method to ``NodeNG`` for obtaining the ancestors of nodes.
* It's now possible to infer the value of comparison nodes
Closes 846
* Fixed bug in inference of dataclass field calls.
Closes PyCQA/pylint4963
```
### 2.7.3
```
============================
Release date: 2021-08-30
* The transforms related to a module are applied only if this module has not been explicitly authorized to be imported
(i.e is not in AstroidManager.extension_package_whitelist). Solves the following issues if numpy is authorized to be imported
through the `extension-pkg-allow-list` option.
Closes PyCQA/pylint3342
Closes PyCQA/pylint4326
* Fixed bug in attribute inference from inside method calls.
Closes PyCQA/pylint400
* Fixed bug in inference for superclass instance methods called
from the class rather than an instance.
Closes 1008
Closes PyCQA/pylint4377
* Fixed bug in inference of chained attributes where a subclass
had an attribute that was an instance of its superclass.
Closes PyCQA/pylint4220
* Adds a brain for the ctypes module.
Closes PyCQA/pylint4896
* When processing dataclass attributes, exclude the same type hints from abc.collections
as from typing.
Closes PyCQA/pylint4895
* Apply dataclass inference to pydantic's dataclasses.
Closes PyCQA/pylint4899
```
### 2.7.2
```
============================
Release date: 2021-08-20
* ``BaseContainer`` is now public, and will replace ``_BaseContainer`` completely in astroid 3.0.
* The call cache used by inference functions produced by ``inference_tip``
can now be cleared via ``clear_inference_tip_cache``.
* ``astroid.const.BUILTINS`` and ``astroid.bases.BUILTINS`` are not used internally anymore
and will be removed in astroid 3.0. Simply replace this by the string 'builtins' for better
performances and clarity.
* Add inference for dataclass initializer method.
Closes PyCQA/pylint3201
```
### 2.7.1
```
============================
Release date: 2021-08-16
* When processing dataclass attributes, only do typing inference on collection types.
Support for instantiating other typing types is left for the future, if desired.
Closes 1129
* Fixed LookupMixIn missing from ``astroid.node_classes``.
```
### 2.7.0
```
============================
Release date: 2021-08-15
* Import from ``astroid.node_classes`` and ``astroid.scoped_nodes`` has been deprecated in favor of
``astroid.nodes``. Only the imports from ``astroid.nodes`` will work in astroid 3.0.0.
* Add support for arbitrary Enum subclass hierarchies
Closes PyCQA/pylint533
Closes PyCQA/pylint2224
Closes PyCQA/pylint2626
* Add inference tips for dataclass attributes, including dataclasses.field calls.
Also add support for InitVar.
Closes PyCQA/pylint2600
Closes PyCQA/pylint2698
Closes PyCQA/pylint3405
Closes PyCQA/pylint3794
* Adds a brain that deals with dynamic import of `IsolatedAsyncioTestCase` class of the `unittest` module.
Closes PyCQA/pylint4060
```
### 2.6.6
```
============================
Release date: 2021-08-03
* Added support to infer return type of ``typing.cast()``
* Fix variable lookup's handling of exclusive statements
Closes PyCQA/pylint3711
* Fix variable lookup's handling of function parameters
Closes PyCQA/astroid180
* Fix variable lookup's handling of except clause variables
* Fix handling of classes with duplicated bases with the same name
Closes PyCQA/astroid1088
```
### 2.6.5
```
============================
Release date: 2021-07-21
* Fix a crash when there would be a 'TypeError object does not support
item assignment' in the code we parse.
Closes PyCQA/pylint4439
* Fix a crash when a AttributeInferenceError was raised when
failing to find the real name in infer_import_from.
Closes PyCQA/pylint4692
```
### 2.6.4
```
============================
Release date: 2021-07-19
* Fix a crash when a StopIteration was raised when inferring
a faulty function in a context manager.
Closes PyCQA/pylint4723
```
### 2.6.3
```
============================
Release date: 2021-07-19
* Added ``If.is_sys_guard`` and ``If.is_typing_guard`` helper methods
* Fix a bad inferenece type for yield values inside of a derived class.
Closes PyCQA/astroid1090
* Fix a crash when the node is a 'Module' in the brain builtin inference
Closes PyCQA/pylint4671
* Fix issues when inferring match variables
Closes PyCQA/pylint4685
* Fix lookup for nested non-function scopes
* Fix issue that ``TypedDict`` instance wasn't callable.
Closes PyCQA/pylint4715
* Add dependency on setuptools and a guard to prevent related exceptions.
```
### 2.6.2
```
============================
Release date: 2021-06-30
* Fix a crash when the inference of the length of a node failed
Closes PyCQA/pylint4633
* Fix unhandled StopIteration during inference, following the implementation
of PEP479 in python 3.7+
Closes PyCQA/pylint4631
Closes 1080
```
### 2.6.1
```
============================
Release date: 2021-06-29
* Fix issue with ``TypedDict`` for Python 3.9+
Closes PyCQA/pylint4610
```
### 2.6.0
```
============================
Release date: 2021-06-22
* Appveyor and travis are no longer used in the continuous integration
* ``setuptools_scm`` has been removed and replaced by ``tbump`` in order to not
have hidden runtime dependencies to setuptools
* ``NodeNg``, the base node class, is now accessible from ``astroid`` or
``astroid.nodes`` as it can be used for typing.
* Update enum brain to improve inference of .name and .value dynamic class
attributes
Closes PyCQA/pylint1932
Closes PyCQA/pylint2062
Closes PyCQA/pylint2306
* Removed ``Repr``, ``Exec``, and ``Print`` nodes as the ``ast`` nodes
they represented have been removed with the change to Python 3
* Deprecate ``Ellipsis`` node. It will be removed with the next minor release.
Checkers that already support Python 3.8+ work without issues. It's only
necessary to remove all references to the ``astroid.Ellipsis`` node.
This changes will make development of checkers easier as the resulting tree for Ellipsis
will no longer depend on the python version. **Background**: With Python 3.8 the
``ast.Ellipsis`` node, along with ``ast.Str``, ``ast.Bytes``, ``ast.Num``,
and ``ast.NamedConstant`` were merged into ``ast.Constant``.
* Deprecated ``Index`` and ``ExtSlice`` nodes. They will be removed with the
next minor release. Both are now part of the ``Subscript`` node.
Checkers that already support Python 3.9+ work without issues.
It's only necessary to remove all references to the ``astroid.Index`` and
``astroid.ExtSlice`` nodes. This change will make development of checkers
easier as the resulting tree for ``ast.Subscript`` nodes will no longer
depend on the python version. **Background**: With Python 3.9 ``ast.Index``
and ``ast.ExtSlice`` were merged into the ``ast.Subscript`` node.
* Updated all Match nodes to be internally consistent.
* Add ``Pattern`` base class.
```
### 2.5.8
```
============================
Release date: 2021-06-07
* Improve support for Pattern Matching
* Add lineno and col_offset for ``Keyword`` nodes and Python 3.9+
* Add global inference cache to speed up inference of long statement blocks
* Add a limit to the total number of nodes inferred indirectly as a result
of inferring some node
```
### 2.5.7
```
============================
Release date: 2021-05-09
* Fix six.with_metaclass transformation so it doesn't break user defined transformations.
* Fix detection of relative imports.
Closes 930
Closes PyCQA/pylint4186
* Fix inference of instance attributes defined in base classes
Closes 932
* Update `infer_named_tuple` brain to reject namedtuple definitions
that would raise ValueError
Closes 920
* Do not set instance attributes on builtin object()
Closes 945
Closes PyCQA/pylint4232
Closes PyCQA/pylint4221
Closes PyCQA/pylint3970
Closes PyCQA/pylint3595
* Fix some spurious cycles detected in ``context.path`` leading to more cases
that can now be inferred
Closes 926
* Add ``kind`` field to ``Const`` nodes, matching the structure of the built-in ast Const.
The kind field is "u" if the literal is a u-prefixed string, and ``None`` otherwise.
Closes 898
* Fix property inference in class contexts for properties defined on the metaclass
Closes 940
* Update enum brain to fix definition of __members__ for subclass-defined Enums
Closes PyCQA/pylint3535
Closes PyCQA/pylint4358
* Update random brain to fix a crash with inference of some sequence elements
Closes 922
* Fix inference of attributes defined in a base class that is an inner class
Closes 904
* Allow inferring a return value of None for non-abstract empty functions and
functions with no return statements (implicitly returning None)
Closes 485
* scm_setuptools has been added to the packaging.
* Astroid's tags are now the standard form ``vX.Y.Z`` and not ``astroid-X.Y.Z`` anymore.
* Add initial support for Pattern Matching in Python 3.10
```
### 2.5.6
```
============================
Release date: 2021-04-25
* Fix retro-compatibility issues with old version of pylint
Closes PyCQA/pylint4402
```
### 2.5.5
```
============================
Release date: 2021-04-24
* Fixes the discord link in the project urls of the package.
Closes PyCQA/pylint4393
```
### 2.5.4
```
============================
Release date: 2021-04-24
* The packaging is now done via setuptools exclusively. ``doc``, ``tests``, and ``Changelog`` are
not packaged anymore - reducing the size of the package greatly.
* Debian packaging is now (officially) done in https://salsa.debian.org/python-team/packages/astroid.
* ``__pkginfo__`` now only contain ``__version__`` (also accessible with ``astroid.__version__``),
other meta-information are still accessible with ``import importlib;metadata.metadata('astroid')``.
* Added inference tip for ``typing.Tuple`` alias
* Fix crash when evaluating ``typing.NamedTuple``
Closes PyCQA/pylint4383
* COPYING was removed in favor of COPYING.LESSER and the latter was renamed to LICENSE to make more apparent
that the code is licensed under LGPLv2 or later.
* Moved from appveyor and travis to Github Actions for continuous integration.
```
### 2.5.3
```
============================
Release date: 2021-04-10
* Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method
* Reworks the ``collections`` and ``typing`` brain so that pylint`s acceptance tests are fine.
Closes PyCQA/pylint4206
* Use ``inference_tip`` for ``typing.TypedDict`` brain.
* Fix mro for classes that inherit from typing.Generic
* Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__``
Closes PyCQA/pylint2822
```
### 2.5.2
```
============================
Release date: 2021-03-28
* Detects `import numpy` as a valid `numpy` import.
Closes PyCQA/pylint3974
* Iterate over ``Keywords`` when using ``ClassDef.get_children``
Closes PyCQA/pylint3202
```
### 2.5.1
```
============================
Release date: 2021-02-28
* The ``context.path`` is reverted to a set because otherwise it leads to false positives
for non `numpy` functions.
Closes 895 899
* Don't transform dataclass ClassVars
* Improve typing.TypedDict inference
* Fix the `Duplicates found in MROs` false positive.
Closes 905
Closes PyCQA/pylint2717
Closes PyCQA/pylint3247
Closes PyCQA/pylint4093
Closes PyCQA/pylint4131
Closes PyCQA/pylint4145
```
### 2.5
```
============================
Release date: 2021-02-15
* Adds `attr_fset` in the `PropertyModel` class.
Fixes PyCQA/pylint3480
* Remove support for Python 3.5.
* Remove the runtime dependency on ``six``. The ``six`` brain remains in
astroid.
Fixes PyCQA/astroid863
* Enrich the ``brain_collection`` module so that ``__class_getitem__`` method is added to `deque` for
``python`` version above 3.9.
* The ``context.path`` is now a ``dict`` and the ``context.push`` method
returns ``True`` if the node has been visited a certain amount of times.
Close 669
* Adds a brain for type object so that it is possible to write `type[int]` in annotation.
Fixes PyCQA/pylint4001
* Add ``__class_getitem__`` method to ``subprocess.Popen`` brain under Python 3.9 so that it is seen as subscriptable by pylint.
Fixes PyCQA/pylint4034
* Adds `degrees`, `radians`, which are `numpy ufunc` functions, in the `numpy` brain. Adds `random` function in the `numpy.random` brain.
Fixes PyCQA/pylint3856
* Fix deprecated importlib methods
Closes 703
* Fix a crash in inference caused by `Uninferable` container elements
Close 866
* Add `python 3.9` support.
* The flat attribute of ``numpy.ndarray`` is now inferred as an ``numpy.ndarray`` itself.
It should be a ``numpy.flatiter`` instance, but this class is not yet available in the numpy brain.
Fixes PyCQA/pylint3640
* Fix a bug for dunder methods inference of function objects
Fixes 819
* Fixes a bug in the signature of the ``ndarray.__or__`` method,
in the ``brain_numpy_ndarray.py`` module.
Fixes 815
* Fixes a to-list cast bug in ``starred_assigned_stmts`` method, in the
``protocols.py`` module.
* Added a brain for ``hypothesis.strategies.composite``
* The transpose of a ``numpy.ndarray`` is also a ``numpy.ndarray``
Fixes PyCQA/pylint3387
* Added a brain for ``sqlalchemy.orm.session``
* Separate string and bytes classes patching
Fixes PyCQA/pylint3599
* Prevent recursion error for self referential length calls
Close 777
* Added missing methods to the brain for ``mechanize``, to fix pylint false positives
Close 793
* Added more supported parameters to ``subprocess.check_output``
* Fix recursion errors with pandas
Fixes PyCQA/pylint2843
Fixes PyCQA/pylint2811
* Added exception inference for `UnicodeDecodeError`
Close PyCQA/pylint3639
* `FunctionDef.is_generator` properly handles `yield` nodes in `If` tests
Close PyCQA/pylint3583
* Fixed exception-chaining error messages.
* Fix failure to infer base class type with multiple inheritance and qualified names
Fixes 843
* Fix interpretation of ``six.with_metaclass`` class definitions.
Fixes 713
* Reduce memory usage of astroid's module cache.
* Remove dependency on `imp`.
Close 594
Close 681
* Do not crash when encountering starred assignments in enums.
Close 835
* Fix a crash in functools.partial inference when the arguments cannot be determined
Close PyCQA/pylint3776
* Fix a crash caused by a lookup of a monkey-patched method
Close PyCQA/pylint3686
* ``is_generator`` correctly considers `Yield` nodes in `AugAssign` nodes
This fixes a false positive with the `assignment-from-no-return` pylint check.
Close PyCQA/pylint3904
* Corrected the parent of function type comment nodes.
These nodes used to be parented to their original ast.FunctionDef parent
but are now correctly parented to their astroid.FunctionDef parent.
Close PyCQA/astroid851
```
### 2.4.2
```
============================
Release date: 2020-06-08
* `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests
Close PyCQA/pylint3519
* Properly construct the arguments of inferred property descriptors
Close PyCQA/pylint3648
```
### 2.4.1
```
============================
Release date: 2020-05-05
* Handle the case where the raw builder fails to retrieve the ``__all__`` attribute
Close 772
* Restructure the AST parsing heuristic to always pick the same module
Close PyCQA/pylint3540
Close 773
* Changed setup.py to work with [distlib](https://pypi.org/project/distlib)
Close 779
* Do not crash with SyntaxError when parsing namedtuples with invalid label
Close PyCQA/pylint3549
* Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()`
Close PyCQA/pylint3529
```
### 2.4.0
```
============================
Release date: 2020-04-27
* Expose a ast_from_string method in AstroidManager, which will accept
source code as a string and return the corresponding astroid object
Closes PyCQA/astroid725
* ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__``
Close PyCQA/pylint2335
* Allow slots added dynamically to a class to still be inferred
Close PyCQA/pylint2334
* Allow `FunctionDef.getattr` to look into both instance attrs and special attributes
Close PyCQA/pylint1078
* Infer qualified ``classmethod`` as a classmethod.
Close PyCQA/pylint3417
* Prevent a recursion error to happen when inferring the declared metaclass of a class
Close 749
* Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name
Close PyCQA/pylint2991
* Prevent a recursion error for self reference variables and `type()` calls.
Close 199
* Do not infer the first argument of a staticmethod in a metaclass as the class itself
Close PyCQA/pylint3032
* ``NodeNG.bool_value()`` gained an optional ``context`` parameter
We need to pass an inference context downstream when inferring the boolean
value of a node in order to prevent recursion errors and double inference.
This fix prevents a recursion error with dask library.
Close PyCQA/pylint2985
* Pass a context argument to ``astroid.Arguments`` to prevent recursion errors
Close PyCQA/pylint3414
* Better inference of class and static methods decorated with custom methods
Close PyCQA/pylint3209
* Reverse the order of decorators for `infer_subscript`
`path_wrapper` needs to come first, followed by `raise_if_nothing_inferred`,
otherwise we won't handle `StopIteration` correctly.
Close 762
* Prevent a recursion error when inferring self-referential variables without definition
Close PyCQA/pylint1285
* Numpy `datetime64.astype` return value is inferred as a `ndarray`.
Close PyCQA/pylint3332
* Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation
Closes PyCQA/pylint3365
* Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``.
Close PyCQA/pylint3322
* Added a call to ``register_transform`` for all functions of the ``brain_numpy_core_multiarray``
module in case the current node is an instance of ``astroid.Name``
Close 666
* Use the parent of the node when inferring aug assign nodes instead of the statement
Close PyCQA/pylint2911
Close PyCQA/pylint3214
* Added some functions to the ``brain_numpy_core_umath`` module
Close PyCQA/pylint3319
* Added some functions of the ``numpy.core.multiarray`` module
Close PyCQA/pylint3208
* All the ``numpy ufunc`` functions derived now from a common class that
implements the specific ``reduce``, ``accumulate``, ``reduceat``,
``outer`` and ``at`` methods.
Close PyCQA/pylint2885
* ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings
Close PyCQA/pylint3306
* The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray``
Close PyCQA/pylint3139
* Don't ignore special methods when inspecting gi classes
Close 728
* Added transform for ``scipy.gaussian``
* Add support for inferring properties.
* Added a brain for ``responses``
* Allow inferring positional only arguments.
* Retry parsing a module that has invalid type comments
It is possible for a module to use comments that might be interpreted
as type comments by the `ast` library. We do not want to completely crash on those
invalid type comments.
Close 708
* Scope the inference to the current bound node when inferring instances of classes
When inferring instances of classes from arguments, such as ``self``
in a bound method, we could use as a hint the context's ``boundnode``,
which indicates the instance from which the inference originated.
As an example, a subclass that uses a parent's method which returns
``self``, will override the ``self`` to point to it instead of pointing
to the parent class.
Close PyCQA/pylint3157
* Add support for inferring exception instances in all contexts
We were able to infer exception instances as ``ExceptionInstance``
only for a handful of cases, but not all. ``ExceptionInstance`` has
support for better inference of `.args` and other exception related
attributes that normal instances do not have.
This additional support should remove certain false positives related
to ``.args`` and other exception attributes in ``pylint``.
Close PyCQA/pylint2333
* Add more supported parameters to ``subprocess.check_output``
Close 722
* Infer args unpacking of ``self``
Certain stdlib modules use ``*args`` to encapsulate
the ``self`` parameter, which results in uninferable
instances given we rely on the presence of the ``self``
argument to figure out the instance where we should be
setting attributes.
Close PyCQA/pylint3216
* Clean up setup.py
Make pytest-runner a requirement only if running tests, similar to what was
done with McCabe.
Clean up the setup.py file, resolving a handful of minor warnings with it.
* Handle StopIteration error in infer_int.
Close PyCQA/pylint3274
* Can access per argument type comments for positional only and keyword only arguments.
The comments are accessed through through the new
``Arguments.type_comment_posonlyargs`` and
``Arguments.type_comment_kwonlyargs`` attributes respectively.
* Relax upper bound on `wrapt`
Close 755
* Properly analyze CFFI compiled extensions.
```
### 2.3.2
```
============================
Release date: 2019-10-18
* All type comments have as parent the corresponding `astroid` node
Until now they had as parent the builtin `ast` node which meant
we were operating with primitive objects instead of our own.
Close PyCQA/pylint3174
* Pass an inference context to `metaclass()` when inferring an object type
This should prevent a bunch of recursion errors happening in pylint.
Also refactor the inference of `IfExp` nodes to use separate contexts
for each potential branch.
Close PyCQA/pylint3152
Close PyCQA/pylint3159
```
### 2.3.1
```
============================
Release date: 2019-09-30
* A transform for the builtin `dataclasses` module was added.
This should address various `dataclasses` issues that were surfaced
even more after the release of pylint 2.4.0.
In the previous versions of `astroid`, annotated assign nodes were
allowed to be retrieved via `getattr()` but that no longer happens
with the latest `astroid` release, as those attribute are not actual
attributes, but rather virtual ones, thus an operation such as `getattr()`
does not make sense for them.
* Update attr brain to partly understand annotated attributes
Close 656
```
### 2.3.0
```
============================
Release date: 2019-09-24
* Add a brain tip for ``subprocess.check_output``
Close 689
* Remove NodeNG.nearest method because of lack of usage in astroid and pylint.
Close 691
* Allow importing wheel files. Close 541
* Annotated AST follows PEP8 coding style when converted to string.
* Fix a bug where defining a class using type() could cause a DuplicateBasesError.
Close 644
* Dropped support for Python 3.4.
* Numpy brain support is improved.
Numpy's fundamental type ``numpy.ndarray`` has its own brain : ``brain_numpy_ndarray`` and
each numpy module that necessitates brain action has now its own numpy brain :
- ``numpy.core.numeric``
- ``numpy.core.function_base``
- ``numpy.core.multiarray``
- ``numpy.core.numeric``
- ``numpy.core.numerictypes``
- ``numpy.core.umath``
- ``numpy.random.mtrand``
Close PyCQA/pylint2865
Close PyCQA/pylint2747
Close PyCQA/pylint2721
Close PyCQA/pylint2326
Close PyCQA/pylint2021
* ``assert`` only functions are properly inferred as returning ``None``
Close 668
* Add support for Python 3.8's `NamedExpr` nodes, which is part of assignment expressions.
Close 674
* Added support for inferring `IfExp` nodes.
* Instances of exceptions are inferred as such when inferring in non-exception context
This allows special inference support for exception attributes such as `.args`.
Close PyCQA/pylint2333
* Drop a superfluous and wrong callcontext when inferring the result of a context manager
Close PyCQA/pylint2859
* ``igetattr`` raises ``InferenceError`` on re-inference of the same object
This prevents ``StopIteration`` from leaking when we encounter the same
object in the current context, which could result in various ``RuntimeErrors``
leaking in other parts of the inference.
Until we get a global context per inference, the solution is sort of a hack,
as with the suggested global context improvement, we could theoretically
reuse the same inference object.
Close 663
* Variable annotations can no longer be retrieved with `ClassDef.getattr`
Unless they have an attached value, class variable annotations can no longer
be retrieved with `ClassDef.getattr.`
* Improved builtin inference for ``tuple``, ``set``, ``frozenset``, ``list`` and ``dict``
We were properly inferring these callables *only* if they had consts as
values, but that is not the case most of the time. Instead we try to infer
the values that their arguments can be and use them instead of assuming
Const nodes all the time.
Close PyCQA/pylint2841
* The last except handler wins when inferring variables bound in an except handler.
Close PyCQA/pylint2777
* ``threading.Lock.locked()`` is properly recognized as a member of ``threading.Lock``
Close PyCQA/pylint2791
* Fix recursion error involving ``len`` and self referential attributes
Close PyCQA/pylint2736
Close PyCQA/pylint2734
Close PyCQA/pylint2740
* Can access per argument type comments through new ``Arguments.type_comment_args`` attribute.
Close 665
* Fix being unable to access class attributes on a NamedTuple.
Close PyCQA/pylint1628
* Fixed being unable to find distutils submodules by name when in a virtualenv.
Close PyCQA/pylint73
```
### 2.2.0
```
============================
Release date: 2019-02-27
* Fix a bug concerning inference of calls to numpy function that should not return Tuple or List instances.
Close PyCQA/pylint2436
* Fix a bug where a method, which is a lambda built from a function, is not inferred as ``BoundMethod``
Close PyCQA/pylint2594
* ``typed_ast`` gets installed for Python 3.7, meaning type comments can now work on 3.7.
* Fix a bug concerning inference of unary operators on numpy types.
Close PyCQA/pylint2436 (first part)
* Fix a crash with ``typing.NamedTuple`` and empty fields. Close PyCQA/pylint2745
* Add a proper ``strerror`` inference to the ``OSError`` exceptions.
Close PyCQA/pylint2553
* Support non-const nodes as values of Enum attributes.
Close 612
* Fix a crash in the ``enum`` brain tip caused by non-assign members in class definitions.
Close PyCQA/pylint2719
* ``brain_numpy`` returns an undefined type for ``numpy`` methods to avoid ``assignment-from-no-return``
Close PyCQA/pylint2694
* Fix a bug where a call to a function that has been previously called via
functools.partial was wrongly inferred
Close PyCQA/pylint2588
* Fix a recursion error caused by inferring the ``slice`` builtin.
Close PyCQA/pylint2667
* Remove the restriction that "old style classes" cannot have a MRO.
This does not make sense any longer given that we run against Python 3
code.
Close
Update certifi from 2018.4.16 to 2021.10.8.
The bot wasn't able to find a changelog for this release. Got an idea?
Links
- PyPI: https://pypi.org/project/certifi - Docs: https://certifiio.readthedocs.io/en/latest/Update chardet from 3.0.4 to 4.0.0.
Changelog
### 4.0.0 ``` Benchmarking chardet 4.0.0 on CPython 3.7.5 (default, Sep 8 2020, 12:19:42) [Clang 11.0.3 (clang-1103.0.32.62)] -------------------------------------------------------------------------------- ....................................................................................................................................................................................................................................................................................................................................................................... Calls per second for each encoding: ```Links
- PyPI: https://pypi.org/project/chardet - Changelog: https://pyup.io/changelogs/chardet/ - Repo: https://github.com/chardet/chardetUpdate decorator from 4.3.0 to 5.1.0.
Changelog
### 5.1.0 ``` Added a function `decoratorx` using the `FunctionMaker` and thus preserving the signature of `__code__` objects. Then fixed three small bugs: - Sphinx was printing a few warnings when building the documentation, as signaled by Tomasz Kłoczko - functions decorated with `decorator.contextmanager` were one-shot, as discovered by Alex Pizarro. - `decorator.decorator` was not passing the kwsyntax argument. ``` ### 5.0.9 ``` Fixed a test breaking PyPy. Restored support for Sphinx. ``` ### 5.0.8 ``` Made the decorator module more robust when decorating builtin functions lacking dunder attributes, like `dict.__setitem__`. ``` ### 5.0.7 ``` The decorator module was not passing correctly the defaults inside the `*args` tuple, thanks to Dan Shult for the fix. Also fixed some mispellings in the documentation and integrated codespell in the CI, thanks to Christian Clauss. ``` ### 5.0.6 ``` The decorator module was not copying the __module__ attribute anymore. Thanks to Nikolay Markov for the notice. ``` ### 5.0.5 ``` Dropped support for Python < 3.5 with a substantial simplification of the code base (now building a decorator does not require calling "exec"). Added a way to mimic functools.wraps-generated decorators. Ported the Continuous Integration from Travis to GitHub. ``` ### 4.4.2 ``` Sylvan Mosberger (https://github.com/Infinisil) contributed a patch to some doctests that were breaking on NixOS. John Vandenberg (https://github.com/jayvdb) made a case for removing the usage of `__file__`, that was breaking PyOxidizer. Miro Hrončok (https://github.com/hroncok) contributed some fixes for the future Python 3.9. Hugo van Kemenade (https://github.com/hugovk) contributed some fixes for the future Python 3.10. ``` ### 4.4.1 ``` Changed the description to "Decorators for Humans" are requested by several users. Fixed a .rst bug in the description as seen in PyPI. ``` ### 4.4.0 ``` Fixed a regression with decorator factories breaking the case with no arguments by going back to the syntax used in version 4.2. Accepted a small fix from Eric Larson (https://github.com/larsoner) affecting `isgeneratorfunction` for old Python versions. Moved the documentation from ReadTheDocs to GitHub to simplify the release process and replaced ReStructuredText with Markdown: it is an inferior solution, but it works better with GitHub and it is good enough. ``` ### 4.3.2 ``` Accepted a patch from Sylvain Marie (https://github.com/smarie): now the decorator module can decorate generator functions by preserving their being generator functions. Set `python_requires='>=2.6, !=3.0.*, !=3.1.*'` in setup.py, as suggested by https://github.com/hugovk. ``` ### 4.3.1 ``` Added a section "For the impatient" to the README, addressing an issue raised by Amir Malekpour. Added support for Python 3.7. Now the path to the decorator module appears in the tracebacks, as suggested by an user at EuroPython 2018. ```Links
- PyPI: https://pypi.org/project/decorator - Changelog: https://pyup.io/changelogs/decorator/ - Repo: https://github.com/micheles/decoratorUpdate dnspython from 1.15.0 to 2.1.0.
The bot wasn't able to find a changelog for this release. Got an idea?
Links
- PyPI: https://pypi.org/project/dnspython - Homepage: http://www.dnspython.orgUpdate idna from 2.6 to 3.3.
Changelog
### 3.3 ``` ++++++++++++++++ - Update to Unicode 14.0.0 - Update to in-line type annotations - Throw IDNAError exception correctly for some malformed input - Advertise support for Python 3.10 - Improve testing regime on Github - Fix Russian typo in documentation Thanks to Jon Defresne, Hugo van Kemenade, Seth Michael Larson, Patrick Ventuzelo and Boris Verhovsky for contributions to this release. ``` ### 3.2 ``` ++++++++++++++++ - Add type hints (Thanks, Seth Michael Larson!) - Remove support for Python 3.4 ``` ### 3.1 ``` ++++++++++++++++ - Ensure license is included in package (Thanks, Julien Schueller) - No longer mark wheel has universal (Thanks, Matthieu Darbois) - Test on PowerPC using Travis CI ``` ### 3.0 ``` ++++++++++++++++ - Python 2 is no longer supported (the 2.x branch supports Python 2, use "idna<3" in your requirements file if you need Python 2 support) - Support for V2 UTS 46 test vectors. ``` ### 2.10 ``` +++++++++++++++++ - Update to Unicode 13.0.0. - Throws a more specific exception if "xn--" is provided as a label. - This is expected to be the last version that supports Python 2. ``` ### 2.9 ``` ++++++++++++++++ - Update to Unicode 12.1.0. - Prohibit A-labels ending with a hyphen (Thanks, Julien Bernard!) - Future-proofing: Test on Python 3.7 and 3.8, don't immediately fail should Python 4 come along. - Made BSD 3-clause license clearer ``` ### 2.8 ``` ++++++++++++++++ - Update to Unicode 11.0.0. - Provide more specific exceptions for some malformed labels. ``` ### 2.7 ``` ++++++++++++++++ - Update to Unicode 10.0.0. - No longer accepts dot-prefixed domains (e.g. ".example") as valid. This is to be more conformant with the UTS 46 spec. Users should strip dot prefixes from domains before processing. ```Links
- PyPI: https://pypi.org/project/idna - Changelog: https://pyup.io/changelogs/idna/ - Repo: https://github.com/kjd/idnaUpdate ipaddress from 1.0.22 to 1.0.23.
The bot wasn't able to find a changelog for this release. Got an idea?
Links
- PyPI: https://pypi.org/project/ipaddress - Repo: https://github.com/phihag/ipaddressUpdate requests from 2.18.4 to 2.26.0.
Changelog
### 2.26.0 ``` ------------------- **Improvements** - Requests now supports Brotli compression, if either the `brotli` or `brotlicffi` package is installed. (5783) - `Session.send` now correctly resolves proxy configurations from both the Session and Request. Behavior now matches `Session.request`. (5681) **Bugfixes** - Fixed a race condition in zip extraction when using Requests in parallel from zip archive. (5707) **Dependencies** - Instead of `chardet`, use the MIT-licensed `charset_normalizer` for Python3 to remove license ambiguity for projects bundling requests. If `chardet` is already installed on your machine it will be used instead of `charset_normalizer` to keep backwards compatibility. (5797) You can also install `chardet` while installing requests by specifying `[use_chardet_on_py3]` extra as follows: shell pip install "requests[use_chardet_on_py3]" Python2 still depends upon the `chardet` module. - Requests now supports `idna` 3.x on Python 3. `idna` 2.x will continue to be used on Python 2 installations. (5711) **Deprecations** - The `requests[security]` extra has been converted to a no-op install. PyOpenSSL is no longer the recommended secure option for Requests. (5867) - Requests has officially dropped support for Python 3.5. (5867) ``` ### 2.25.1 ``` ------------------- **Bugfixes** - Requests now treats `application/json` as `utf8` by default. Resolving inconsistencies between `r.text` and `r.json` output. (5673) **Dependencies** - Requests now supports chardet v4.x. ``` ### 2.25.0 ``` ------------------ **Improvements** - Added support for NETRC environment variable. (5643) **Dependencies** - Requests now supports urllib3 v1.26. **Deprecations** - Requests v2.25.x will be the last release series with support for Python 3.5. - The `requests[security]` extra is officially deprecated and will be removed in Requests v2.26.0. ``` ### 2.24.0 ``` ------------------- **Improvements** - pyOpenSSL TLS implementation is now only used if Python either doesn't have an `ssl` module or doesn't support SNI. Previously pyOpenSSL was unconditionally used if available. This applies even if pyOpenSSL is installed via the `requests[security]` extra (5443) - Redirect resolution should now only occur when `allow_redirects` is True. (5492) - No longer perform unnecessary Content-Length calculation for requests that won't use it. (5496) ``` ### 2.23.0 ``` ------------------- **Improvements** - Remove defunct reference to `prefetch` in Session `__attrs__` (5110) **Bugfixes** - Requests no longer outputs password in basic auth usage warning. (5099) **Dependencies** - Pinning for `chardet` and `idna` now uses major version instead of minor. This hopefully reduces the need for releases everytime a dependency is updated. ``` ### 2.22.0 ``` ------------------- **Dependencies** - Requests now supports urllib3 v1.25.2. (note: 1.25.0 and 1.25.1 are incompatible) **Deprecations** - Requests has officially stopped support for Python 3.4. ``` ### 2.21.0 ``` ------------------- **Dependencies** - Requests now supports idna v2.8. ``` ### 2.20.1 ``` ------------------- **Bugfixes** - Fixed bug with unintended Authorization header stripping for redirects using default ports (http/80, https/443). ``` ### 2.20.0 ``` ------------------- **Bugfixes** - Content-Type header parsing is now case-insensitive (e.g. charset=utf8 v Charset=utf8). - Fixed exception leak where certain redirect urls would raise uncaught urllib3 exceptions. - Requests removes Authorization header from requests redirected from https to http on the same hostname. (CVE-2018-18074) - `should_bypass_proxies` now handles URIs without hostnames (e.g. files). **Dependencies** - Requests now supports urllib3 v1.24. **Deprecations** - Requests has officially stopped support for Python 2.6. ``` ### 2.19.1 ``` ------------------- **Bugfixes** - Fixed issue where status\_codes.py's `init` function failed trying to append to a `__doc__` value of `None`. ``` ### 2.19.0 ``` ------------------- **Improvements** - Warn user about possible slowdown when using cryptography version < 1.3.4 - Check for invalid host in proxy URL, before forwarding request to adapter. - Fragments are now properly maintained across redirects. (RFC7231 7.1.2) - Removed use of cgi module to expedite library load time. - Added support for SHA-256 and SHA-512 digest auth algorithms. - Minor performance improvement to `Request.content`. - Migrate to using collections.abc for 3.7 compatibility. **Bugfixes** - Parsing empty `Link` headers with `parse_header_links()` no longer return one bogus entry. - Fixed issue where loading the default certificate bundle from a zip archive would raise an `IOError`. - Fixed issue with unexpected `ImportError` on windows system which do not support `winreg` module. - DNS resolution in proxy bypass no longer includes the username and password in the request. This also fixes the issue of DNS queries failing on macOS. - Properly normalize adapter prefixes for url comparison. - Passing `None` as a file pointer to the `files` param no longer raises an exception. - Calling `copy` on a `RequestsCookieJar` will now preserve the cookie policy correctly. **Dependencies** - We now support idna v2.7. - We now support urllib3 v1.23. ```Links
- PyPI: https://pypi.org/project/requests - Changelog: https://pyup.io/changelogs/requests/ - Docs: https://requests.readthedocs.ioUpdate six from 1.11.0 to 1.16.0.
Changelog
### 1.16.0 ``` ------ - Pull request 343, issue 341, pull request 349: Port _SixMetaPathImporter to Python 3.10. ``` ### 1.15.0 ``` ------ - Pull request 331: Optimize `six.ensure_str` and `six.ensure_binary`. ``` ### 1.14.0 ``` ------ - Issue 288, pull request 289: Add `six.assertNotRegex`. - Issue 317: `six.moves._dummy_thread` now points to the `_thread` module on Python 3.9+. Python 3.7 and later requires threading and deprecated the `_dummy_thread` module. - Issue 308, pull request 314: Remove support for Python 2.6 and Python 3.2. - Issue 250, issue 165, pull request 251: `six.wraps` now ignores missing attributes. This follows the Python 3.2+ standard library behavior. ``` ### 1.13.0 ``` ------ - Issue 298, pull request 299: Add `six.moves.dbm_ndbm`. - Issue 155: Add `six.moves.collections_abc`, which aliases the `collections` module on Python 2-3.2 and the `collections.abc` on Python 3.3 and greater. - Pull request 304: Re-add distutils fallback in `setup.py`. - Pull request 305: On Python 3.7, `with_metaclass` supports classes using PEP 560 features. ``` ### 1.12.0 ``` ------ - Issue 259, pull request 260: `six.add_metaclass` now preserves `__qualname__` from the original class. - Pull request 204: Add `six.ensure_binary`, `six.ensure_text`, and `six.ensure_str`. ```Links
- PyPI: https://pypi.org/project/six - Changelog: https://pyup.io/changelogs/six/ - Repo: https://github.com/benjaminp/sixUpdate urllib3 from 1.22 to 1.26.7.
Changelog
### 1.26.6 ``` =================== * Deprecated the ``urllib3.contrib.ntlmpool`` module. urllib3 is not able to support it properly due to `reasons listed in this issue <https://github.com/urllib3/urllib3/issues/2282>`_. If you are a user of this module please leave a comment. * Changed ``HTTPConnection.request_chunked()`` to not erroneously emit multiple ``Transfer-Encoding`` headers in the case that one is already specified. * Fixed typo in deprecation message to recommend ``Retry.DEFAULT_ALLOWED_METHODS``. ``` ### 1.26.5 ``` =================== * Fixed deprecation warnings emitted in Python 3.10. * Updated vendored ``six`` library to 1.16.0. * Improved performance of URL parser when splitting the authority component. ``` ### 1.26.4 ``` =================== * Changed behavior of the default ``SSLContext`` when connecting to HTTPS proxy during HTTPS requests. The default ``SSLContext`` now sets ``check_hostname=True``. ``` ### 1.26.3 ``` =================== * Fixed bytes and string comparison issue with headers (Pull 2141) * Changed ``ProxySchemeUnknown`` error message to be more actionable if the user supplies a proxy URL without a scheme. (Pull 2107) ``` ### 1.26.2 ``` =================== * Fixed an issue where ``wrap_socket`` and ``CERT_REQUIRED`` wouldn't be imported properly on Python 2.7.8 and earlier (Pull 2052) ``` ### 1.26.1 ``` =================== * Fixed an issue where two ``User-Agent`` headers would be sent if a ``User-Agent`` header key is passed as ``bytes`` (Pull 2047) ``` ### 1.26.0 ``` =================== * **NOTE: urllib3 v2.0 will drop support for Python 2**. `Read more in the v2.0 Roadmap <https://urllib3.readthedocs.io/en/latest/v2-roadmap.html>`_. * Added support for HTTPS proxies contacting HTTPS servers (Pull 1923, Pull 1806) * Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning should opt-in explicitly by setting ``ssl_version=ssl.PROTOCOL_TLSv1_1`` (Pull 2002) **Starting in urllib3 v2.0: Connections that receive a ``DeprecationWarning`` will fail** * Deprecated ``Retry`` options ``Retry.DEFAULT_METHOD_WHITELIST``, ``Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST`` and ``Retry(method_whitelist=...)`` in favor of ``Retry.DEFAULT_ALLOWED_METHODS``, ``Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT``, and ``Retry(allowed_methods=...)`` (Pull 2000) **Starting in urllib3 v2.0: Deprecated options will be removed** * Added default ``User-Agent`` header to every request (Pull 1750) * Added ``urllib3.util.SKIP_HEADER`` for skipping ``User-Agent``, ``Accept-Encoding``, and ``Host`` headers from being automatically emitted with requests (Pull 2018) * Collapse ``transfer-encoding: chunked`` request data and framing into the same ``socket.send()`` call (Pull 1906) * Send ``http/1.1`` ALPN identifier with every TLS handshake by default (Pull 1894) * Properly terminate SecureTransport connections when CA verification fails (Pull 1977) * Don't emit an ``SNIMissingWarning`` when passing ``server_hostname=None`` to SecureTransport (Pull 1903) * Disabled requesting TLSv1.2 session tickets as they weren't being used by urllib3 (Pull 1970) * Suppress ``BrokenPipeError`` when writing request body after the server has closed the socket (Pull 1524) * Wrap ``ssl.SSLError`` that can be raised from reading a socket (e.g. "bad MAC") into an ``urllib3.exceptions.SSLError`` (Pull 1939) ``` ### 1.25.11 ``` ==================== * Fix retry backoff time parsed from ``Retry-After`` header when given in the HTTP date format. The HTTP date was parsed as the local timezone rather than accounting for the timezone in the HTTP date (typically UTC) (Pull 1932, Pull 1935, Pull 1938, Pull 1949) * Fix issue where an error would be raised when the ``SSLKEYLOGFILE`` environment variable was set to the empty string. Now ``SSLContext.keylog_file`` is not set in this situation (Pull 2016) ``` ### 1.25.10 ``` ==================== * Added support for ``SSLKEYLOGFILE`` environment variable for logging TLS session keys with use with programs like Wireshark for decrypting captured web traffic (Pull 1867) * Fixed loading of SecureTransport libraries on macOS Big Sur due to the new dynamic linker cache (Pull 1905) * Collapse chunked request bodies data and framing into one call to ``send()`` to reduce the number of TCP packets by 2-4x (Pull 1906) * Don't insert ``None`` into ``ConnectionPool`` if the pool was empty when requesting a connection (Pull 1866) * Avoid ``hasattr`` call in ``BrotliDecoder.decompress()`` (Pull 1858) ``` ### 1.25.9 ``` =================== * Added ``InvalidProxyConfigurationWarning`` which is raised when erroneously specifying an HTTPS proxy URL. urllib3 doesn't currently support connecting to HTTPS proxies but will soon be able to and we would like users to migrate properly without much breakage. See `this GitHub issue <https://github.com/urllib3/urllib3/issues/1850>`_ for more information on how to fix your proxy config. (Pull 1851) * Drain connection after ``PoolManager`` redirect (Pull 1817) * Ensure ``load_verify_locations`` raises ``SSLError`` for all backends (Pull 1812) * Rename ``VerifiedHTTPSConnection`` to ``HTTPSConnection`` (Pull 1805) * Allow the CA certificate data to be passed as a string (Pull 1804) * Raise ``ValueError`` if method contains control characters (Pull 1800) * Add ``__repr__`` to ``Timeout`` (Pull 1795) ``` ### 1.25.8 ``` =================== * Drop support for EOL Python 3.4 (Pull 1774) * Optimize _encode_invalid_chars (Pull 1787) ``` ### 1.25.7 ``` =================== * Preserve ``chunked`` parameter on retries (Pull 1715, Pull 1734) * Allow unset ``SERVER_SOFTWARE`` in App Engine (Pull 1704, Issue 1470) * Fix issue where URL fragment was sent within the request target. (Pull 1732) * Fix issue where an empty query section in a URL would fail to parse. (Pull 1732) * Remove TLS 1.3 support in SecureTransport due to Apple removing support (Pull 1703) ``` ### 1.25.6 ``` =================== * Fix issue where tilde (``~``) characters were incorrectly percent-encoded in the path. (Pull 1692) ``` ### 1.25.5 ``` =================== * Add mitigation for BPO-37428 affecting Python <3.7.4 and OpenSSL 1.1.1+ which caused certificate verification to be enabled when using ``cert_reqs=CERT_NONE``. (Issue 1682) ``` ### 1.25.4 ``` =================== * Propagate Retry-After header settings to subsequent retries. (Pull 1607) * Fix edge case where Retry-After header was still respected even when explicitly opted out of. (Pull 1607) * Remove dependency on ``rfc3986`` for URL parsing. * Fix issue where URLs containing invalid characters within ``Url.auth`` would raise an exception instead of percent-encoding those characters. * Add support for ``HTTPResponse.auto_close = False`` which makes HTTP responses work well with BufferedReaders and other ``io`` module features. (Pull 1652) * Percent-encode invalid characters in URL for ``HTTPConnectionPool.request()`` (Pull 1673) ``` ### 1.25.3 ``` =================== * Change ``HTTPSConnection`` to load system CA certificates when ``ca_certs``, ``ca_cert_dir``, and ``ssl_context`` are unspecified. (Pull 1608, Issue 1603) * Upgrade bundled rfc3986 to v1.3.2. (Pull 1609, Issue 1605) ``` ### 1.25.2 ``` =================== * Change ``is_ipaddress`` to not detect IPvFuture addresses. (Pull 1583) * Change ``parse_url`` to percent-encode invalid characters within the path, query, and target components. (Pull 1586) ``` ### 1.25.1 ``` =================== * Add support for Google's ``Brotli`` package. (Pull 1572, Pull 1579) * Upgrade bundled rfc3986 to v1.3.1 (Pull 1578) ``` ### 1.25 ``` ================= * Require and validate certificates by default when using HTTPS (Pull 1507) * Upgraded ``urllib3.utils.parse_url()`` to be RFC 3986 compliant. (Pull 1487) * Added support for ``key_password`` for ``HTTPSConnectionPool`` to use encrypted ``key_file`` without creating your own ``SSLContext`` object. (Pull 1489) * Add TLSv1.3 support to CPython, pyOpenSSL, and SecureTransport ``SSLContext`` implementations. (Pull 1496) * Switched the default multipart header encoder from RFC 2231 to HTML 5 working draft. (Issue 303, Pull 1492) * Fixed issue where OpenSSL would block if an encrypted client private key was given and no password was given. Instead an ``SSLError`` is raised. (Pull 1489) * Added support for Brotli content encoding. It is enabled automatically if ``brotlipy`` package is installed which can be requested with ``urllib3[brotli]`` extra. (Pull 1532) * Drop ciphers using DSS key exchange from default TLS cipher suites. Improve default ciphers when using SecureTransport. (Pull 1496) * Implemented a more efficient ``HTTPResponse.__iter__()`` method. (Issue 1483) ``` ### 1.24.3 ``` =================== * Apply fix for CVE-2019-9740. (Pull 1591) ``` ### 1.24.2 ``` =================== * Don't load system certificates by default when any other ``ca_certs``, ``ca_certs_dir`` or ``ssl_context`` parameters are specified. * Remove Authorization header regardless of case when redirecting to cross-site. (Issue 1510) * Add support for IPv6 addresses in subjectAltName section of certificates. (Issue 1269) ``` ### 1.24.1 ``` =================== * Remove quadratic behavior within ``GzipDecoder.decompress()`` (Issue 1467) * Restored functionality of ``ciphers`` parameter for ``create_urllib3_context()``. (Issue 1462) ``` ### 1.24 ``` ================= * Allow key_server_hostname to be specified when initializing a PoolManager to allow custom SNI to be overridden. (Pull 1449) * Test against Python 3.7 on AppVeyor. (Pull 1453) * Early-out ipv6 checks when running on App Engine. (Pull 1450) * Change ambiguous description of backoff_factor (Pull 1436) * Add ability to handle multiple Content-Encodings (Issue 1441 and Pull 1442) * Skip DNS names that can't be idna-decoded when using pyOpenSSL (Issue 1405). * Add a server_hostname parameter to HTTPSConnection which allows for overriding the SNI hostname sent in the handshake. (Pull 1397) * Drop support for EOL Python 2.6 (Pull 1429 and Pull 1430) * Fixed bug where responses with header Content-Type: message/* erroneously raised HeaderParsingError, resulting in a warning being logged. (Pull 1439) * Move urllib3 to src/urllib3 (Pull 1409) ``` ### 1.23 ``` ================= * Allow providing a list of headers to strip from requests when redirecting to a different host. Defaults to the ``Authorization`` header. Different headers can be set via ``Retry.remove_headers_on_redirect``. (Issue 1316) * Fix ``util.selectors._fileobj_to_fd`` to accept ``long`` (Issue 1247). * Dropped Python 3.3 support. (Pull 1242) * Put the connection back in the pool when calling stream() or read_chunked() on a chunked HEAD response. (Issue 1234) * Fixed pyOpenSSL-specific ssl client authentication issue when clients attempted to auth via certificate + chain (Issue 1060) * Add the port to the connectionpool connect print (Pull 1251) * Don't use the ``uuid`` module to create multipart data boundaries. (Pull 1380) * ``read_chunked()`` on a closed response returns no chunks. (Issue 1088) * Add Python 2.6 support to ``contrib.securetransport`` (Pull 1359) * Added support for auth info in url for SOCKS proxy (Pull 1363) ```Links
- PyPI: https://pypi.org/project/urllib3 - Changelog: https://pyup.io/changelogs/urllib3/ - Docs: https://urllib3.readthedocs.io/Update validators from 0.12.2 to 0.18.2.
Changelog
### 0.18.2 ``` ^^^^^^^^^^^^^^^^^^^ - Implement actual validation for old style BTC addresses including checksumming (182, pull request courtesy of tpatja) - Use a regex to guesstimate validity of new segwit BTC addresses (182, pull request courtesy of tpatja) ``` ### 0.18.1 ``` ^^^^^^^^^^^^^^^^^^^ - Made uuid validator accept UUID objects (174, pull request courtesy of Letsch22) ``` ### 0.18.0 ``` ^^^^^^^^^^^^^^^^^^^ - Added bitcoin address validator (166, pull request courtesy of daveusa31) ``` ### 0.17.1 ``` ^^^^^^^^^^^^^^^^^^^ - Fixed python_requires using twine ``` ### 0.17.0 ``` ^^^^^^^^^^^^^^^^^^^ - Added python_requires='>=3.4' to setup.py (163, pull request courtesy of vphilippon) - Fixed URL validator ip_last_octet regex (145, pull request courtesy of ghost) ``` ### 0.16.0 ``` ^^^^^^^^^^^^^^^^^^^ - Added support for emojis and more IDNA URLs (161, pull request courtesy of automationator) ``` ### 0.15.0 ``` ^^^^^^^^^^^^^^^^^^^ - Added bank card validators (157, pull request courtesy of TimonPeng) ``` ### 0.14.3 ``` ^^^^^^^^^^^^^^^^^^^ - Handle None values gracefully in domain validator (144, pull request courtesy reahaas) - Local part of the email address should be less or equal than 64 bytes (147, pull request courtesy mondeja) - Removed py27 support - Removed pypy2 support ``` ### 0.14.2 ``` ^^^^^^^^^^^^^^^^^^^ - Made domain validation case-insensitive (136, pull request courtesy ehmkah) ``` ### 0.14.1 ``` ^^^^^^^^^^^^^^^^^^^ - Updated domain validator regex to not allow numeric only TLDs (133, pull request courtesy jmeridth) - Allow for idna encoded domains (133, pull request courtesy jmeridth) ``` ### 0.14.0 ``` ^^^^^^^^^^^^^^^^^^^ - Added new validators ``ipv4_cidr``, ``ipv6_cidr`` (117, pull request courtesy woodruffw) ``` ### 0.13.0 ``` ^^^^^^^^^^^^^^^^^^^ - Added new validator: ``es_doi``, ``es_nif``, ``es_cif``, ``es_nie`` (121, pull request courtesy kingbuzzman) ``` ### 0.12.6 ``` ^^^^^^^^^^^^^^^^^^^ - Fixed domain validator for single character domains (118, pull request courtesy kingbuzzman) ``` ### 0.12.5 ``` ^^^^^^^^^^^^^^^^^^^ - Fixed py37 support (113, pull request courtesy agiletechnologist) ``` ### 0.12.4 ``` ^^^^^^^^^^^^^^^^^^^ - Use inspect.getfullargspec() in py3 (110, pull request courtesy riconnon) ``` ### 0.12.3 ``` ^^^^^^^^^^^^^^^^^^^ - Added `allow_temporal_ssn` parameter to fi_ssn validator (97, pull request courtesy quantus) - Remove py33 support ```Links
- PyPI: https://pypi.org/project/validators - Changelog: https://pyup.io/changelogs/validators/ - Repo: https://github.com/kvesteri/validatorsUpdate astroid from 1.6.4 to 2.9.1.
Changelog
### 2.9.1 ``` ============================ Release date: 2021-12-31 * ``NodeNG.frame()`` and ``NodeNG.statement()`` will start raising ``ParentMissingError`` instead of ``AttributeError`` in astroid 3.0. This behaviour can already be triggered by passing ``future=True`` to a ``frame()`` or ``statement()`` call. * Prefer the module loader get_source() method in AstroidBuilder's module_build() when possible to avoid assumptions about source code being available on a filesystem. Otherwise the source cannot be found and application behavior changes when running within an embedded hermetic interpreter environment (pyoxidizer, etc.). * Require Python 3.6.2 to use astroid. * Removed custom ``distutils`` handling for resolving paths to submodules. Ref 1321 * Fix ``deque.insert()`` signature in ``collections`` brain. Closes 1260 * Fix ``Module`` nodes not having a ``col_offset``, ``end_lineno``, and ``end_col_offset`` attributes. * Fix typing and update explanation for ``Arguments.args`` being ``None``. * Fix crash if a variable named ``type`` is subscripted in a generator expression. Closes PyCQA/pylint5461 * Enable inference of dataclass import from marshmallow_dataclass. This allows the dataclasses brain to recognize dataclasses annotated by marshmallow_dataclass. * Resolve symlinks in the import path Fixes inference error when the import path includes symlinks (e.g. Python installed on macOS via Homebrew). Closes 823 Closes PyCQA/pylint3499 Closes PyCQA/pylint4302 Closes PyCQA/pylint4798 Closes PyCQA/pylint5081 ``` ### 2.9.0 ``` ============================ Release date: 2021-11-21 * Add ``end_lineno`` and ``end_col_offset`` attributes to astroid nodes. * Always treat ``__class_getitem__`` as a classmethod. * Add missing ``as_string`` visitor method for ``Unknown`` node. Closes 1264 ``` ### 2.8.6 ``` ============================ Release date: 2021-11-21 * Fix crash on inference of subclasses created from ``Class().__subclasses__`` Closes PyCQA/pylint4982 * Fix bug with Python 3.7.0 / 3.7.1 and ``typing.NoReturn``. Closes 1239 ``` ### 2.8.5 ``` ============================ Release date: 2021-11-12 * Use more permissive versions for the ``typed-ast`` dependency (<2.0 instead of <1.5) Closes 1237 * Fix crash on inference of ``__len__``. Closes PyCQA/pylint5244 * Added missing ``kind`` (for ``Const``) and ``conversion`` (for ``FormattedValue``) fields to repr. * Fix crash with assignment expressions, nested if expressions and filtering of statements Closes PyCQA/pylint5178 * Fix incorrect filtering of assignment expressions statements ``` ### 2.8.4 ``` ============================ Release date: 2021-10-25 * Fix the ``scope()`` and ``frame()`` methods of ``NamedExpr`` nodes. When these nodes occur in ``Arguments``, ``Keyword`` or ``Comprehension`` nodes these methods now correctly point to the outer-scope of the ``FunctionDef``, ``ClassDef``, or ``Comprehension``. * Fix the ``set_local`` function for ``NamedExpr`` nodes. When these nodes occur in ``Arguments``, ``Keyword``, or ``Comprehension`` nodes these nodes are now correctly added to the locals of the ``FunctionDef``, ``ClassDef``, or ``Comprehension``. ``` ### 2.8.3 ``` ============================ Release date: 2021-10-17 * Add support for wrapt 1.13 * Fixes handling of nested partial functions Closes PyCQA/pylint2462 Closes 1208 * Fix regression with the import resolver Closes PyCQA/pylint5131 * Fix crash with invalid dataclass field call Closes PyCQA/pylint5153 ``` ### 2.8.2 ``` ============================ Release date: 2021-10-07 Same content than 2.8.2-dev0 / 2.8.1, released in order to fix a mistake when creating the tag. ``` ### 2.8.1 ``` ============================ Release date: 2021-10-06 * Adds support of type hints inside numpy's brains. Closes PyCQA/pylint4326 * Enable inference of dataclass import from pydantic.dataclasses. This allows the dataclasses brain to recognize pydantic dataclasses. Closes PyCQA/pylint4899 * Fix regression on ClassDef inference Closes PyCQA/pylint5030 Closes PyCQA/pylint5036 * Fix regression on Compare node inference Closes PyCQA/pylint5048 * Extended attrs brain to support the provisional APIs * Astroid does not trigger it's own deprecation warning anymore. * Improve brain for ``typing.Callable`` and ``typing.Type``. * Fix bug with importing namespace packages with relative imports Closes PyCQA/pylint5059 * The ``is_typing_guard`` and ``is_sys_guard`` functions are deprecated and will be removed in 3.0.0. They are complex meta-inference functions that are better suited for pylint. Import them from ``pylint.checkers.utils`` instead (requires pylint ``2.12``). * Suppress the conditional between applied brains and dynamic import authorized modules. (Revert the "The transforms related to a module are applied only if this module has not been explicitly authorized to be imported" of version 2.7.3) * Adds a brain to infer the ``numpy.ma.masked_where`` function. Closes PyCQA/pylint3342 ``` ### 2.8.0 ``` ============================ Release date: 2021-09-14 * Add additional deprecation warnings in preparation for astroid 3.0 * Require attributes for some node classes with ``__init__`` call. * ``name`` (``str``) for ``Name``, ``AssignName``, ``DelName`` * ``attrname`` (``str``) for ``Attribute``, ``AssignAttr``, ``DelAttr`` * ``op`` (``str``) for ``AugAssign``, ``BinOp``, ``BoolOp``, ``UnaryOp`` * ``names`` (``list[tuple[str, str | None]]``) for ``Import`` * Support pyz imports Closes PyCQA/pylint3887 * Add ``node_ancestors`` method to ``NodeNG`` for obtaining the ancestors of nodes. * It's now possible to infer the value of comparison nodes Closes 846 * Fixed bug in inference of dataclass field calls. Closes PyCQA/pylint4963 ``` ### 2.7.3 ``` ============================ Release date: 2021-08-30 * The transforms related to a module are applied only if this module has not been explicitly authorized to be imported (i.e is not in AstroidManager.extension_package_whitelist). Solves the following issues if numpy is authorized to be imported through the `extension-pkg-allow-list` option. Closes PyCQA/pylint3342 Closes PyCQA/pylint4326 * Fixed bug in attribute inference from inside method calls. Closes PyCQA/pylint400 * Fixed bug in inference for superclass instance methods called from the class rather than an instance. Closes 1008 Closes PyCQA/pylint4377 * Fixed bug in inference of chained attributes where a subclass had an attribute that was an instance of its superclass. Closes PyCQA/pylint4220 * Adds a brain for the ctypes module. Closes PyCQA/pylint4896 * When processing dataclass attributes, exclude the same type hints from abc.collections as from typing. Closes PyCQA/pylint4895 * Apply dataclass inference to pydantic's dataclasses. Closes PyCQA/pylint4899 ``` ### 2.7.2 ``` ============================ Release date: 2021-08-20 * ``BaseContainer`` is now public, and will replace ``_BaseContainer`` completely in astroid 3.0. * The call cache used by inference functions produced by ``inference_tip`` can now be cleared via ``clear_inference_tip_cache``. * ``astroid.const.BUILTINS`` and ``astroid.bases.BUILTINS`` are not used internally anymore and will be removed in astroid 3.0. Simply replace this by the string 'builtins' for better performances and clarity. * Add inference for dataclass initializer method. Closes PyCQA/pylint3201 ``` ### 2.7.1 ``` ============================ Release date: 2021-08-16 * When processing dataclass attributes, only do typing inference on collection types. Support for instantiating other typing types is left for the future, if desired. Closes 1129 * Fixed LookupMixIn missing from ``astroid.node_classes``. ``` ### 2.7.0 ``` ============================ Release date: 2021-08-15 * Import from ``astroid.node_classes`` and ``astroid.scoped_nodes`` has been deprecated in favor of ``astroid.nodes``. Only the imports from ``astroid.nodes`` will work in astroid 3.0.0. * Add support for arbitrary Enum subclass hierarchies Closes PyCQA/pylint533 Closes PyCQA/pylint2224 Closes PyCQA/pylint2626 * Add inference tips for dataclass attributes, including dataclasses.field calls. Also add support for InitVar. Closes PyCQA/pylint2600 Closes PyCQA/pylint2698 Closes PyCQA/pylint3405 Closes PyCQA/pylint3794 * Adds a brain that deals with dynamic import of `IsolatedAsyncioTestCase` class of the `unittest` module. Closes PyCQA/pylint4060 ``` ### 2.6.6 ``` ============================ Release date: 2021-08-03 * Added support to infer return type of ``typing.cast()`` * Fix variable lookup's handling of exclusive statements Closes PyCQA/pylint3711 * Fix variable lookup's handling of function parameters Closes PyCQA/astroid180 * Fix variable lookup's handling of except clause variables * Fix handling of classes with duplicated bases with the same name Closes PyCQA/astroid1088 ``` ### 2.6.5 ``` ============================ Release date: 2021-07-21 * Fix a crash when there would be a 'TypeError object does not support item assignment' in the code we parse. Closes PyCQA/pylint4439 * Fix a crash when a AttributeInferenceError was raised when failing to find the real name in infer_import_from. Closes PyCQA/pylint4692 ``` ### 2.6.4 ``` ============================ Release date: 2021-07-19 * Fix a crash when a StopIteration was raised when inferring a faulty function in a context manager. Closes PyCQA/pylint4723 ``` ### 2.6.3 ``` ============================ Release date: 2021-07-19 * Added ``If.is_sys_guard`` and ``If.is_typing_guard`` helper methods * Fix a bad inferenece type for yield values inside of a derived class. Closes PyCQA/astroid1090 * Fix a crash when the node is a 'Module' in the brain builtin inference Closes PyCQA/pylint4671 * Fix issues when inferring match variables Closes PyCQA/pylint4685 * Fix lookup for nested non-function scopes * Fix issue that ``TypedDict`` instance wasn't callable. Closes PyCQA/pylint4715 * Add dependency on setuptools and a guard to prevent related exceptions. ``` ### 2.6.2 ``` ============================ Release date: 2021-06-30 * Fix a crash when the inference of the length of a node failed Closes PyCQA/pylint4633 * Fix unhandled StopIteration during inference, following the implementation of PEP479 in python 3.7+ Closes PyCQA/pylint4631 Closes 1080 ``` ### 2.6.1 ``` ============================ Release date: 2021-06-29 * Fix issue with ``TypedDict`` for Python 3.9+ Closes PyCQA/pylint4610 ``` ### 2.6.0 ``` ============================ Release date: 2021-06-22 * Appveyor and travis are no longer used in the continuous integration * ``setuptools_scm`` has been removed and replaced by ``tbump`` in order to not have hidden runtime dependencies to setuptools * ``NodeNg``, the base node class, is now accessible from ``astroid`` or ``astroid.nodes`` as it can be used for typing. * Update enum brain to improve inference of .name and .value dynamic class attributes Closes PyCQA/pylint1932 Closes PyCQA/pylint2062 Closes PyCQA/pylint2306 * Removed ``Repr``, ``Exec``, and ``Print`` nodes as the ``ast`` nodes they represented have been removed with the change to Python 3 * Deprecate ``Ellipsis`` node. It will be removed with the next minor release. Checkers that already support Python 3.8+ work without issues. It's only necessary to remove all references to the ``astroid.Ellipsis`` node. This changes will make development of checkers easier as the resulting tree for Ellipsis will no longer depend on the python version. **Background**: With Python 3.8 the ``ast.Ellipsis`` node, along with ``ast.Str``, ``ast.Bytes``, ``ast.Num``, and ``ast.NamedConstant`` were merged into ``ast.Constant``. * Deprecated ``Index`` and ``ExtSlice`` nodes. They will be removed with the next minor release. Both are now part of the ``Subscript`` node. Checkers that already support Python 3.9+ work without issues. It's only necessary to remove all references to the ``astroid.Index`` and ``astroid.ExtSlice`` nodes. This change will make development of checkers easier as the resulting tree for ``ast.Subscript`` nodes will no longer depend on the python version. **Background**: With Python 3.9 ``ast.Index`` and ``ast.ExtSlice`` were merged into the ``ast.Subscript`` node. * Updated all Match nodes to be internally consistent. * Add ``Pattern`` base class. ``` ### 2.5.8 ``` ============================ Release date: 2021-06-07 * Improve support for Pattern Matching * Add lineno and col_offset for ``Keyword`` nodes and Python 3.9+ * Add global inference cache to speed up inference of long statement blocks * Add a limit to the total number of nodes inferred indirectly as a result of inferring some node ``` ### 2.5.7 ``` ============================ Release date: 2021-05-09 * Fix six.with_metaclass transformation so it doesn't break user defined transformations. * Fix detection of relative imports. Closes 930 Closes PyCQA/pylint4186 * Fix inference of instance attributes defined in base classes Closes 932 * Update `infer_named_tuple` brain to reject namedtuple definitions that would raise ValueError Closes 920 * Do not set instance attributes on builtin object() Closes 945 Closes PyCQA/pylint4232 Closes PyCQA/pylint4221 Closes PyCQA/pylint3970 Closes PyCQA/pylint3595 * Fix some spurious cycles detected in ``context.path`` leading to more cases that can now be inferred Closes 926 * Add ``kind`` field to ``Const`` nodes, matching the structure of the built-in ast Const. The kind field is "u" if the literal is a u-prefixed string, and ``None`` otherwise. Closes 898 * Fix property inference in class contexts for properties defined on the metaclass Closes 940 * Update enum brain to fix definition of __members__ for subclass-defined Enums Closes PyCQA/pylint3535 Closes PyCQA/pylint4358 * Update random brain to fix a crash with inference of some sequence elements Closes 922 * Fix inference of attributes defined in a base class that is an inner class Closes 904 * Allow inferring a return value of None for non-abstract empty functions and functions with no return statements (implicitly returning None) Closes 485 * scm_setuptools has been added to the packaging. * Astroid's tags are now the standard form ``vX.Y.Z`` and not ``astroid-X.Y.Z`` anymore. * Add initial support for Pattern Matching in Python 3.10 ``` ### 2.5.6 ``` ============================ Release date: 2021-04-25 * Fix retro-compatibility issues with old version of pylint Closes PyCQA/pylint4402 ``` ### 2.5.5 ``` ============================ Release date: 2021-04-24 * Fixes the discord link in the project urls of the package. Closes PyCQA/pylint4393 ``` ### 2.5.4 ``` ============================ Release date: 2021-04-24 * The packaging is now done via setuptools exclusively. ``doc``, ``tests``, and ``Changelog`` are not packaged anymore - reducing the size of the package greatly. * Debian packaging is now (officially) done in https://salsa.debian.org/python-team/packages/astroid. * ``__pkginfo__`` now only contain ``__version__`` (also accessible with ``astroid.__version__``), other meta-information are still accessible with ``import importlib;metadata.metadata('astroid')``. * Added inference tip for ``typing.Tuple`` alias * Fix crash when evaluating ``typing.NamedTuple`` Closes PyCQA/pylint4383 * COPYING was removed in favor of COPYING.LESSER and the latter was renamed to LICENSE to make more apparent that the code is licensed under LGPLv2 or later. * Moved from appveyor and travis to Github Actions for continuous integration. ``` ### 2.5.3 ``` ============================ Release date: 2021-04-10 * Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method * Reworks the ``collections`` and ``typing`` brain so that pylint`s acceptance tests are fine. Closes PyCQA/pylint4206 * Use ``inference_tip`` for ``typing.TypedDict`` brain. * Fix mro for classes that inherit from typing.Generic * Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__`` Closes PyCQA/pylint2822 ``` ### 2.5.2 ``` ============================ Release date: 2021-03-28 * Detects `import numpy` as a valid `numpy` import. Closes PyCQA/pylint3974 * Iterate over ``Keywords`` when using ``ClassDef.get_children`` Closes PyCQA/pylint3202 ``` ### 2.5.1 ``` ============================ Release date: 2021-02-28 * The ``context.path`` is reverted to a set because otherwise it leads to false positives for non `numpy` functions. Closes 895 899 * Don't transform dataclass ClassVars * Improve typing.TypedDict inference * Fix the `Duplicates found in MROs` false positive. Closes 905 Closes PyCQA/pylint2717 Closes PyCQA/pylint3247 Closes PyCQA/pylint4093 Closes PyCQA/pylint4131 Closes PyCQA/pylint4145 ``` ### 2.5 ``` ============================ Release date: 2021-02-15 * Adds `attr_fset` in the `PropertyModel` class. Fixes PyCQA/pylint3480 * Remove support for Python 3.5. * Remove the runtime dependency on ``six``. The ``six`` brain remains in astroid. Fixes PyCQA/astroid863 * Enrich the ``brain_collection`` module so that ``__class_getitem__`` method is added to `deque` for ``python`` version above 3.9. * The ``context.path`` is now a ``dict`` and the ``context.push`` method returns ``True`` if the node has been visited a certain amount of times. Close 669 * Adds a brain for type object so that it is possible to write `type[int]` in annotation. Fixes PyCQA/pylint4001 * Add ``__class_getitem__`` method to ``subprocess.Popen`` brain under Python 3.9 so that it is seen as subscriptable by pylint. Fixes PyCQA/pylint4034 * Adds `degrees`, `radians`, which are `numpy ufunc` functions, in the `numpy` brain. Adds `random` function in the `numpy.random` brain. Fixes PyCQA/pylint3856 * Fix deprecated importlib methods Closes 703 * Fix a crash in inference caused by `Uninferable` container elements Close 866 * Add `python 3.9` support. * The flat attribute of ``numpy.ndarray`` is now inferred as an ``numpy.ndarray`` itself. It should be a ``numpy.flatiter`` instance, but this class is not yet available in the numpy brain. Fixes PyCQA/pylint3640 * Fix a bug for dunder methods inference of function objects Fixes 819 * Fixes a bug in the signature of the ``ndarray.__or__`` method, in the ``brain_numpy_ndarray.py`` module. Fixes 815 * Fixes a to-list cast bug in ``starred_assigned_stmts`` method, in the ``protocols.py`` module. * Added a brain for ``hypothesis.strategies.composite`` * The transpose of a ``numpy.ndarray`` is also a ``numpy.ndarray`` Fixes PyCQA/pylint3387 * Added a brain for ``sqlalchemy.orm.session`` * Separate string and bytes classes patching Fixes PyCQA/pylint3599 * Prevent recursion error for self referential length calls Close 777 * Added missing methods to the brain for ``mechanize``, to fix pylint false positives Close 793 * Added more supported parameters to ``subprocess.check_output`` * Fix recursion errors with pandas Fixes PyCQA/pylint2843 Fixes PyCQA/pylint2811 * Added exception inference for `UnicodeDecodeError` Close PyCQA/pylint3639 * `FunctionDef.is_generator` properly handles `yield` nodes in `If` tests Close PyCQA/pylint3583 * Fixed exception-chaining error messages. * Fix failure to infer base class type with multiple inheritance and qualified names Fixes 843 * Fix interpretation of ``six.with_metaclass`` class definitions. Fixes 713 * Reduce memory usage of astroid's module cache. * Remove dependency on `imp`. Close 594 Close 681 * Do not crash when encountering starred assignments in enums. Close 835 * Fix a crash in functools.partial inference when the arguments cannot be determined Close PyCQA/pylint3776 * Fix a crash caused by a lookup of a monkey-patched method Close PyCQA/pylint3686 * ``is_generator`` correctly considers `Yield` nodes in `AugAssign` nodes This fixes a false positive with the `assignment-from-no-return` pylint check. Close PyCQA/pylint3904 * Corrected the parent of function type comment nodes. These nodes used to be parented to their original ast.FunctionDef parent but are now correctly parented to their astroid.FunctionDef parent. Close PyCQA/astroid851 ``` ### 2.4.2 ``` ============================ Release date: 2020-06-08 * `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests Close PyCQA/pylint3519 * Properly construct the arguments of inferred property descriptors Close PyCQA/pylint3648 ``` ### 2.4.1 ``` ============================ Release date: 2020-05-05 * Handle the case where the raw builder fails to retrieve the ``__all__`` attribute Close 772 * Restructure the AST parsing heuristic to always pick the same module Close PyCQA/pylint3540 Close 773 * Changed setup.py to work with [distlib](https://pypi.org/project/distlib) Close 779 * Do not crash with SyntaxError when parsing namedtuples with invalid label Close PyCQA/pylint3549 * Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()` Close PyCQA/pylint3529 ``` ### 2.4.0 ``` ============================ Release date: 2020-04-27 * Expose a ast_from_string method in AstroidManager, which will accept source code as a string and return the corresponding astroid object Closes PyCQA/astroid725 * ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__`` Close PyCQA/pylint2335 * Allow slots added dynamically to a class to still be inferred Close PyCQA/pylint2334 * Allow `FunctionDef.getattr` to look into both instance attrs and special attributes Close PyCQA/pylint1078 * Infer qualified ``classmethod`` as a classmethod. Close PyCQA/pylint3417 * Prevent a recursion error to happen when inferring the declared metaclass of a class Close 749 * Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name Close PyCQA/pylint2991 * Prevent a recursion error for self reference variables and `type()` calls. Close 199 * Do not infer the first argument of a staticmethod in a metaclass as the class itself Close PyCQA/pylint3032 * ``NodeNG.bool_value()`` gained an optional ``context`` parameter We need to pass an inference context downstream when inferring the boolean value of a node in order to prevent recursion errors and double inference. This fix prevents a recursion error with dask library. Close PyCQA/pylint2985 * Pass a context argument to ``astroid.Arguments`` to prevent recursion errors Close PyCQA/pylint3414 * Better inference of class and static methods decorated with custom methods Close PyCQA/pylint3209 * Reverse the order of decorators for `infer_subscript` `path_wrapper` needs to come first, followed by `raise_if_nothing_inferred`, otherwise we won't handle `StopIteration` correctly. Close 762 * Prevent a recursion error when inferring self-referential variables without definition Close PyCQA/pylint1285 * Numpy `datetime64.astype` return value is inferred as a `ndarray`. Close PyCQA/pylint3332 * Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation Closes PyCQA/pylint3365 * Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``. Close PyCQA/pylint3322 * Added a call to ``register_transform`` for all functions of the ``brain_numpy_core_multiarray`` module in case the current node is an instance of ``astroid.Name`` Close 666 * Use the parent of the node when inferring aug assign nodes instead of the statement Close PyCQA/pylint2911 Close PyCQA/pylint3214 * Added some functions to the ``brain_numpy_core_umath`` module Close PyCQA/pylint3319 * Added some functions of the ``numpy.core.multiarray`` module Close PyCQA/pylint3208 * All the ``numpy ufunc`` functions derived now from a common class that implements the specific ``reduce``, ``accumulate``, ``reduceat``, ``outer`` and ``at`` methods. Close PyCQA/pylint2885 * ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings Close PyCQA/pylint3306 * The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray`` Close PyCQA/pylint3139 * Don't ignore special methods when inspecting gi classes Close 728 * Added transform for ``scipy.gaussian`` * Add support for inferring properties. * Added a brain for ``responses`` * Allow inferring positional only arguments. * Retry parsing a module that has invalid type comments It is possible for a module to use comments that might be interpreted as type comments by the `ast` library. We do not want to completely crash on those invalid type comments. Close 708 * Scope the inference to the current bound node when inferring instances of classes When inferring instances of classes from arguments, such as ``self`` in a bound method, we could use as a hint the context's ``boundnode``, which indicates the instance from which the inference originated. As an example, a subclass that uses a parent's method which returns ``self``, will override the ``self`` to point to it instead of pointing to the parent class. Close PyCQA/pylint3157 * Add support for inferring exception instances in all contexts We were able to infer exception instances as ``ExceptionInstance`` only for a handful of cases, but not all. ``ExceptionInstance`` has support for better inference of `.args` and other exception related attributes that normal instances do not have. This additional support should remove certain false positives related to ``.args`` and other exception attributes in ``pylint``. Close PyCQA/pylint2333 * Add more supported parameters to ``subprocess.check_output`` Close 722 * Infer args unpacking of ``self`` Certain stdlib modules use ``*args`` to encapsulate the ``self`` parameter, which results in uninferable instances given we rely on the presence of the ``self`` argument to figure out the instance where we should be setting attributes. Close PyCQA/pylint3216 * Clean up setup.py Make pytest-runner a requirement only if running tests, similar to what was done with McCabe. Clean up the setup.py file, resolving a handful of minor warnings with it. * Handle StopIteration error in infer_int. Close PyCQA/pylint3274 * Can access per argument type comments for positional only and keyword only arguments. The comments are accessed through through the new ``Arguments.type_comment_posonlyargs`` and ``Arguments.type_comment_kwonlyargs`` attributes respectively. * Relax upper bound on `wrapt` Close 755 * Properly analyze CFFI compiled extensions. ``` ### 2.3.2 ``` ============================ Release date: 2019-10-18 * All type comments have as parent the corresponding `astroid` node Until now they had as parent the builtin `ast` node which meant we were operating with primitive objects instead of our own. Close PyCQA/pylint3174 * Pass an inference context to `metaclass()` when inferring an object type This should prevent a bunch of recursion errors happening in pylint. Also refactor the inference of `IfExp` nodes to use separate contexts for each potential branch. Close PyCQA/pylint3152 Close PyCQA/pylint3159 ``` ### 2.3.1 ``` ============================ Release date: 2019-09-30 * A transform for the builtin `dataclasses` module was added. This should address various `dataclasses` issues that were surfaced even more after the release of pylint 2.4.0. In the previous versions of `astroid`, annotated assign nodes were allowed to be retrieved via `getattr()` but that no longer happens with the latest `astroid` release, as those attribute are not actual attributes, but rather virtual ones, thus an operation such as `getattr()` does not make sense for them. * Update attr brain to partly understand annotated attributes Close 656 ``` ### 2.3.0 ``` ============================ Release date: 2019-09-24 * Add a brain tip for ``subprocess.check_output`` Close 689 * Remove NodeNG.nearest method because of lack of usage in astroid and pylint. Close 691 * Allow importing wheel files. Close 541 * Annotated AST follows PEP8 coding style when converted to string. * Fix a bug where defining a class using type() could cause a DuplicateBasesError. Close 644 * Dropped support for Python 3.4. * Numpy brain support is improved. Numpy's fundamental type ``numpy.ndarray`` has its own brain : ``brain_numpy_ndarray`` and each numpy module that necessitates brain action has now its own numpy brain : - ``numpy.core.numeric`` - ``numpy.core.function_base`` - ``numpy.core.multiarray`` - ``numpy.core.numeric`` - ``numpy.core.numerictypes`` - ``numpy.core.umath`` - ``numpy.random.mtrand`` Close PyCQA/pylint2865 Close PyCQA/pylint2747 Close PyCQA/pylint2721 Close PyCQA/pylint2326 Close PyCQA/pylint2021 * ``assert`` only functions are properly inferred as returning ``None`` Close 668 * Add support for Python 3.8's `NamedExpr` nodes, which is part of assignment expressions. Close 674 * Added support for inferring `IfExp` nodes. * Instances of exceptions are inferred as such when inferring in non-exception context This allows special inference support for exception attributes such as `.args`. Close PyCQA/pylint2333 * Drop a superfluous and wrong callcontext when inferring the result of a context manager Close PyCQA/pylint2859 * ``igetattr`` raises ``InferenceError`` on re-inference of the same object This prevents ``StopIteration`` from leaking when we encounter the same object in the current context, which could result in various ``RuntimeErrors`` leaking in other parts of the inference. Until we get a global context per inference, the solution is sort of a hack, as with the suggested global context improvement, we could theoretically reuse the same inference object. Close 663 * Variable annotations can no longer be retrieved with `ClassDef.getattr` Unless they have an attached value, class variable annotations can no longer be retrieved with `ClassDef.getattr.` * Improved builtin inference for ``tuple``, ``set``, ``frozenset``, ``list`` and ``dict`` We were properly inferring these callables *only* if they had consts as values, but that is not the case most of the time. Instead we try to infer the values that their arguments can be and use them instead of assuming Const nodes all the time. Close PyCQA/pylint2841 * The last except handler wins when inferring variables bound in an except handler. Close PyCQA/pylint2777 * ``threading.Lock.locked()`` is properly recognized as a member of ``threading.Lock`` Close PyCQA/pylint2791 * Fix recursion error involving ``len`` and self referential attributes Close PyCQA/pylint2736 Close PyCQA/pylint2734 Close PyCQA/pylint2740 * Can access per argument type comments through new ``Arguments.type_comment_args`` attribute. Close 665 * Fix being unable to access class attributes on a NamedTuple. Close PyCQA/pylint1628 * Fixed being unable to find distutils submodules by name when in a virtualenv. Close PyCQA/pylint73 ``` ### 2.2.0 ``` ============================ Release date: 2019-02-27 * Fix a bug concerning inference of calls to numpy function that should not return Tuple or List instances. Close PyCQA/pylint2436 * Fix a bug where a method, which is a lambda built from a function, is not inferred as ``BoundMethod`` Close PyCQA/pylint2594 * ``typed_ast`` gets installed for Python 3.7, meaning type comments can now work on 3.7. * Fix a bug concerning inference of unary operators on numpy types. Close PyCQA/pylint2436 (first part) * Fix a crash with ``typing.NamedTuple`` and empty fields. Close PyCQA/pylint2745 * Add a proper ``strerror`` inference to the ``OSError`` exceptions. Close PyCQA/pylint2553 * Support non-const nodes as values of Enum attributes. Close 612 * Fix a crash in the ``enum`` brain tip caused by non-assign members in class definitions. Close PyCQA/pylint2719 * ``brain_numpy`` returns an undefined type for ``numpy`` methods to avoid ``assignment-from-no-return`` Close PyCQA/pylint2694 * Fix a bug where a call to a function that has been previously called via functools.partial was wrongly inferred Close PyCQA/pylint2588 * Fix a recursion error caused by inferring the ``slice`` builtin. Close PyCQA/pylint2667 * Remove the restriction that "old style classes" cannot have a MRO. This does not make sense any longer given that we run against Python 3 code. Close