Changelog
### 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
### 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.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.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, PR 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.4.2
```
============================
Release Date: TBA
* `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests
Close PyCQA/pylint3519
* Properly construct the arguments of infered 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 suport 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: TBA
* 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 PyCQA/pylint2701
* Added more builtin exceptions attributes. Close 580
* Add a registry for builtin exception models. Close PyCQA/pylint1432
* Add brain tips for `http.client`. Close PyCQA/pylint2687
* Prevent crashing when processing ``enums`` with mixed single and double quotes.
Close PyCQA/pylint2676
* ``typing`` types have the `__args__` property. Close PyCQA/pylint2419
* Fix a bug where an Attribute used as a base class was triggering a crash
Close 626
* Added special support for `enum.IntFlag`
Close PyCQA/pylint2534
* Extend detection of data classes defined with attr
Close 628
* Fix typo in description for brain_attrs
```
### 2.1.0
```
============================
Release Date: 2018-11-25
* ``threading.Lock.acquire`` has the ``timeout`` parameter now.
Close PyCQA/pylint2457
* Pass parameters by keyword name when inferring sequences.
Close PyCQA/pylint2526
* Correct line numbering for f-strings for complex embedded expressions
When a f-string contained a complex expression, such as an attribute access,
we weren't cloning all the subtree of the f-string expression for attaching the correct
line number. This problem is coming from the builtin AST parser which gives for the f-string
and for its underlying elements the line number 1, but this is causing all sorts of bugs and
problems in pylint, which expects correct line numbering.
Close PyCQA/pylint2449
* Add support for `argparse.Namespace`
Close PyCQA/pylint2413
* `async` functions are now inferred as `AsyncGenerator` when inferring their call result.
* Filter out ``Uninferable`` when inferring the call result result of a class with an uninferable ``__call__`` method.
Close PyCQA/pylint2434
* Make compatible with AST changes in Python 3.8.
* Subscript inference (e.g. "`a[i]`") now pays attention to multiple inferred values for value
(e.g. "`a`") and slice (e.g. "`i`")
Close 614
```
### 2.0.4
```
============================
Release Date: 2018-08-10
* Make sure that assign nodes can find ``yield`` statements in their values
Close PyCQA/pylint2400
```
### 2.0.3
```
============================
Release Date: 2018-08-08
* The environment markers for PyPy were invalid.
```
### 2.0.2
```
============================
Release Date: 2018-08-01
* Stop repeat inference attempt causing a RuntimeError in Python3.7
Close PyCQA/pylint2317
* infer_call_result can raise InferenceError so make sure to handle that for the call sites
where it is used
infer_call_result started recently to raise InferenceError for objects for which it
could not find any returns. Previously it was silently raising a StopIteration,
which was especially leaking when calling builtin methods.
Since it is after all an inference method, it is expected that it
could raise an InferenceError rather than returning nothing.
Close PyCQA/pylint2350
```
### 2.0.1
```
============================
Release Date: 2018-07-19
* Released to clear an old wheel package on PyPI
```
### 2.0
```
==========================
Release Date: 2018-07-15
* String representation of nodes takes in account precedence and associativity rules of operators.
* Fix loading files with `modutils.load_from_module` when
the path that contains it in `sys.path` is a symlink and
the file is contained in a symlinked folder.
Close 583
* Reworking of the numpy brain dealing with numerictypes
(use of inspect module to determine the class hierarchy of
numpy.core.numerictypes module)
Close PyCQA/pylint2140
* Added inference support for starred nodes in for loops
Close 146
* Support unpacking for dicts in assignments
Close 268
* Add support for inferring functools.partial
Close 125
* Inference support for `dict.fromkeys`
Close 110
* `int()` builtin is inferred as returning integers.
Close 150
* `str()` builtin is inferred as returning strings.
Close 148
* DescriptorBoundMethod has the correct number of arguments defined.
* Improvement of the numpy numeric types definition.
Close PyCQA/pylint1971
* Subclasses of *property* are now interpreted as properties
Close PyCQA/pylint1601
* AsStringRegexpPredicate has been removed.
Use transform predicates instead of it.
* Switched to using typed_ast for getting access to type comments
As a side effect of this change, some nodes gained a new `type_annotation` attribute,
which, if the type comments were correctly parsed, should contain a node object
with the corresponding objects from the type comment.
* typing.X[...] and typing.NewType are inferred as classes instead of instances.
* Module.__path__ is now a list
It used to be a string containing the path, but it doesn't reflect the situation
on Python, where it is actually a list.
* Fix a bug with namespace package's __path__ attribute.
Close 528
* Added brain tips for random.sample
Part of PyCQA/pylint811
* Add brain tip for `issubclass` builtin
Close 101.
* Fix submodule imports from six
Close PyCQA/pylint1640
* Fix missing __module__ and __qualname__ from class definition locals
Close PYCQA/pylint1753
* Fix a crash when __annotations__ access a parent's __init__ that does not have arguments
Close 473
* Fix multiple objects sharing the same InferenceContext.path causing uninferable results
Close 483
* Fix improper modification of col_offset, lineno upon inference of builtin functions
Close PyCQA/pylint1839
* Subprocess.Popen brain now knows of the args member
Close PyCQA/pylint1860
* add move_to_end method to collections.OrderedDict brain
Close PyCQA/pylint1872
* Include new hashlib classes added in python 3.6
* Fix RecursionError for augmented assign
Close 437, 447, 313, PyCQA/pylint1642, PyCQA/pylint1805, PyCQA/pylint1854, PyCQA/pylint1452
* Add missing attrs special attribute
Close PyCQA/pylint1884
* Inference now understands the 'isinstance' builtin
Close 98
* Stop duplicate nodes with the same key values
from appearing in dictionaries from dictionary unpacking.
Close PyCQA/pylint1843
* Fix ``contextlib.contextmanager`` inference for nested context managers
Close 1699
* Implement inference for len builtin
Close 112
* Add qname method to Super object preventing potential errors in upstream
pylint
Close 533
* Stop astroid from getting stuck in an infinite loop if a function shares
its name with its decorator
Close 375
* Fix issue with inherited __call__ improperly inferencing self
Close PyCQA/pylint2199
* Fix __call__ precedence for classes with custom metaclasses
Close PyCQA/pylint2159
* Limit the maximum amount of interable result in an NodeNG.infer() call to
100 by default for performance issues with variables with large amounts of
possible values.
The max inferable value can be tuned by setting the `max_inferable_values` flag on
astroid.MANAGER.
```
Links
- PyPI: https://pypi.org/project/astroid
- Changelog: https://pyup.io/changelogs/astroid/
- Repo: https://github.com/PyCQA/astroid
Changelog
### 19.3.0
```
-------------------
Changes
^^^^^^^
- Fixed ``auto_attribs`` usage when default values cannot be compared directly with ``==``, such as ``numpy`` arrays.
`585 <https://github.com/python-attrs/attrs/issues/585>`_
----
```
### 19.2.0
```
-------------------
Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Removed deprecated ``Attribute`` attribute ``convert`` per scheduled removal on 2019/1.
This planned deprecation is tracked in issue `307 <https://github.com/python-attrs/attrs/issues/307>`_.
`504 <https://github.com/python-attrs/attrs/issues/504>`_
- ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` do not consider subclasses comparable anymore.
This has been deprecated since 18.2.0 and was raising a ``DeprecationWarning`` for over a year.
`570 <https://github.com/python-attrs/attrs/issues/570>`_
Deprecations
^^^^^^^^^^^^
- The ``cmp`` argument to ``attr.s()`` and ``attr.ib()`` is now deprecated.
Please use ``eq`` to add equality methods (``__eq__`` and ``__ne__``) and ``order`` to add ordering methods (``__lt__``, ``__le__``, ``__gt__``, and ``__ge__``) instead – just like with `dataclasses <https://docs.python.org/3/library/dataclasses.html>`_.
Both are effectively ``True`` by default but it's enough to set ``eq=False`` to disable both at once.
Passing ``eq=False, order=True`` explicitly will raise a ``ValueError`` though.
Since this is arguably a deeper backward-compatibility break, it will have an extended deprecation period until 2021-06-01.
After that day, the ``cmp`` argument will be removed.
``attr.Attribute`` also isn't orderable anymore.
`574 <https://github.com/python-attrs/attrs/issues/574>`_
Changes
^^^^^^^
- Updated ``attr.validators.__all__`` to include new validators added in `425`_.
`517 <https://github.com/python-attrs/attrs/issues/517>`_
- Slotted classes now use a pure Python mechanism to rewrite the ``__class__`` cell when rebuilding the class, so ``super()`` works even on environments where ``ctypes`` is not installed.
`522 <https://github.com/python-attrs/attrs/issues/522>`_
- When collecting attributes using ``attr.s(auto_attribs=True)``, attributes with a default of ``None`` are now deleted too.
`523 <https://github.com/python-attrs/attrs/issues/523>`_,
`556 <https://github.com/python-attrs/attrs/issues/556>`_
- Fixed ``attr.validators.deep_iterable()`` and ``attr.validators.deep_mapping()`` type stubs.
`533 <https://github.com/python-attrs/attrs/issues/533>`_
- ``attr.validators.is_callable()`` validator now raises an exception ``attr.exceptions.NotCallableError``, a subclass of ``TypeError``, informing the received value.
`536 <https://github.com/python-attrs/attrs/issues/536>`_
- ``attr.s(auto_exc=True)`` now generates classes that are hashable by ID, as the documentation always claimed it would.
`543 <https://github.com/python-attrs/attrs/issues/543>`_,
`563 <https://github.com/python-attrs/attrs/issues/563>`_
- Added ``attr.validators.matches_re()`` that checks string attributes whether they match a regular expression.
`552 <https://github.com/python-attrs/attrs/issues/552>`_
- Keyword-only attributes (``kw_only=True``) and attributes that are excluded from the ``attrs``'s ``__init__`` (``init=False``) now can appear before mandatory attributes.
`559 <https://github.com/python-attrs/attrs/issues/559>`_
- The fake filename for generated methods is now more stable.
It won't change when you restart the process.
`560 <https://github.com/python-attrs/attrs/issues/560>`_
- The value passed to ``attr.ib(repr=…)`` can now be either a boolean (as before) or a callable.
That callable must return a string and is then used for formatting the attribute by the generated ``__repr__()`` method.
`568 <https://github.com/python-attrs/attrs/issues/568>`_
- Added ``attr.__version_info__`` that can be used to reliably check the version of ``attrs`` and write forward- and backward-compatible code.
Please check out the `section on deprecated APIs <http://www.attrs.org/en/stable/api.htmldeprecated-apis>`_ on how to use it.
`580 <https://github.com/python-attrs/attrs/issues/580>`_
.. _`425`: https://github.com/python-attrs/attrs/issues/425
----
```
### 19.1.0
```
-------------------
Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Fixed a bug where deserialized objects with ``cache_hash=True`` could have incorrect hash code values.
This change breaks classes with ``cache_hash=True`` when a custom ``__setstate__`` is present.
An exception will be thrown when applying the ``attrs`` annotation to such a class.
This limitation is tracked in issue `494 <https://github.com/python-attrs/attrs/issues/494>`_.
`482 <https://github.com/python-attrs/attrs/issues/482>`_
Changes
^^^^^^^
- Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators.
* ``is_callable``: validates that a value is callable
* ``deep_iterable``: Allows recursion down into an iterable,
applying another validator to every member in the iterable
as well as applying an optional validator to the iterable itself.
* ``deep_mapping``: Allows recursion down into the items in a mapping object,
applying a key validator and a value validator to the key and value in every item.
Also applies an optional validator to the mapping object itself.
You can find them in the ``attr.validators`` package.
`425`_
- Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option.
`443 <https://github.com/python-attrs/attrs/issues/443>`_
- Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes.
`450 <https://github.com/python-attrs/attrs/issues/450>`_
- ``attrs`` now has first class support for defining exception classes.
If you define a class using ``attr.s(auto_exc=True)`` and subclass an exception, the class will behave like a well-behaved exception class including an appropriate ``__str__`` method, and all attributes additionally available in an ``args`` attribute.
`500 <https://github.com/python-attrs/attrs/issues/500>`_
- Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced).
`503 <https://github.com/python-attrs/attrs/issues/503>`_
----
```
### 18.2.0
```
-------------------
Deprecations
^^^^^^^^^^^^
- Comparing subclasses using ``<``, ``>``, ``<=``, and ``>=`` is now deprecated.
The docs always claimed that instances are only compared if the types are identical, so this is a first step to conform to the docs.
Equality operators (``==`` and ``!=``) were always strict in this regard.
`394 <https://github.com/python-attrs/attrs/issues/394>`_
Changes
^^^^^^^
- ``attrs`` now ships its own `PEP 484 <https://www.python.org/dev/peps/pep-0484/>`_ type hints.
Together with `mypy <http://mypy-lang.org>`_'s ``attrs`` plugin, you've got all you need for writing statically typed code in both Python 2 and 3!
At that occasion, we've also added `narrative docs <https://www.attrs.org/en/stable/types.html>`_ about type annotations in ``attrs``.
`238 <https://github.com/python-attrs/attrs/issues/238>`_
- Added *kw_only* arguments to ``attr.ib`` and ``attr.s``, and a corresponding *kw_only* attribute to ``attr.Attribute``.
This change makes it possible to have a generated ``__init__`` with keyword-only arguments on Python 3, relaxing the required ordering of default and non-default valued attributes.
`281 <https://github.com/python-attrs/attrs/issues/281>`_,
`411 <https://github.com/python-attrs/attrs/issues/411>`_
- The test suite now runs with ``hypothesis.HealthCheck.too_slow`` disabled to prevent CI breakage on slower computers.
`364 <https://github.com/python-attrs/attrs/issues/364>`_,
`396 <https://github.com/python-attrs/attrs/issues/396>`_
- ``attr.validators.in_()`` now raises a ``ValueError`` with a useful message even if the options are a string and the value is not a string.
`383 <https://github.com/python-attrs/attrs/issues/383>`_
- ``attr.asdict()`` now properly handles deeply nested lists and dictionaries.
`395 <https://github.com/python-attrs/attrs/issues/395>`_
- Added ``attr.converters.default_if_none()`` that allows to replace ``None`` values in attributes.
For example ``attr.ib(converter=default_if_none(""))`` replaces ``None`` by empty strings.
`400 <https://github.com/python-attrs/attrs/issues/400>`_,
`414 <https://github.com/python-attrs/attrs/issues/414>`_
- Fixed a reference leak where the original class would remain live after being replaced when ``slots=True`` is set.
`407 <https://github.com/python-attrs/attrs/issues/407>`_
- Slotted classes can now be made weakly referenceable by passing ``attr.s(weakref_slot=True)``.
`420 <https://github.com/python-attrs/attrs/issues/420>`_
- Added *cache_hash* option to ``attr.s`` which causes the hash code to be computed once and stored on the object.
`426 <https://github.com/python-attrs/attrs/issues/426>`_
- Attributes can be named ``property`` and ``itemgetter`` now.
`430 <https://github.com/python-attrs/attrs/issues/430>`_
- It is now possible to override a base class' class variable using only class annotations.
`431 <https://github.com/python-attrs/attrs/issues/431>`_
----
```
Links
- PyPI: https://pypi.org/project/attrs
- Changelog: https://pyup.io/changelogs/attrs/
- Homepage: https://www.attrs.org/
Changelog
### 5.2.1
```
----------------------------
- The dark mode HTML report still used light colors for the context listing,
making them unreadable (`issue 1009`_). This is now fixed.
- The time stamp on the HTML report now includes the time zone. Thanks, Xie
Yanbo (`pull request 960`_).
.. _pull request 960: https://github.com/nedbat/coveragepy/pull/960
.. _issue 1009: https://github.com/nedbat/coveragepy/issues/1009
.. _changes_52:
```
### 5.2
```
--------------------------
- The HTML report has been redesigned by Vince Salvino. There is now a dark
mode, the code text is larger, and system sans serif fonts are used, in
addition to other small changes (`issue 858`_ and `pull request 931`_).
- The ``coverage report`` and ``coverage html`` commands now accept a
``--precision`` option to control the number of decimal points displayed.
Thanks, Teake Nutma (`pull request 982`_).
- The ``coverage report`` and ``coverage html`` commands now accept a
``--no-skip-covered`` option to negate ``--skip-covered``. Thanks, Anthony
Sottile (`issue 779`_ and `pull request 932`_).
- The ``--skip-empty`` option is now available for the XML report, closing
`issue 976`_.
- The ``coverage report`` command now accepts a ``--sort`` option to specify
how to sort the results. Thanks, Jerin Peter George (`pull request 1005`_).
- If coverage fails due to the coverage total not reaching the ``--fail-under``
value, it will now print a message making the condition clear. Thanks,
Naveen Yadav (`pull request 977`_).
- TOML configuration files with non-ASCII characters would cause errors on
Windows (`issue 990`_). This is now fixed.
- The output of ``--debug=trace`` now includes information about how the
``--source`` option is being interpreted, and the module names being
considered.
.. _pull request 931: https://github.com/nedbat/coveragepy/pull/931
.. _pull request 932: https://github.com/nedbat/coveragepy/pull/932
.. _pull request 977: https://github.com/nedbat/coveragepy/pull/977
.. _pull request 982: https://github.com/nedbat/coveragepy/pull/982
.. _pull request 1005: https://github.com/nedbat/coveragepy/pull/1005
.. _issue 779: https://github.com/nedbat/coveragepy/issues/779
.. _issue 858: https://github.com/nedbat/coveragepy/issues/858
.. _issue 976: https://github.com/nedbat/coveragepy/issues/976
.. _issue 990: https://github.com/nedbat/coveragepy/issues/990
.. _changes_51:
```
### 5.1
```
--------------------------
- The JSON report now includes counts of covered and missing branches. Thanks,
Salvatore Zagaria.
- On Python 3.8, try-finally-return reported wrong branch coverage with
decorated async functions (`issue 964`_). This is now fixed. Thanks, Kjell
Braden.
- The :meth:`~coverage.Coverage.get_option` and
:meth:`~coverage.Coverage.set_option` methods can now manipulate the
``[paths]`` configuration setting. Thanks to Bernát Gábor for the fix for
`issue 967`_.
.. _issue 964: https://github.com/nedbat/coveragepy/issues/964
.. _issue 967: https://github.com/nedbat/coveragepy/issues/967
.. _changes_504:
```
### 5.0.4
```
----------------------------
- If using the ``[run] relative_files`` setting, the XML report will use
relative files in the ``<source>`` elements indicating the location of source
code. Closes `issue 948`_.
- The textual summary report could report missing lines with negative line
numbers on PyPy3 7.1 (`issue 943`_). This is now fixed.
- Windows wheels for Python 3.8 were incorrectly built, but are now fixed.
(`issue 949`_)
- Updated Python 3.9 support to 3.9a4.
- HTML reports couldn't be sorted if localStorage wasn't available. This is now
fixed: sorting works even though the sorting setting isn't retained. (`issue
944`_ and `pull request 945`_). Thanks, Abdeali Kothari.
.. _issue 943: https://github.com/nedbat/coveragepy/issues/943
.. _issue 944: https://github.com/nedbat/coveragepy/issues/944
.. _pull request 945: https://github.com/nedbat/coveragepy/pull/945
.. _issue 948: https://github.com/nedbat/coveragepy/issues/948
.. _issue 949: https://github.com/nedbat/coveragepy/issues/949
.. _changes_503:
```
### 5.0.3
```
----------------------------
- A performance improvement in 5.0.2 didn't work for test suites that changed
directory before combining data, causing "Couldn't use data file: no such
table: meta" errors (`issue 916`_). This is now fixed.
- Coverage could fail to run your program with some form of "ModuleNotFound" or
"ImportError" trying to import from the current directory. This would happen
if coverage had been packaged into a zip file (for example, on Windows), or
was found indirectly (for example, by pyenv-virtualenv). A number of
different scenarios were described in `issue 862`_ which is now fixed. Huge
thanks to Agbonze O. Jeremiah for reporting it, and Alexander Waters and
George-Cristian Bîrzan for protracted debugging sessions.
- Added the "premain" debug option.
- Added SQLite compile-time options to the "debug sys" output.
.. _issue 862: https://github.com/nedbat/coveragepy/issues/862
.. _issue 916: https://github.com/nedbat/coveragepy/issues/916
.. _changes_502:
```
### 5.0.2
```
----------------------------
- Programs that used multiprocessing and changed directories would fail under
coverage. This is now fixed (`issue 890`_). A side effect is that debug
information about the config files read now shows absolute paths to the
files.
- When running programs as modules (``coverage run -m``) with ``--source``,
some measured modules were imported before coverage starts. This resulted in
unwanted warnings ("Already imported a file that will be measured") and a
reduction in coverage totals (`issue 909`_). This is now fixed.
- If no data was collected, an exception about "No data to report" could happen
instead of a 0% report being created (`issue 884`_). This is now fixed.
- The handling of source files with non-encodable file names has changed.
Previously, if a file name could not be encoded as UTF-8, an error occurred,
as described in `issue 891`_. Now, those files will not be measured, since
their data would not be recordable.
- A new warning ("dynamic-conflict") is issued if two mechanisms are trying to
change the dynamic context. Closes `issue 901`_.
- ``coverage run --debug=sys`` would fail with an AttributeError. This is now
fixed (`issue 907`_).
.. _issue 884: https://github.com/nedbat/coveragepy/issues/884
.. _issue 890: https://github.com/nedbat/coveragepy/issues/890
.. _issue 891: https://github.com/nedbat/coveragepy/issues/891
.. _issue 901: https://github.com/nedbat/coveragepy/issues/901
.. _issue 907: https://github.com/nedbat/coveragepy/issues/907
.. _issue 909: https://github.com/nedbat/coveragepy/issues/909
.. _changes_501:
```
### 5.0.1
```
----------------------------
- If a 4.x data file is the cause of a "file is not a database" error, then use
a more specific error message, "Looks like a coverage 4.x data file, are you
mixing versions of coverage?" Helps diagnose the problems described in
`issue 886`_.
- Measurement contexts and relative file names didn't work together, as
reported in `issue 899`_ and `issue 900`_. This is now fixed, thanks to
David Szotten.
- When using ``coverage run --concurrency=multiprocessing``, all data files
should be named with parallel-ready suffixes. 5.0 mistakenly named the main
process' file with no suffix when using ``--append``. This is now fixed,
closing `issue 880`_.
- Fixed a problem on Windows when the current directory is changed to a
different drive (`issue 895`_). Thanks, Olivier Grisel.
- Updated Python 3.9 support to 3.9a2.
.. _issue 880: https://github.com/nedbat/coveragepy/issues/880
.. _issue 886: https://github.com/nedbat/coveragepy/issues/886
.. _issue 895: https://github.com/nedbat/coveragepy/issues/895
.. _issue 899: https://github.com/nedbat/coveragepy/issues/899
.. _issue 900: https://github.com/nedbat/coveragepy/issues/900
.. _changes_50:
```
### 5.0
```
--------------------------
Nothing new beyond 5.0b2.
.. _changes_50b2:
```
### 5.0b2
```
----------------------------
- An experimental ``[run] relative_files`` setting tells coverage to store
relative file names in the data file. This makes it easier to run tests in
one (or many) environments, and then report in another. It has not had much
real-world testing, so it may change in incompatible ways in the future.
- When constructing a :class:`coverage.Coverage` object, `data_file` can be
specified as None to prevent writing any data file at all. In previous
versions, an explicit `data_file=None` argument would use the default of
".coverage". Fixes `issue 871`_.
- Python files run with ``-m`` now have ``__spec__`` defined properly. This
fixes `issue 745`_ (about not being able to run unittest tests that spawn
subprocesses), and `issue 838`_, which described the problem directly.
- The ``[paths]`` configuration section is now ordered. If you specify more
than one list of patterns, the first one that matches will be used. Fixes
`issue 649`_.
- The :func:`.coverage.numbits.register_sqlite_functions` function now also
registers `numbits_to_nums` for use in SQLite queries. Thanks, Simon
Willison.
- Python 3.9a1 is supported.
- Coverage.py has a mascot: :ref:`Sleepy Snake <sleepy>`.
.. _issue 649: https://github.com/nedbat/coveragepy/issues/649
.. _issue 745: https://github.com/nedbat/coveragepy/issues/745
.. _issue 838: https://github.com/nedbat/coveragepy/issues/838
.. _issue 871: https://github.com/nedbat/coveragepy/issues/871
.. _changes_50b1:
```
### 5.0b1
```
----------------------------
- The HTML and textual reports now have a ``--skip-empty`` option that skips
files with no statements, notably ``__init__.py`` files. Thanks, Reya B.
- Configuration can now be read from `TOML`_ files. This requires installing
coverage.py with the ``[toml]`` extra. The standard "pyproject.toml" file
will be read automatically if no other configuration file is found, with
settings in the ``[tool.coverage.]`` namespace. Thanks to Frazer McLean for
implementation and persistence. Finishes `issue 664`_.
- The ``[run] note`` setting has been deprecated. Using it will result in a
warning, and the note will not be written to the data file. The
corresponding :class:`.CoverageData` methods have been removed.
- The HTML report has been reimplemented (no more table around the source
code). This allowed for a better presentation of the context information,
hopefully resolving `issue 855`_.
- Added sqlite3 module version information to ``coverage debug sys`` output.
- Asking the HTML report to show contexts (``[html] show_contexts=True`` or
``coverage html --show-contexts``) will issue a warning if there were no
contexts measured (`issue 851`_).
.. _TOML: https://github.com/toml-lang/tomlreadme
.. _issue 664: https://github.com/nedbat/coveragepy/issues/664
.. _issue 851: https://github.com/nedbat/coveragepy/issues/851
.. _issue 855: https://github.com/nedbat/coveragepy/issues/855
.. _changes_50a8:
```
### 5.0a8
```
----------------------------
- The :class:`.CoverageData` API has changed how queries are limited to
specific contexts. Now you use :meth:`.CoverageData.set_query_context` to
set a single exact-match string, or :meth:`.CoverageData.set_query_contexts`
to set a list of regular expressions to match contexts. This changes the
command-line ``--contexts`` option to use regular expressions instead of
filename-style wildcards.
.. _changes_50a7:
```
### 5.0a7
```
----------------------------
- Data can now be "reported"
Update certifi from 2018.4.16 to 2020.6.20.
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 decorator from 4.3.0 to 4.4.2.
Changelog
### 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.0.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 2.10.
Changelog
### 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.24.0.
Changelog
### 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.15.0.
Changelog
### 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.25.10.
Changelog
### 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, PR 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.17.0.
Changelog
### 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.4.2.
Changelog
### 2.4.2 ``` ============================ Release Date: TBA * `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests Close PyCQA/pylint3519 * Properly construct the arguments of infered 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 suport 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: TBA * 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 PyCQA/pylint2701 * Added more builtin exceptions attributes. Close 580 * Add a registry for builtin exception models. Close PyCQA/pylint1432 * Add brain tips for `http.client`. Close PyCQA/pylint2687 * Prevent crashing when processing ``enums`` with mixed single and double quotes. Close PyCQA/pylint2676 * ``typing`` types have the `__args__` property. Close PyCQA/pylint2419 * Fix a bug where an Attribute used as a base class was triggering a crash Close 626 * Added special support for `enum.IntFlag` Close PyCQA/pylint2534 * Extend detection of data classes defined with attr Close 628 * Fix typo in description for brain_attrs ``` ### 2.1.0 ``` ============================ Release Date: 2018-11-25 * ``threading.Lock.acquire`` has the ``timeout`` parameter now. Close PyCQA/pylint2457 * Pass parameters by keyword name when inferring sequences. Close PyCQA/pylint2526 * Correct line numbering for f-strings for complex embedded expressions When a f-string contained a complex expression, such as an attribute access, we weren't cloning all the subtree of the f-string expression for attaching the correct line number. This problem is coming from the builtin AST parser which gives for the f-string and for its underlying elements the line number 1, but this is causing all sorts of bugs and problems in pylint, which expects correct line numbering. Close PyCQA/pylint2449 * Add support for `argparse.Namespace` Close PyCQA/pylint2413 * `async` functions are now inferred as `AsyncGenerator` when inferring their call result. * Filter out ``Uninferable`` when inferring the call result result of a class with an uninferable ``__call__`` method. Close PyCQA/pylint2434 * Make compatible with AST changes in Python 3.8. * Subscript inference (e.g. "`a[i]`") now pays attention to multiple inferred values for value (e.g. "`a`") and slice (e.g. "`i`") Close 614 ``` ### 2.0.4 ``` ============================ Release Date: 2018-08-10 * Make sure that assign nodes can find ``yield`` statements in their values Close PyCQA/pylint2400 ``` ### 2.0.3 ``` ============================ Release Date: 2018-08-08 * The environment markers for PyPy were invalid. ``` ### 2.0.2 ``` ============================ Release Date: 2018-08-01 * Stop repeat inference attempt causing a RuntimeError in Python3.7 Close PyCQA/pylint2317 * infer_call_result can raise InferenceError so make sure to handle that for the call sites where it is used infer_call_result started recently to raise InferenceError for objects for which it could not find any returns. Previously it was silently raising a StopIteration, which was especially leaking when calling builtin methods. Since it is after all an inference method, it is expected that it could raise an InferenceError rather than returning nothing. Close PyCQA/pylint2350 ``` ### 2.0.1 ``` ============================ Release Date: 2018-07-19 * Released to clear an old wheel package on PyPI ``` ### 2.0 ``` ========================== Release Date: 2018-07-15 * String representation of nodes takes in account precedence and associativity rules of operators. * Fix loading files with `modutils.load_from_module` when the path that contains it in `sys.path` is a symlink and the file is contained in a symlinked folder. Close 583 * Reworking of the numpy brain dealing with numerictypes (use of inspect module to determine the class hierarchy of numpy.core.numerictypes module) Close PyCQA/pylint2140 * Added inference support for starred nodes in for loops Close 146 * Support unpacking for dicts in assignments Close 268 * Add support for inferring functools.partial Close 125 * Inference support for `dict.fromkeys` Close 110 * `int()` builtin is inferred as returning integers. Close 150 * `str()` builtin is inferred as returning strings. Close 148 * DescriptorBoundMethod has the correct number of arguments defined. * Improvement of the numpy numeric types definition. Close PyCQA/pylint1971 * Subclasses of *property* are now interpreted as properties Close PyCQA/pylint1601 * AsStringRegexpPredicate has been removed. Use transform predicates instead of it. * Switched to using typed_ast for getting access to type comments As a side effect of this change, some nodes gained a new `type_annotation` attribute, which, if the type comments were correctly parsed, should contain a node object with the corresponding objects from the type comment. * typing.X[...] and typing.NewType are inferred as classes instead of instances. * Module.__path__ is now a list It used to be a string containing the path, but it doesn't reflect the situation on Python, where it is actually a list. * Fix a bug with namespace package's __path__ attribute. Close 528 * Added brain tips for random.sample Part of PyCQA/pylint811 * Add brain tip for `issubclass` builtin Close 101. * Fix submodule imports from six Close PyCQA/pylint1640 * Fix missing __module__ and __qualname__ from class definition locals Close PYCQA/pylint1753 * Fix a crash when __annotations__ access a parent's __init__ that does not have arguments Close 473 * Fix multiple objects sharing the same InferenceContext.path causing uninferable results Close 483 * Fix improper modification of col_offset, lineno upon inference of builtin functions Close PyCQA/pylint1839 * Subprocess.Popen brain now knows of the args member Close PyCQA/pylint1860 * add move_to_end method to collections.OrderedDict brain Close PyCQA/pylint1872 * Include new hashlib classes added in python 3.6 * Fix RecursionError for augmented assign Close 437, 447, 313, PyCQA/pylint1642, PyCQA/pylint1805, PyCQA/pylint1854, PyCQA/pylint1452 * Add missing attrs special attribute Close PyCQA/pylint1884 * Inference now understands the 'isinstance' builtin Close 98 * Stop duplicate nodes with the same key values from appearing in dictionaries from dictionary unpacking. Close PyCQA/pylint1843 * Fix ``contextlib.contextmanager`` inference for nested context managers Close 1699 * Implement inference for len builtin Close 112 * Add qname method to Super object preventing potential errors in upstream pylint Close 533 * Stop astroid from getting stuck in an infinite loop if a function shares its name with its decorator Close 375 * Fix issue with inherited __call__ improperly inferencing self Close PyCQA/pylint2199 * Fix __call__ precedence for classes with custom metaclasses Close PyCQA/pylint2159 * Limit the maximum amount of interable result in an NodeNG.infer() call to 100 by default for performance issues with variables with large amounts of possible values. The max inferable value can be tuned by setting the `max_inferable_values` flag on astroid.MANAGER. ```Links
- PyPI: https://pypi.org/project/astroid - Changelog: https://pyup.io/changelogs/astroid/ - Repo: https://github.com/PyCQA/astroidUpdate attrs from 18.1.0 to 19.3.0.
Changelog
### 19.3.0 ``` ------------------- Changes ^^^^^^^ - Fixed ``auto_attribs`` usage when default values cannot be compared directly with ``==``, such as ``numpy`` arrays. `585 <https://github.com/python-attrs/attrs/issues/585>`_ ---- ``` ### 19.2.0 ``` ------------------- Backward-incompatible Changes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Removed deprecated ``Attribute`` attribute ``convert`` per scheduled removal on 2019/1. This planned deprecation is tracked in issue `307 <https://github.com/python-attrs/attrs/issues/307>`_. `504 <https://github.com/python-attrs/attrs/issues/504>`_ - ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` do not consider subclasses comparable anymore. This has been deprecated since 18.2.0 and was raising a ``DeprecationWarning`` for over a year. `570 <https://github.com/python-attrs/attrs/issues/570>`_ Deprecations ^^^^^^^^^^^^ - The ``cmp`` argument to ``attr.s()`` and ``attr.ib()`` is now deprecated. Please use ``eq`` to add equality methods (``__eq__`` and ``__ne__``) and ``order`` to add ordering methods (``__lt__``, ``__le__``, ``__gt__``, and ``__ge__``) instead – just like with `dataclasses <https://docs.python.org/3/library/dataclasses.html>`_. Both are effectively ``True`` by default but it's enough to set ``eq=False`` to disable both at once. Passing ``eq=False, order=True`` explicitly will raise a ``ValueError`` though. Since this is arguably a deeper backward-compatibility break, it will have an extended deprecation period until 2021-06-01. After that day, the ``cmp`` argument will be removed. ``attr.Attribute`` also isn't orderable anymore. `574 <https://github.com/python-attrs/attrs/issues/574>`_ Changes ^^^^^^^ - Updated ``attr.validators.__all__`` to include new validators added in `425`_. `517 <https://github.com/python-attrs/attrs/issues/517>`_ - Slotted classes now use a pure Python mechanism to rewrite the ``__class__`` cell when rebuilding the class, so ``super()`` works even on environments where ``ctypes`` is not installed. `522 <https://github.com/python-attrs/attrs/issues/522>`_ - When collecting attributes using ``attr.s(auto_attribs=True)``, attributes with a default of ``None`` are now deleted too. `523 <https://github.com/python-attrs/attrs/issues/523>`_, `556 <https://github.com/python-attrs/attrs/issues/556>`_ - Fixed ``attr.validators.deep_iterable()`` and ``attr.validators.deep_mapping()`` type stubs. `533 <https://github.com/python-attrs/attrs/issues/533>`_ - ``attr.validators.is_callable()`` validator now raises an exception ``attr.exceptions.NotCallableError``, a subclass of ``TypeError``, informing the received value. `536 <https://github.com/python-attrs/attrs/issues/536>`_ - ``attr.s(auto_exc=True)`` now generates classes that are hashable by ID, as the documentation always claimed it would. `543 <https://github.com/python-attrs/attrs/issues/543>`_, `563 <https://github.com/python-attrs/attrs/issues/563>`_ - Added ``attr.validators.matches_re()`` that checks string attributes whether they match a regular expression. `552 <https://github.com/python-attrs/attrs/issues/552>`_ - Keyword-only attributes (``kw_only=True``) and attributes that are excluded from the ``attrs``'s ``__init__`` (``init=False``) now can appear before mandatory attributes. `559 <https://github.com/python-attrs/attrs/issues/559>`_ - The fake filename for generated methods is now more stable. It won't change when you restart the process. `560 <https://github.com/python-attrs/attrs/issues/560>`_ - The value passed to ``attr.ib(repr=…)`` can now be either a boolean (as before) or a callable. That callable must return a string and is then used for formatting the attribute by the generated ``__repr__()`` method. `568 <https://github.com/python-attrs/attrs/issues/568>`_ - Added ``attr.__version_info__`` that can be used to reliably check the version of ``attrs`` and write forward- and backward-compatible code. Please check out the `section on deprecated APIs <http://www.attrs.org/en/stable/api.htmldeprecated-apis>`_ on how to use it. `580 <https://github.com/python-attrs/attrs/issues/580>`_ .. _`425`: https://github.com/python-attrs/attrs/issues/425 ---- ``` ### 19.1.0 ``` ------------------- Backward-incompatible Changes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Fixed a bug where deserialized objects with ``cache_hash=True`` could have incorrect hash code values. This change breaks classes with ``cache_hash=True`` when a custom ``__setstate__`` is present. An exception will be thrown when applying the ``attrs`` annotation to such a class. This limitation is tracked in issue `494 <https://github.com/python-attrs/attrs/issues/494>`_. `482 <https://github.com/python-attrs/attrs/issues/482>`_ Changes ^^^^^^^ - Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators. * ``is_callable``: validates that a value is callable * ``deep_iterable``: Allows recursion down into an iterable, applying another validator to every member in the iterable as well as applying an optional validator to the iterable itself. * ``deep_mapping``: Allows recursion down into the items in a mapping object, applying a key validator and a value validator to the key and value in every item. Also applies an optional validator to the mapping object itself. You can find them in the ``attr.validators`` package. `425`_ - Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option. `443 <https://github.com/python-attrs/attrs/issues/443>`_ - Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes. `450 <https://github.com/python-attrs/attrs/issues/450>`_ - ``attrs`` now has first class support for defining exception classes. If you define a class using ``attr.s(auto_exc=True)`` and subclass an exception, the class will behave like a well-behaved exception class including an appropriate ``__str__`` method, and all attributes additionally available in an ``args`` attribute. `500 <https://github.com/python-attrs/attrs/issues/500>`_ - Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced). `503 <https://github.com/python-attrs/attrs/issues/503>`_ ---- ``` ### 18.2.0 ``` ------------------- Deprecations ^^^^^^^^^^^^ - Comparing subclasses using ``<``, ``>``, ``<=``, and ``>=`` is now deprecated. The docs always claimed that instances are only compared if the types are identical, so this is a first step to conform to the docs. Equality operators (``==`` and ``!=``) were always strict in this regard. `394 <https://github.com/python-attrs/attrs/issues/394>`_ Changes ^^^^^^^ - ``attrs`` now ships its own `PEP 484 <https://www.python.org/dev/peps/pep-0484/>`_ type hints. Together with `mypy <http://mypy-lang.org>`_'s ``attrs`` plugin, you've got all you need for writing statically typed code in both Python 2 and 3! At that occasion, we've also added `narrative docs <https://www.attrs.org/en/stable/types.html>`_ about type annotations in ``attrs``. `238 <https://github.com/python-attrs/attrs/issues/238>`_ - Added *kw_only* arguments to ``attr.ib`` and ``attr.s``, and a corresponding *kw_only* attribute to ``attr.Attribute``. This change makes it possible to have a generated ``__init__`` with keyword-only arguments on Python 3, relaxing the required ordering of default and non-default valued attributes. `281 <https://github.com/python-attrs/attrs/issues/281>`_, `411 <https://github.com/python-attrs/attrs/issues/411>`_ - The test suite now runs with ``hypothesis.HealthCheck.too_slow`` disabled to prevent CI breakage on slower computers. `364 <https://github.com/python-attrs/attrs/issues/364>`_, `396 <https://github.com/python-attrs/attrs/issues/396>`_ - ``attr.validators.in_()`` now raises a ``ValueError`` with a useful message even if the options are a string and the value is not a string. `383 <https://github.com/python-attrs/attrs/issues/383>`_ - ``attr.asdict()`` now properly handles deeply nested lists and dictionaries. `395 <https://github.com/python-attrs/attrs/issues/395>`_ - Added ``attr.converters.default_if_none()`` that allows to replace ``None`` values in attributes. For example ``attr.ib(converter=default_if_none(""))`` replaces ``None`` by empty strings. `400 <https://github.com/python-attrs/attrs/issues/400>`_, `414 <https://github.com/python-attrs/attrs/issues/414>`_ - Fixed a reference leak where the original class would remain live after being replaced when ``slots=True`` is set. `407 <https://github.com/python-attrs/attrs/issues/407>`_ - Slotted classes can now be made weakly referenceable by passing ``attr.s(weakref_slot=True)``. `420 <https://github.com/python-attrs/attrs/issues/420>`_ - Added *cache_hash* option to ``attr.s`` which causes the hash code to be computed once and stored on the object. `426 <https://github.com/python-attrs/attrs/issues/426>`_ - Attributes can be named ``property`` and ``itemgetter`` now. `430 <https://github.com/python-attrs/attrs/issues/430>`_ - It is now possible to override a base class' class variable using only class annotations. `431 <https://github.com/python-attrs/attrs/issues/431>`_ ---- ```Links
- PyPI: https://pypi.org/project/attrs - Changelog: https://pyup.io/changelogs/attrs/ - Homepage: https://www.attrs.org/Update autopep8 from 1.3.5 to 1.5.4.
Changelog
### 1.5.4 ``` * new feature * Skip formatting of a block in a file * use with `fmt: on/off` or `autopep8: on/off` * related: 460, 557 (Thanks to shardros) * fix bugs * 551, 553: ignoring W292 with --ignore option * 564, 565: ignore SyntaxWarning in Python3.8+ ``` ### 1.5.3 ``` * changes * requirement pycodestyle version 2.6.0+ ( 548 ) * fix bugs * Expected pyproject.toml configuration syntax incompatible with TOML format ( 528 , 546 ) * Fix incompatible exit code with --jobs=0 and --exit-code ( 543 , 545 ) * Fix hangup E122 fixed method with backslash ( 540 , 541 ) ``` ### 1.5.2 ``` * new features * 480, 535 : support parallel jobs for diff option * changes * 501, 537 : enable exclude option when specify directly file args * fix bugs * 364, 538 : related code E702 * 533 : related code W503/W504 ``` ### 1.5.1 ``` * fix bugs * 525 : related code W503 and W504 (Thanks NovaDev94) * 526 : return diff exit code when reading from stdin too (Thanks pvxe ) * 529, 530 : related code E402 * 518, 532 : related code W503 and W504 ``` ### 1.5 ``` * Support Python3.8 * Support `pyproject.toml` with `[tool.autopep8]` section. * fix bugs * 503, 511 : related code W503 * 486, 488 : related code E117 * 489, 498 : related code E711/E712 * 449, 514 : related code W605 ``` ### 1.4.4 ``` * fix bugs * 456, 466 : related code W504/3 (Thanks asottile ) * 463, 464 : related code W504 (Thanks bagerard ) * 461, 467 : related code E402 (Thanks Hanaasagi ) * Improved * 457 : Don't write the file unless there are changes (Thanks asottile ) * 478 : update configuration documentation (Thanks Ch00k ) ``` ### 1.4.3 ``` fix bugs * 449 (PR: 450) : related code W605 (Thanks to patch by bigredengineer) * 447 : related code E402 * 446 : related code W503 ``` ### 1.4.2 ``` * fix bugs * 441 : related code is W503 * 443 : related code is W503 ``` ### 1.4 ``` * new feature: add W605 fixed method * new feature: add E252 fixed method (Thanks to patch by gmbnomis) * change: W690 (only use autopep8) is DEFAULT_IGNORE. * fix bugs * 415, 399, 410, 392 * 386 (Thanks to patch by Hnasar) ```Links
- PyPI: https://pypi.org/project/autopep8 - Changelog: https://pyup.io/changelogs/autopep8/ - Repo: https://github.com/hhatto/autopep8Update coverage from 4.5.1 to 5.2.1.
Changelog
### 5.2.1 ``` ---------------------------- - The dark mode HTML report still used light colors for the context listing, making them unreadable (`issue 1009`_). This is now fixed. - The time stamp on the HTML report now includes the time zone. Thanks, Xie Yanbo (`pull request 960`_). .. _pull request 960: https://github.com/nedbat/coveragepy/pull/960 .. _issue 1009: https://github.com/nedbat/coveragepy/issues/1009 .. _changes_52: ``` ### 5.2 ``` -------------------------- - The HTML report has been redesigned by Vince Salvino. There is now a dark mode, the code text is larger, and system sans serif fonts are used, in addition to other small changes (`issue 858`_ and `pull request 931`_). - The ``coverage report`` and ``coverage html`` commands now accept a ``--precision`` option to control the number of decimal points displayed. Thanks, Teake Nutma (`pull request 982`_). - The ``coverage report`` and ``coverage html`` commands now accept a ``--no-skip-covered`` option to negate ``--skip-covered``. Thanks, Anthony Sottile (`issue 779`_ and `pull request 932`_). - The ``--skip-empty`` option is now available for the XML report, closing `issue 976`_. - The ``coverage report`` command now accepts a ``--sort`` option to specify how to sort the results. Thanks, Jerin Peter George (`pull request 1005`_). - If coverage fails due to the coverage total not reaching the ``--fail-under`` value, it will now print a message making the condition clear. Thanks, Naveen Yadav (`pull request 977`_). - TOML configuration files with non-ASCII characters would cause errors on Windows (`issue 990`_). This is now fixed. - The output of ``--debug=trace`` now includes information about how the ``--source`` option is being interpreted, and the module names being considered. .. _pull request 931: https://github.com/nedbat/coveragepy/pull/931 .. _pull request 932: https://github.com/nedbat/coveragepy/pull/932 .. _pull request 977: https://github.com/nedbat/coveragepy/pull/977 .. _pull request 982: https://github.com/nedbat/coveragepy/pull/982 .. _pull request 1005: https://github.com/nedbat/coveragepy/pull/1005 .. _issue 779: https://github.com/nedbat/coveragepy/issues/779 .. _issue 858: https://github.com/nedbat/coveragepy/issues/858 .. _issue 976: https://github.com/nedbat/coveragepy/issues/976 .. _issue 990: https://github.com/nedbat/coveragepy/issues/990 .. _changes_51: ``` ### 5.1 ``` -------------------------- - The JSON report now includes counts of covered and missing branches. Thanks, Salvatore Zagaria. - On Python 3.8, try-finally-return reported wrong branch coverage with decorated async functions (`issue 964`_). This is now fixed. Thanks, Kjell Braden. - The :meth:`~coverage.Coverage.get_option` and :meth:`~coverage.Coverage.set_option` methods can now manipulate the ``[paths]`` configuration setting. Thanks to Bernát Gábor for the fix for `issue 967`_. .. _issue 964: https://github.com/nedbat/coveragepy/issues/964 .. _issue 967: https://github.com/nedbat/coveragepy/issues/967 .. _changes_504: ``` ### 5.0.4 ``` ---------------------------- - If using the ``[run] relative_files`` setting, the XML report will use relative files in the ``<source>`` elements indicating the location of source code. Closes `issue 948`_. - The textual summary report could report missing lines with negative line numbers on PyPy3 7.1 (`issue 943`_). This is now fixed. - Windows wheels for Python 3.8 were incorrectly built, but are now fixed. (`issue 949`_) - Updated Python 3.9 support to 3.9a4. - HTML reports couldn't be sorted if localStorage wasn't available. This is now fixed: sorting works even though the sorting setting isn't retained. (`issue 944`_ and `pull request 945`_). Thanks, Abdeali Kothari. .. _issue 943: https://github.com/nedbat/coveragepy/issues/943 .. _issue 944: https://github.com/nedbat/coveragepy/issues/944 .. _pull request 945: https://github.com/nedbat/coveragepy/pull/945 .. _issue 948: https://github.com/nedbat/coveragepy/issues/948 .. _issue 949: https://github.com/nedbat/coveragepy/issues/949 .. _changes_503: ``` ### 5.0.3 ``` ---------------------------- - A performance improvement in 5.0.2 didn't work for test suites that changed directory before combining data, causing "Couldn't use data file: no such table: meta" errors (`issue 916`_). This is now fixed. - Coverage could fail to run your program with some form of "ModuleNotFound" or "ImportError" trying to import from the current directory. This would happen if coverage had been packaged into a zip file (for example, on Windows), or was found indirectly (for example, by pyenv-virtualenv). A number of different scenarios were described in `issue 862`_ which is now fixed. Huge thanks to Agbonze O. Jeremiah for reporting it, and Alexander Waters and George-Cristian Bîrzan for protracted debugging sessions. - Added the "premain" debug option. - Added SQLite compile-time options to the "debug sys" output. .. _issue 862: https://github.com/nedbat/coveragepy/issues/862 .. _issue 916: https://github.com/nedbat/coveragepy/issues/916 .. _changes_502: ``` ### 5.0.2 ``` ---------------------------- - Programs that used multiprocessing and changed directories would fail under coverage. This is now fixed (`issue 890`_). A side effect is that debug information about the config files read now shows absolute paths to the files. - When running programs as modules (``coverage run -m``) with ``--source``, some measured modules were imported before coverage starts. This resulted in unwanted warnings ("Already imported a file that will be measured") and a reduction in coverage totals (`issue 909`_). This is now fixed. - If no data was collected, an exception about "No data to report" could happen instead of a 0% report being created (`issue 884`_). This is now fixed. - The handling of source files with non-encodable file names has changed. Previously, if a file name could not be encoded as UTF-8, an error occurred, as described in `issue 891`_. Now, those files will not be measured, since their data would not be recordable. - A new warning ("dynamic-conflict") is issued if two mechanisms are trying to change the dynamic context. Closes `issue 901`_. - ``coverage run --debug=sys`` would fail with an AttributeError. This is now fixed (`issue 907`_). .. _issue 884: https://github.com/nedbat/coveragepy/issues/884 .. _issue 890: https://github.com/nedbat/coveragepy/issues/890 .. _issue 891: https://github.com/nedbat/coveragepy/issues/891 .. _issue 901: https://github.com/nedbat/coveragepy/issues/901 .. _issue 907: https://github.com/nedbat/coveragepy/issues/907 .. _issue 909: https://github.com/nedbat/coveragepy/issues/909 .. _changes_501: ``` ### 5.0.1 ``` ---------------------------- - If a 4.x data file is the cause of a "file is not a database" error, then use a more specific error message, "Looks like a coverage 4.x data file, are you mixing versions of coverage?" Helps diagnose the problems described in `issue 886`_. - Measurement contexts and relative file names didn't work together, as reported in `issue 899`_ and `issue 900`_. This is now fixed, thanks to David Szotten. - When using ``coverage run --concurrency=multiprocessing``, all data files should be named with parallel-ready suffixes. 5.0 mistakenly named the main process' file with no suffix when using ``--append``. This is now fixed, closing `issue 880`_. - Fixed a problem on Windows when the current directory is changed to a different drive (`issue 895`_). Thanks, Olivier Grisel. - Updated Python 3.9 support to 3.9a2. .. _issue 880: https://github.com/nedbat/coveragepy/issues/880 .. _issue 886: https://github.com/nedbat/coveragepy/issues/886 .. _issue 895: https://github.com/nedbat/coveragepy/issues/895 .. _issue 899: https://github.com/nedbat/coveragepy/issues/899 .. _issue 900: https://github.com/nedbat/coveragepy/issues/900 .. _changes_50: ``` ### 5.0 ``` -------------------------- Nothing new beyond 5.0b2. .. _changes_50b2: ``` ### 5.0b2 ``` ---------------------------- - An experimental ``[run] relative_files`` setting tells coverage to store relative file names in the data file. This makes it easier to run tests in one (or many) environments, and then report in another. It has not had much real-world testing, so it may change in incompatible ways in the future. - When constructing a :class:`coverage.Coverage` object, `data_file` can be specified as None to prevent writing any data file at all. In previous versions, an explicit `data_file=None` argument would use the default of ".coverage". Fixes `issue 871`_. - Python files run with ``-m`` now have ``__spec__`` defined properly. This fixes `issue 745`_ (about not being able to run unittest tests that spawn subprocesses), and `issue 838`_, which described the problem directly. - The ``[paths]`` configuration section is now ordered. If you specify more than one list of patterns, the first one that matches will be used. Fixes `issue 649`_. - The :func:`.coverage.numbits.register_sqlite_functions` function now also registers `numbits_to_nums` for use in SQLite queries. Thanks, Simon Willison. - Python 3.9a1 is supported. - Coverage.py has a mascot: :ref:`Sleepy Snake <sleepy>`. .. _issue 649: https://github.com/nedbat/coveragepy/issues/649 .. _issue 745: https://github.com/nedbat/coveragepy/issues/745 .. _issue 838: https://github.com/nedbat/coveragepy/issues/838 .. _issue 871: https://github.com/nedbat/coveragepy/issues/871 .. _changes_50b1: ``` ### 5.0b1 ``` ---------------------------- - The HTML and textual reports now have a ``--skip-empty`` option that skips files with no statements, notably ``__init__.py`` files. Thanks, Reya B. - Configuration can now be read from `TOML`_ files. This requires installing coverage.py with the ``[toml]`` extra. The standard "pyproject.toml" file will be read automatically if no other configuration file is found, with settings in the ``[tool.coverage.]`` namespace. Thanks to Frazer McLean for implementation and persistence. Finishes `issue 664`_. - The ``[run] note`` setting has been deprecated. Using it will result in a warning, and the note will not be written to the data file. The corresponding :class:`.CoverageData` methods have been removed. - The HTML report has been reimplemented (no more table around the source code). This allowed for a better presentation of the context information, hopefully resolving `issue 855`_. - Added sqlite3 module version information to ``coverage debug sys`` output. - Asking the HTML report to show contexts (``[html] show_contexts=True`` or ``coverage html --show-contexts``) will issue a warning if there were no contexts measured (`issue 851`_). .. _TOML: https://github.com/toml-lang/tomlreadme .. _issue 664: https://github.com/nedbat/coveragepy/issues/664 .. _issue 851: https://github.com/nedbat/coveragepy/issues/851 .. _issue 855: https://github.com/nedbat/coveragepy/issues/855 .. _changes_50a8: ``` ### 5.0a8 ``` ---------------------------- - The :class:`.CoverageData` API has changed how queries are limited to specific contexts. Now you use :meth:`.CoverageData.set_query_context` to set a single exact-match string, or :meth:`.CoverageData.set_query_contexts` to set a list of regular expressions to match contexts. This changes the command-line ``--contexts`` option to use regular expressions instead of filename-style wildcards. .. _changes_50a7: ``` ### 5.0a7 ``` ---------------------------- - Data can now be "reported"