Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Scheduled weekly dependency update for week 22 #183

Closed
wants to merge 16 commits into from

Conversation

pyup-bot
Copy link
Contributor

Update attrs from 19.1.0 to 21.2.0.

Changelog

21.2.0

-------------------

Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- We had to revert the recursive feature for ``attr.evolve()`` because it broke some use-cases -- sorry!
`806 <https://github.com/python-attrs/attrs/issues/806>`_
- Python 3.4 is now blocked using packaging metadata because ``attrs`` can't be imported on it anymore.
To ensure that 3.4 users can keep installing  ``attrs`` easily, we will `yank <https://pypi.org/help/#yanked>`_ 21.1.0 from PyPI.
This has **no** consequences if you pin ``attrs`` to 21.1.0.
`807 <https://github.com/python-attrs/attrs/issues/807>`_


----

21.1.0

-------------------

Deprecations
^^^^^^^^^^^^

- The long-awaited, much-talked-about, little-delivered ``import attrs`` is finally upon us!

Since the NG APIs have now been proclaimed stable, the **next** release of ``attrs`` will allow you to actually ``import attrs``.
We're taking this opportunity to replace some defaults in our APIs that made sense in 2015, but don't in 2021.

So please, if you have any pet peeves about defaults in ``attrs``'s APIs, *now* is the time to air your grievances in 487!
We're not gonna get such a chance for a second time, without breaking our backward-compatibility guarantees, or long deprecation cycles.
Therefore, speak now or forever hold you peace!
`487 <https://github.com/python-attrs/attrs/issues/487>`_
- The *cmp* argument to ``attr.s()`` and `attr.ib()` has been **undeprecated**
It will continue to be supported as syntactic sugar to set *eq* and *order* in one go.

I'm terribly sorry for the hassle around this argument!
The reason we're bringing it back is it's usefulness regarding customization of equality/ordering.

The ``cmp`` attribute and argument on ``attr.Attribute`` remains deprecated and will be removed later this year.
`773 <https://github.com/python-attrs/attrs/issues/773>`_


Changes
^^^^^^^

- It's now possible to customize the behavior of ``eq`` and ``order`` by passing in a callable.
`435 <https://github.com/python-attrs/attrs/issues/435>`_,
`627 <https://github.com/python-attrs/attrs/issues/627>`_
- The instant favorite `next-generation APIs <https://www.attrs.org/en/stable/api.html#next-gen>`_ are not provisional anymore!

They are also officially supported by Mypy as of their `0.800 release <https://mypy-lang.blogspot.com/2021/01/mypy-0800-released.html>`_.

We hope the next release will already contain an (additional) importable package called ``attrs``.
`668 <https://github.com/python-attrs/attrs/issues/668>`_,
`786 <https://github.com/python-attrs/attrs/issues/786>`_
- If an attribute defines a converter, the type of its parameter is used as type annotation for its corresponding ``__init__`` parameter.

If an ``attr.converters.pipe`` is used, the first one's is used.
`710 <https://github.com/python-attrs/attrs/issues/710>`_
- Fixed the creation of an extra slot for an ``attr.ib`` when the parent class already has a slot with the same name.
`718 <https://github.com/python-attrs/attrs/issues/718>`_
- ``__attrs__init__()`` will now be injected if ``init=False``, or if ``auto_detect=True`` and a user-defined ``__init__()`` exists.

This enables users to do "pre-init" work in their ``__init__()`` (such as ``super().__init__()``).

``__init__()`` can then delegate constructor argument processing to ``self.__attrs_init__(*args, **kwargs)``.
`731 <https://github.com/python-attrs/attrs/issues/731>`_
- ``bool(attr.NOTHING)`` is now ``False``.
`732 <https://github.com/python-attrs/attrs/issues/732>`_
- It's now possible to use ``super()`` inside of properties of slotted classes.
`747 <https://github.com/python-attrs/attrs/issues/747>`_
- Allow for a ``__attrs_pre_init__()`` method that -- if defined -- will get called at the beginning of the ``attrs``-generated ``__init__()`` method.
`750 <https://github.com/python-attrs/attrs/issues/750>`_
- Added forgotten ``attr.Attribute.evolve()`` to type stubs.
`752 <https://github.com/python-attrs/attrs/issues/752>`_
- ``attrs.evolve()`` now works recursively with nested ``attrs`` classes.
`759 <https://github.com/python-attrs/attrs/issues/759>`_
- Python 3.10 is now officially supported.
`763 <https://github.com/python-attrs/attrs/issues/763>`_
- ``attr.resolve_types()`` now takes an optional *attrib* argument to work inside a ``field_transformer``.
`774 <https://github.com/python-attrs/attrs/issues/774>`_
- ``ClassVar``\ s are now also detected if they come from `typing-extensions <https://pypi.org/project/typing-extensions/>`_.
`782 <https://github.com/python-attrs/attrs/issues/782>`_
- To make it easier to customize attribute comparison (435), we have added the ``attr.cmp_with()`` helper.

See the `new docs on comparison <https://www.attrs.org/en/stable/comparison.html>`_ for more details.
`787 <https://github.com/python-attrs/attrs/issues/787>`_
- Added **provisional** support for static typing in ``pyright`` via the `dataclass_transforms specification <https://github.com/microsoft/pyright/blob/master/specs/dataclass_transforms.md>`_.
Both the ``pyright`` specification and ``attrs`` implementation may change in future versions of both projects.

Your constructive feedback is welcome in both `attrs795 <https://github.com/python-attrs/attrs/issues/795>`_ and `pyright#1782 <https://github.com/microsoft/pyright/discussions/1782>`_.
`796 <https://github.com/python-attrs/attrs/issues/796>`_


----

20.3.0

-------------------

Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.

This release does **not** change change anything about them and they are already used widely in production though.

If you wish to use them together with mypy, you can simply drop `this plugin <https://gist.github.com/hynek/1e3844d0c99e479e716169034b5fa963#file-attrs_ng_plugin-py>`_ into your project.

Feel free to provide feedback to them in the linked issue 668.

We will release the ``attrs`` namespace once we have the feeling that the APIs have properly settled.
`668 <https://github.com/python-attrs/attrs/issues/668>`_


Changes
^^^^^^^

- ``attr.s()`` now has a *field_transformer* hook that is called for all ``Attribute``\ s and returns a (modified or updated) list of ``Attribute`` instances.
``attr.asdict()`` has a *value_serializer* hook that can change the way values are converted.
Both hooks are meant to help with data (de-)serialization workflows.
`653 <https://github.com/python-attrs/attrs/issues/653>`_
- ``kw_only=True`` now works on Python 2.
`700 <https://github.com/python-attrs/attrs/issues/700>`_
- ``raise from`` now works on frozen classes on PyPy.
`703 <https://github.com/python-attrs/attrs/issues/703>`_,
`712 <https://github.com/python-attrs/attrs/issues/712>`_
- ``attr.asdict()`` and ``attr.astuple()`` now treat ``frozenset``\ s like ``set``\ s with regards to the *retain_collection_types* argument.
`704 <https://github.com/python-attrs/attrs/issues/704>`_
- The type stubs for ``attr.s()`` and ``attr.make_class()`` are not missing the *collect_by_mro* argument anymore.
`711 <https://github.com/python-attrs/attrs/issues/711>`_


----

20.2.0

-------------------

Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.

This release fixes a bunch of bugs and ergonomics but they remain mostly unchanged.

If you wish to use them together with mypy, you can simply drop `this plugin <https://gist.github.com/hynek/1e3844d0c99e479e716169034b5fa963#file-attrs_ng_plugin-py>`_ into your project.

Feel free to provide feedback to them in the linked issue 668.

We will release the ``attrs`` namespace once we have the feeling that the APIs have properly settled.
`668 <https://github.com/python-attrs/attrs/issues/668>`_


Changes
^^^^^^^

- ``attr.define()`` et al now correct detect ``__eq__`` and ``__ne__``.
`671 <https://github.com/python-attrs/attrs/issues/671>`_
- ``attr.define()`` et al's hybrid behavior now also works correctly when arguments are passed.
`675 <https://github.com/python-attrs/attrs/issues/675>`_
- It's possible to define custom ``__setattr__`` methods on slotted classes again.
`681 <https://github.com/python-attrs/attrs/issues/681>`_
- In 20.1.0 we introduced the ``inherited`` attribute on the ``attr.Attribute`` class to differentiate attributes that have been inherited and those that have been defined directly on the class.

It has shown to be problematic to involve that attribute when comparing instances of ``attr.Attribute`` though, because when sub-classing, attributes from base classes are suddenly not equal to themselves in a super class.

Therefore the ``inherited`` attribute will now be ignored when hashing and comparing instances of ``attr.Attribute``.
`684 <https://github.com/python-attrs/attrs/issues/684>`_
- ``zope.interface`` is now a "soft dependency" when running the test suite; if ``zope.interface`` is not installed when running the test suite, the interface-related tests will be automatically skipped.
`685 <https://github.com/python-attrs/attrs/issues/685>`_
- The ergonomics of creating frozen classes using ``define(frozen=True)`` and sub-classing frozen classes has been improved:
you don't have to set ``on_setattr=None`` anymore.
`687 <https://github.com/python-attrs/attrs/issues/687>`_


----

20.1.0

-------------------

Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Python 3.4 is not supported anymore.
It has been unsupported by the Python core team for a while now, its PyPI downloads are negligible, and our CI provider removed it as a supported option.

It's very unlikely that ``attrs`` will break under 3.4 anytime soon, which is why we do *not* block its installation on Python 3.4.
But we don't test it anymore and will block it once someone reports breakage.
`608 <https://github.com/python-attrs/attrs/issues/608>`_


Deprecations
^^^^^^^^^^^^

- Less of a deprecation and more of a heads up: the next release of ``attrs`` will introduce an ``attrs`` namespace.
That means that you'll finally be able to run ``import attrs`` with new functions that aren't cute abbreviations and that will carry better defaults.

This should not break any of your code, because project-local packages have priority before installed ones.
If this is a problem for you for some reason, please report it to our bug tracker and we'll figure something out.

The old ``attr`` namespace isn't going anywhere and its defaults are not changing – this is a purely additive measure.
Please check out the linked issue for more details.

These new APIs have been added *provisionally* as part of 666 so you can try them out today and provide feedback.
Learn more in the `API docs <https://www.attrs.org/en/stable/api.html#provisional-apis>`_.
`408 <https://github.com/python-attrs/attrs/issues/408>`_


Changes
^^^^^^^

- Added ``attr.resolve_types()``.
It ensures that all forward-references and types in string form are resolved into concrete types.

You need this only if you need concrete types at runtime.
That means that if you only use types for static type checking, you do **not** need this function.
`288 <https://github.com/python-attrs/attrs/issues/288>`_,
`302 <https://github.com/python-attrs/attrs/issues/302>`_
- Added ``attr.s(collect_by_mro=False)`` argument that if set to ``True`` fixes the collection of attributes from base classes.

It's only necessary for certain cases of multiple-inheritance but is kept off for now for backward-compatibility reasons.
It will be turned on by default in the future.

As a side-effect, ``attr.Attribute`` now *always* has an ``inherited`` attribute indicating whether an attribute on a class was directly defined or inherited.
`428 <https://github.com/python-attrs/attrs/issues/428>`_,
`635 <https://github.com/python-attrs/attrs/issues/635>`_
- On Python 3, all generated methods now have a docstring explaining that they have been created by ``attrs``.
`506 <https://github.com/python-attrs/attrs/issues/506>`_
- It is now possible to prevent ``attrs`` from auto-generating the ``__setstate__`` and ``__getstate__`` methods that are required for pickling of slotted classes.

Either pass ``attr.s(getstate_setstate=False)`` or pass ``attr.s(auto_detect=True)`` and implement them yourself:
if ``attrs`` finds either of the two methods directly on the decorated class, it assumes implicitly ``getstate_setstate=False`` (and implements neither).

This option works with dict classes but should never be necessary.
`512 <https://github.com/python-attrs/attrs/issues/512>`_,
`513 <https://github.com/python-attrs/attrs/issues/513>`_,
`642 <https://github.com/python-attrs/attrs/issues/642>`_
- Fixed a ``ValueError: Cell is empty`` bug that could happen in some rare edge cases.
`590 <https://github.com/python-attrs/attrs/issues/590>`_
- ``attrs`` can now automatically detect your own implementations and infer ``init=False``, ``repr=False``, ``eq=False``, ``order=False``, and ``hash=False`` if you set ``attr.s(auto_detect=True)``.
``attrs`` will ignore inherited methods.
If the argument implies more than one method (e.g. ``eq=True`` creates both ``__eq__`` and ``__ne__``), it's enough for *one* of them to exist and ``attrs`` will create *neither*.

This feature requires Python 3.
`607 <https://github.com/python-attrs/attrs/issues/607>`_
- Added ``attr.converters.pipe()``.
The feature allows combining multiple conversion callbacks into one by piping the value through all of them, and retuning the last result.

As part of this feature, we had to relax the type information for converter callables.
`618 <https://github.com/python-attrs/attrs/issues/618>`_
- Fixed serialization behavior of non-slots classes with ``cache_hash=True``.
The hash cache will be cleared on operations which make "deep copies" of instances of classes with hash caching,
though the cache will not be cleared with shallow copies like those made by ``copy.copy()``.

Previously, ``copy.deepcopy()`` or serialization and deserialization with ``pickle`` would result in an un-initialized object.

This change also allows the creation of ``cache_hash=True`` classes with a custom ``__setstate__``,
which was previously forbidden (`494 <https://github.com/python-attrs/attrs/issues/494>`_).
`620 <https://github.com/python-attrs/attrs/issues/620>`_
- It is now possible to specify hooks that are called whenever an attribute is set **after** a class has been instantiated.

You can pass ``on_setattr`` both to ``attr.s()`` to set the default for all attributes on a class, and to ``attr.ib()`` to overwrite it for individual attributes.

``attrs`` also comes with a new module ``attr.setters`` that brings helpers that run validators, converters, or allow to freeze a subset of attributes.
`645 <https://github.com/python-attrs/attrs/issues/645>`_,
`660 <https://github.com/python-attrs/attrs/issues/660>`_
- **Provisional** APIs called ``attr.define()``, ``attr.mutable()``, and ``attr.frozen()`` have been added.

They are only available on Python 3.6 and later, and call ``attr.s()`` with different default values.

If nothing comes up, they will become the official way for creating classes in 20.2.0 (see above).

**Please note** that it may take some time until mypy – and other tools that have dedicated support for ``attrs`` – recognize these new APIs.
Please **do not** open issues on our bug tracker, there is nothing we can do about it.
`666 <https://github.com/python-attrs/attrs/issues/666>`_
- We have also provisionally added ``attr.field()`` that supplants ``attr.ib()``.
It also requires at least Python 3.6 and is keyword-only.
Other than that, it only dropped a few arguments, but changed no defaults.

As with ``attr.s()``: ``attr.ib()`` is not going anywhere.
`669 <https://github.com/python-attrs/attrs/issues/669>`_


----

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.html#deprecated-apis>`_ on how to use it.
`580 <https://github.com/python-attrs/attrs/issues/580>`_

.. _`425`: https://github.com/python-attrs/attrs/issues/425


----
Links

Update cocos2d from 0.6.5 to 0.6.9.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update freezegun from 0.3.11 to 1.1.0.

Changelog

1.1.0

-----

* Add support for `time.monotonic` (and `…_ns`)

* Allow to configure default ignore list, and also to just extend the default

* Fixed when accessing from thread after stop()

1.0.0

------

* Dropped Py2 support
* Added as_kwarg argument in order to have the frozen time object passed with the name provided in as_kwarg argument

0.3.15

------

* Fix locale timestamp bug. CC 328

0.3.14

------

* Fix calendar.timegm behavior

0.3.13

------

* Fix for Py3.8
* Reset time.time_ns on stop

0.3.12

------

* Refactor classes to functions
* Ignore Selenium
* Move to pytest
* Conditionally patch time.clock
* Patch time.time_ns added in Python 3.7
Links

Update future from 0.17.1 to 0.18.2.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update numpy from 1.16.2 to 1.20.3.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update pluggy from 0.9.0 to 0.13.1.

Changelog

0.13.1

==========================

Trivial/Internal Changes
------------------------

- `236 <https://github.com/pytest-dev/pluggy/pull/236>`_: Improved documentation, especially with regard to references.

0.13.0

==========================

Trivial/Internal Changes
------------------------

- `222 <https://github.com/pytest-dev/pluggy/issues/222>`_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the
standard library on Python 3.8+.

0.12.0

==========================

Features
--------

- `215 <https://github.com/pytest-dev/pluggy/issues/215>`_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.  This time with ``.egg`` support.

0.11.0

==========================

Bug Fixes
---------

- `205 <https://github.com/pytest-dev/pluggy/issues/205>`_: Revert changes made in 0.10.0 release breaking ``.egg`` installs.

0.10.0

==========================

Features
--------

- `199 <https://github.com/pytest-dev/pluggy/issues/199>`_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.
Links

Update psutil from 5.5.1 to 5.8.0.

Changelog

5.8.0

=====

2020-12-19

**Enhancements**

- 1863_: `disk_partitions()` exposes 2 extra fields: `maxfile` and `maxpath`,
which are the maximum file name and path name length.
- 1872_: [Windows] added support for PyPy 2.7.
- 1879_: provide pre-compiled wheels for Linux and macOS (yey!).
- 1880_: get rid of Travis and Cirrus CI services (they are no longer free).
CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes).
AppVeyor is still being used for Windows CI.

**Bug fixes**

- 1708_: [Linux] get rid of sensors_temperatures() duplicates.  (patch by Tim
Schlueter).
- 1839_: [Windows] always raise AccessDenied when failing to query 64 processes
from 32 bit ones (NtWoW64 APIs).
- 1866_: [Windows] process exe(), cmdline(), environ() may raise "invalid
access to memory location" on Python 3.9.
- 1874_: [Solaris] wrong swap output given when encrypted column is present.
- 1875_: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID
has no corresponding account name. In this case AccessDenied is now raised.
- 1877_: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into
AccessDenied or NoSuchProcess depending on whether the PID is alive.
- 1886_: [macOS] EIO error may be raised on cmdline() and environment(). Now
it gets translated into AccessDenied.
- 1891_: [macOS] get rid of deprecated getpagesize().

5.7.3

=====

2020-10-23

**Enhancements**

- 809_: [FreeBSD] add support for `Process.rlimit()`.
- 893_: [BSD] add support for `Process.environ()` (patch by Armin Gruner)
- 1830_: [UNIX] `net_if_stats()`'s `isup` also checks whether the NIC is
running (meaning Wi-Fi or ethernet cable is connected).  (patch by Chris Burger)
- 1837_: [Linux] improved battery detection and charge "secsleft" calculation
(patch by aristocratos)

**Bug fixes**

- 1620_: [Linux] physical cpu_count() result is incorrect on systems with more
than one CPU socket.  (patch by Vincent A. Arcila)
- 1738_: [macOS] Process.exe() may raise FileNotFoundError if process is still
alive but the exe file which launched it got deleted.
- 1791_: [macOS] fix missing include for getpagesize().
- 1823_: [Windows] Process.open_files() may cause a segfault due to a NULL
pointer.
- 1838_: [Linux] sensors_battery(): if `percent` can be determined but not
the remaining values, still return a result instead of None.
(patch by aristocratos)

5.7.2

=====

2020-07-15

**Bug fixes**

- wheels for 2.7 were inadvertently deleted.

5.7.1

=====

2020-07-15

**Enhancements**

- 1729_: parallel tests on UNIX (make test-parallel). They're twice as fast!
- 1741_: "make build/install" is now run in parallel and it's about 15% faster
on UNIX.
- 1747_: `Process.wait()` on POSIX returns an enum, showing the negative signal
which was used to terminate the process::
 >>> import psutil
 >>> p = psutil.Process(9891)
 >>> p.terminate()
 >>> p.wait()
 <Negsignal.SIGTERM: -15>
- 1747_: `Process.wait()` return value is cached so that the exit code can be
retrieved on then next call.
- 1747_: Process provides more info about the process on str() and repr()
(status and exit code)::
 >>> proc
 psutil.Process(pid=12739, name='python3', status='terminated',
                exitcode=<Negsigs.SIGTERM: -15>, started='15:08:20')
- 1757_: memory leak tests are now stable.
- 1768_: [Windows] added support for Windows Nano Server. (contributed by
Julien Lebot)

**Bug fixes**

- 1726_: [Linux] cpu_freq() parsing should use spaces instead of tabs on ia64.
(patch by Michał Górny)
- 1760_: [Linux] Process.rlimit() does not handle long long type properly.
- 1766_: [macOS] NoSuchProcess may be raised instead of ZombieProcess.
- 1781_: fix signature of callback function for getloadavg().  (patch by
Ammar Askar)

5.7.0

=====

2020-02-18

**Enhancements**

- 1637_: [SunOS] add partial support for old SunOS 5.10 Update 0 to 3.
- 1648_: [Linux] sensors_temperatures() looks into an additional /sys/device/
directory for additional data.  (patch by Javad Karabi)
- 1652_: [Windows] dropped support for Windows XP and Windows Server 2003.
Minimum supported Windows version now is Windows Vista.
- 1671_: [FreeBSD] add CI testing/service for FreeBSD (Cirrus CI).
- 1677_: [Windows] process exe() will succeed for all process PIDs (instead of
raising AccessDenied).
- 1679_: [Windows] net_connections() and Process.connections() are 10% faster.
- 1682_: [PyPy] added CI / test integration for PyPy via Travis.
- 1686_: [Windows] added support for PyPy on Windows.
- 1693_: [Windows] boot_time(), Process.create_time() and users()'s login time
now have 1 micro second precision (before the precision was of 1 second).

**Bug fixes**

- 1538_: [NetBSD] process cwd() may return ENOENT instead of NoSuchProcess.
- 1627_: [Linux] Process.memory_maps() can raise KeyError.
- 1642_: [SunOS] querying basic info for PID 0 results in FileNotFoundError.
- 1646_: [FreeBSD] many Process methods may cause a segfault on FreeBSD 12.0
due to a backward incompatible change in a C type introduced in 12.0.
- 1656_: [Windows] Process.memory_full_info() raises AccessDenied even for the
current user and os.getpid().
- 1660_: [Windows] Process.open_files() complete rewrite + check of errors.
- 1662_: [Windows] process exe() may raise WinError 0.
- 1665_: [Linux] disk_io_counters() does not take into account extra fields
added to recent kernels.  (patch by Mike Hommey)
- 1672_: use the right C type when dealing with PIDs (int or long). Thus far
(long) was almost always assumed, which is wrong on most platforms.
- 1673_: [OpenBSD] Process connections(), num_fds() and threads() returned
improper exception if process is gone.
- 1674_: [SunOS] disk_partitions() may raise OSError.
- 1684_: [Linux] disk_io_counters() may raise ValueError on systems not
having /proc/diskstats.
- 1695_: [Linux] could not compile on kernels <= 2.6.13 due to
PSUTIL_HAVE_IOPRIO not being defined.  (patch by Anselm Kruis)

5.6.7

=====

2019-11-26

**Bug fixes**

- 1630_: [Windows] can't compile source distribution due to C syntax error.

5.6.6

=====

2019-11-25

**Bug fixes**

- 1179_: [Linux] Process cmdline() now takes into account misbehaving processes
renaming the command line and using inappropriate chars to separate args.
- 1616_: use of Py_DECREF instead of Py_CLEAR will result in double free and
segfault
(`CVE-2019-18874 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18874>`__).
(patch by Riccardo Schirone)
- 1619_: [OpenBSD] compilation fails due to C syntax error.  (patch by Nathan
Houghton)

5.6.5

=====

2019-11-06

**Bug fixes**

- 1615_: remove pyproject.toml as it was causing installation issues.

5.6.4

=====

2019-11-04

**Enhancements**

- 1527_: [Linux] added Process.cpu_times().iowait counter, which is the time
spent waiting for blocking I/O to complete.
- 1565_: add PEP 517/8 build backend and requirements specification for better
pip integration.  (patch by Bernát Gábor)

**Bug fixes**

- 875_: [Windows] Process' cmdline(), environ() or cwd() may occasionally fail
with ERROR_PARTIAL_COPY which now gets translated to AccessDenied.
- 1126_: [Linux] cpu_affinity() segfaults on CentOS 5 / manylinux.
cpu_affinity() support for CentOS 5 was removed.
- 1528_: [AIX] compilation error on AIX 7.2 due to 32 vs 64 bit differences.
(patch by Arnon Yaari)
- 1535_: 'type' and 'family' fields returned by net_connections() are not
always turned into enums.
- 1536_: [NetBSD] process cmdline() erroneously raise ZombieProcess error if
cmdline has non encodable chars.
- 1546_: usage percent may be rounded to 0 on Python 2.
- 1552_: [Windows] getloadavg() math for calculating 5 and 15 mins values is
incorrect.
- 1568_: [Linux] use CC compiler env var if defined.
- 1570_: [Windows] `NtWow64*` syscalls fail to raise the proper error code
- 1585_: [OSX] calling close() (in C) on possible negative integers.  (patch
by Athos Ribeiro)
- 1606_: [SunOS] compilation fails on SunOS 5.10.  (patch by vser1)

5.6.3

=====

2019-06-11

**Enhancements**

- 1494_: [AIX] added support for Process.environ().  (patch by Arnon Yaari)

**Bug fixes**

- 1276_: [AIX] can't get whole cmdline().  (patch by Arnon Yaari)
- 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168
element not found" exceptions for "Registry" and "Memory Compression" psuedo
processes on Windows 10.
- 1526_: [NetBSD] process cmdline() could raise MemoryError.  (patch by
Kamil Rytarowski)

5.6.2

=====

2019-04-26

**Enhancements**

- 604_: [Windows, Windows] add new psutil.getloadavg(), returning system load
average calculation, including on Windows (emulated).  (patch by Ammar Askar)
- 1404_: [Linux] cpu_count(logical=False) uses a second method (read from
`/sys/devices/system/cpu/cpu[0-9]/topology/core_id`) in order to determine
the number of physical CPUs in case /proc/cpuinfo does not provide this info.
- 1458_: provide coloured test output. Also show failures on KeyboardInterrupt.
- 1464_: various docfixes (always point to python3 doc, fix links, etc.).
- 1476_: [Windows] it is now possible to set process high I/O priority
(ionice()).Also, I/O priority values are now exposed as 4 new constants:
IOPRIO_VERYLOW, IOPRIO_LOW, IOPRIO_NORMAL, IOPRIO_HIGH.
- 1478_: add make command to re-run tests failed on last run.

**Bug fixes**

- 1223_: [Windows] boot_time() may return value on Windows XP.
- 1456_: [Linux] cpu_freq() returns None instead of 0.0 when min/max not
available (patch by Alex Manuskin)
- 1462_: [Linux] (tests) make tests invariant to LANG setting (patch by
Benjamin Drung)
- 1463_: cpu_distribution.py script was broken.
- 1470_: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't
exist.  (patch by Cedric Lamoriniere)
- 1471_: [SunOS] Process name() and cmdline() can return SystemError.  (patch
by Daniel Beer)
- 1472_: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3.
- 1474_: fix formatting of psutil.tests() which mimicks 'ps aux' output.
- 1475_: [Windows] OSError.winerror attribute wasn't properly checked resuling
in WindowsError being raised instead of AccessDenied.
- 1477_: [Windows] wrong or absent error handling for private NTSTATUS Windows
APIs. Different process methods were affected by this.
- 1480_: [Windows] psutil.cpu_count(logical=False) could cause a crash due to
fixed read violation.  (patch by Samer Masterson)
- 1486_: [AIX, SunOS] AttributeError when interacting with Process methods
involved into oneshot() context.
- 1491_: [SunOS] net_if_addrs(): free() ifap struct on error.  (patch by
Agnewee)
- 1493_: [Linux] cpu_freq(): handle the case where
/sys/devices/system/cpu/cpufreq/ exists but is empty.

5.6.1

=====

2019-03-11

**Bug fixes**

- 1329_: [AIX] psutil doesn't compile on AIX 6.1.  (patch by Arnon Yaari)
- 1448_: [Windows] crash on import due to rtlIpv6AddressToStringA not available
on Wine.
- 1451_: [Windows] Process.memory_full_info() segfaults. NtQueryVirtualMemory
is now used instead of QueryWorkingSet to calculate USS memory.

5.6.0

=====

2019-03-05

**Enhancements**

- 1379_: [Windows] Process suspend() and resume() now use NtSuspendProcess
and NtResumeProcess instead of stopping/resuming all threads of a process.
This is faster and more reliable (aka this is what ProcessHacker does).
- 1420_: [Windows] in case of exception disk_usage() now also shows the path
name.
- 1422_: [Windows] Windows APIs requiring to be dynamically loaded from DLL
libraries are now loaded only once on startup (instead of on per function
call) significantly speeding up different functions and methods.
- 1426_: [Windows] PAGESIZE and number of processors is now calculated on
startup.
- 1428_: in case of error, the traceback message now shows the underlying C
function called which failed.
- 1433_: new Process.parents() method.  (idea by Ghislain Le Meur)
- 1437_: pids() are returned in sorted order.
- 1442_: python3 is now the default interpreter used by Makefile.

**Bug fixes**

- 1353_: process_iter() is now thread safe (it rarely raised TypeError).
- 1394_: [Windows] Process name() and exe() may erroneously return "Registry".
QueryFullProcessImageNameW is now used instead of GetProcessImageFileNameW
in order to prevent that.
- 1411_: [BSD] lack of Py_DECREF could cause segmentation fault on process
instantiation.
- 1419_: [Windows] Process.environ() raises NotImplementedError when querying
a 64-bit process in 32-bit-WoW mode. Now it raises AccessDenied.
- 1427_: [OSX] Process cmdline() and environ() may erroneously raise OSError
on failed malloc().
- 1429_: [Windows] SE DEBUG was not properly set for current process. It is
now, and it should result in less AccessDenied exceptions for low-pid
processes.
- 1432_: [Windows] Process.memory_info_ex()'s USS memory is miscalculated
because we're not using the actual system PAGESIZE.
- 1439_: [NetBSD] Process.connections() may return incomplete results if using
oneshot().
- 1447_: original exception wasn't turned into NSP/AD exceptions when using
Process.oneshot() ctx manager.

**Incompatible API changes**

- 1291_: [OSX] Process.memory_maps() was removed because inherently broken
(segfault) for years.
Links

Update py from 1.8.0 to 1.10.0.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update pyglet from 1.3.2 to 1.5.17.

Changelog

1.5.17

Bugfixes
--------
- FFmpeg decoder add FF_INPUT_BUFFER_PADDING_SIZE to buffers.
- Add missing DI8DEVTYPE_SUPPLEMENTAL joystick device type.
- Fix bool clamping causing crash with DirectWrite text decoder.

Maintenance
-----------
- Change IncrementalTextLayout to use glScissor instead of glClipPlane.
- Raise warning on Window creation if the GPU drivers do not support OpenGL 2.0

Features
--------
- Add a new `shapes.Star` shape.

1.5.16

Bugfixes
--------
- 3d model obj decoder supports multiple material types
- Fix GStreamerSources not being garbage collected 283
- Fix ScrollableTextLayout not respecting anchors/alignment.

Features
--------
- New DirectWrite based font loader. Enable with `pyglet.options["advanced_font_features"] = True`
- Add `position` property to Text Layouts, to mimic other classes.

1.5.15

Bugfix and maintenance release

Bugfixes
--------
- shapes.Circle segment calculation will always use a minimum of 14 segments.
- shapes.Arc is now made from line segments, and by default has unconnected ends.
- Windows - Use the internal keystate to determine the mod shift rather than relying on GetKeyState
which relies on another event that may be called after WM_INPUT.

Maintenance
-----------
- Various Headless backend and EGL work.

1.5.14

Bugfixes
--------
- Fix interlaced mp3 decoding in GStreamer backend.
- Skip functions marked as OBJC_ARM64_UNAVAILABLE for new ARM Macs.

Features
--------
- Add a `WaveEncoder` for saving audio Sources to disk.

1.5.13

Bugfixes
--------
- Fix crash on looping video with no sound (322)
- OSX: Replace remaining usage of `find_library` to fix Big Sur issues (332)
- Windows: Fix default orientation for the XAudio2 listener.

Features
--------
- Add new `shape.Triangle` shape.
- Windows: `on_key_press` now dispatches unique events for left/right Shift keys.

1.5.11

Bugfixes
--------
- Added hardcoding of library paths for Big Sur temporary fallback.
- Removed some legacy Python 2 code from the documentation.

1.5.9

Bugfixes
--------
- Explicitly cast media.synthesis data to bytes to prevent issues on some audio drivers.
- Refactor WIC module to work with new com module. (298)
- Prevent crash when setting `shapes.Circle.visable`. (294)
- Remove deprecated `tostring` calls in PIL/PNG decoders to prevent crash on Python 3.9. (295, 302)

Improvements
------------
- Add new Xaudio2 driver. (288)
- Refactor pyglet's lazy module loading to better support code inspection.
- Added new `TextEntry` widget.

1.5.8

Improvements
------------
- Added new experimental `gui` module. Currently this only contains basic widgets.
- Added new `Group.visible` property, to toggle rendering of entire Groups when used in a Batch.
- Added `Sprite.paused` and `Sprite.frame_index` helper properties for controlling Animations.
- Reorganized the examples folder.
- Added new CenteredCamera example.
- Backport pyglet.math from 2.0, for more exposure and testing.
- Consolidate Codec logic into base class to reuse among various modules.

1.5.7

Bugfixes
--------
- Fix crash when no audio device is available.
- Prevent `__del__` spam in DirectSound buffers and Wave decoder.
- Explicitly cast warnings.warn message to a str to prevent numba error.

1.5.6

Bugfixes
--------
- Fix infinite recursion error on OSX. (5)
- The on_mouse_scroll event no longer clamps to int, preventing lost motion on trackpads.
- Prevent traceback when DirectSound buffers are garbage collected on exit.
- Fix StaticSource playback with WMF decoder (streaming=False).
- Fix colorspace for WMF video decoding.
- Prevent crash on garbage collection for FFmpeg decoder.

Improvements
------------
- New image decoder leveraging Windows Imaging Component (WIC).
- TextureAtlas/Bins now have a `border` argument for leaving n-pixels of blank space around
images when adding. By default the `resource` module leaves a 1-pixel space around images.
- Many small documentation fixes and corrections.

1.5.5

Bugfixes
--------
- GStreamer decoder clamped to 16bit sample width, since the default OpenAL backend on Linux does
not support anything higher.

Improvements
------------
- shapes module: added `Circle.rotation` property and blending to standalone shape `draw` methods.
- shapes module: added missing `delete` and `__del__` methods.
- The ImageMouseCursor has a new `accelerated` parameter to allow custom mouse points to be drawn
natively on Windows and Linux.

1.5.4

Bugfixes
--------
- Avoid WMFDecoder crash when mixing pyglet with other tookits. (174)
- Prevent EventDispatcher subclasses from hiding AttributeError exceptions.

Improvements
------------
- Added `pyglet.shapes` module for creating simple 2D shapes.

1.5.3

Bugfixes
--------
- Fix memory leak caused by not freeing stale buffers and textures.

1.5.2

Bugfixes
--------
- Fix WMF decoder for pre-Windows 8 systems.
- Fix WMF decoder loading from file-like objects for Windows Vista.
- Fix WMF decoder crashing when attempting to seek past file duration.

Changes
-------
- Allow GStreamer and FFmpeg decoder to load from file-like objects.

1.5.1

Improvements
------------
- New "file_drops" Window argument to allow drag and drop of files. This is complimented
by a new `Window.on_file_drop` event, which returns the mouse position and file path.

Bugfixes
--------
- Fix issue with changing Label positions by fractional values.
- Avoid performance issue due to unnecessary context switching with single Window programs.
- Fix crash on Player.next_source when playing a video with no audio track.
- Fix crash when disconnecting a Joystick on Windows.
- Prevent media Players from seeking to negative timestamps.
- Fix OpenAL audio driver not dispatching events.

Changes
--------
- text.TextLayouts are no longer bound to int positioning.
- Raise exception if attempting to import from legacy Python.
- Add GStreamer decoder for compressed audio on Linux.
- Add Windows Media Foundation decoder for compressed audio on Windows.

1.5.0

Bugfix and Maintenance release

Bugfixes
--------
- Removed global dubug function access in __del__ methods to prevent smooth shutdown.
- Fix regression not allow SourceGroups to be queued on Player objects. (140)

Changes
-------
- Support for Python 2 has been dropped. Python 3.5 is now the minimum supported version.

1.4.10

Bugfixes
--------
- Explicitly set Window size in game example. (116)
- Prevent crash when checking if FFMpeg is available. (121)

1.4.9

Bugfix and small improvement release

Bugfixes
--------
- Fix TextLayoutGroup consolidation when using custom Groups for Labels.
- FFmpeg: Cast 'date' to string instead of int in file_info. (109)
- Fix ctypes error causing by incorrectly specifying a Union as an argtype. (112)

Improvements
------------
- Added a simple 2D Camera example to examples/camera.py in the repository.
- OSX: OpenGL context creation is more lenient with requested versions.

1.4.8

Bugfixes
--------
- FFmpeg: fix an occasional crash during seek operation.
- Revert Event Dispatcher changes from v1.4.7 due to possible bug.
- Linux: Warn on failure to set vsync, instead of crashing.

1.4.7

Bugfixes
--------
- Allow creation of non-power-of-two compressed Textures. (78)
- Fix EventDispatchers surpressing `AttributeError`s. (87)
- Fix external lib loading on Windows under Python 3.8. (90)

Improvements
------------
- Windows: Add support for `Desktop Window Manager` composition for smoother rendering.
- TextureAtlases allow a single pixel border to avoid rendering artifacts.
- Add support for `conda`-installed FFmpeg on macOS (92)

1.4.6

Bugfixes
--------
- Fix PNG encoder saving upside-down images due to incorrect pitch. (83)
- pyglet.info shows more platform specific information.

1.4.5

Improvements
------------
- Documentation has been rebased on the standard RTD theme.
- Other documentation clarifications and improvements.
- New `MouseStateHandler` convenience class.

Bugfixes
--------
- Fix Allocator creating orphaned regions.
- Allow npot compressed texture loading.
- Fix MachOLibraryLoader failing on lib names containing extra "."s.

1.4.4

Fix incorrect glXSwapIntervalEXT arguments for Xlib contexts.

1.4.3

Bugfixes
--------
- Fix crash due to inconsistent API when changing Label or HTMLLabel color. (45)
- Add support for GLX_EXT_swap_control on Linux platforms.

1.4.2

Improvements
------------
- Removed broken projects from /contrib
- Update setup.py with project_urls and long_description.
- Added Window.get_pixel_ratio function for calculating scaling on HiDPI displays.
- Start some code quality improvements, such as whitespace removal, star imports, etc.

Bugfixes
--------
- Fix invalid argtype in image GDIplus decoder.
- Change sys.is_epydoc to sys.is_pyglet_doc_run to prevent crashing with Anaconda, etc. (9)
- Prevent gl_info.get_version from crashing with blank version string. (36)
Links

Update pytest from 4.3.0 to 6.2.4.

Changelog

6.2.4

=========================

Bug Fixes
---------

- `8539 <https://github.com/pytest-dev/pytest/issues/8539>`_: Fixed assertion rewriting on Python 3.10.

6.2.3

=========================

Bug Fixes
---------

- `8414 <https://github.com/pytest-dev/pytest/issues/8414>`_: pytest used to create directories under ``/tmp`` with world-readable
permissions. This means that any user in the system was able to read
information written by tests in temporary directories (such as those created by
the ``tmp_path``/``tmpdir`` fixture). Now the directories are created with
private permissions.

pytest used to silenty use a pre-existing ``/tmp/pytest-of-<username>`` directory,
even if owned by another user. This means another user could pre-create such a
directory and gain control of another user's temporary directory. Now such a
condition results in an error.

6.2.2

=========================

Bug Fixes
---------

- `8152 <https://github.com/pytest-dev/pytest/issues/8152>`_: Fixed "(<Skipped instance>)" being shown as a skip reason in the verbose test summary line when the reason is empty.


- `8249 <https://github.com/pytest-dev/pytest/issues/8249>`_: Fix the ``faulthandler`` plugin for occasions when running with ``twisted.logger`` and using ``pytest --capture=no``.

6.2.1

=========================

Bug Fixes
---------

- `7678 <https://github.com/pytest-dev/pytest/issues/7678>`_: Fixed bug where ``ImportPathMismatchError`` would be raised for files compiled in
the host and loaded later from an UNC mounted path (Windows).


- `8132 <https://github.com/pytest-dev/pytest/issues/8132>`_: Fixed regression in ``approx``: in 6.2.0 ``approx`` no longer raises
``TypeError`` when dealing with non-numeric types, falling back to normal comparison.
Before 6.2.0, array types like tf.DeviceArray fell through to the scalar case,
and happened to compare correctly to a scalar if they had only one element.
After 6.2.0, these types began failing, because they inherited neither from
standard Python number hierarchy nor from ``numpy.ndarray``.

``approx`` now converts arguments to ``numpy.ndarray`` if they expose the array
protocol and are not scalars. This treats array-like objects like numpy arrays,
regardless of size.

6.2.0

=========================

Breaking Changes
----------------

- `7808 <https://github.com/pytest-dev/pytest/issues/7808>`_: pytest now supports python3.6+ only.



Deprecations
------------

- `7469 <https://github.com/pytest-dev/pytest/issues/7469>`_: Directly constructing/calling the following classes/functions is now deprecated:

- ``_pytest.cacheprovider.Cache``
- ``_pytest.cacheprovider.Cache.for_config()``
- ``_pytest.cacheprovider.Cache.clear_cache()``
- ``_pytest.cacheprovider.Cache.cache_dir_from_config()``
- ``_pytest.capture.CaptureFixture``
- ``_pytest.fixtures.FixtureRequest``
- ``_pytest.fixtures.SubRequest``
- ``_pytest.logging.LogCaptureFixture``
- ``_pytest.pytester.Pytester``
- ``_pytest.pytester.Testdir``
- ``_pytest.recwarn.WarningsRecorder``
- ``_pytest.recwarn.WarningsChecker``
- ``_pytest.tmpdir.TempPathFactory``
- ``_pytest.tmpdir.TempdirFactory``

These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0.


- `7530 <https://github.com/pytest-dev/pytest/issues/7530>`_: The ``--strict`` command-line option has been deprecated, use ``--strict-markers`` instead.

We have plans to maybe in the future to reintroduce ``--strict`` and make it an encompassing flag for all strictness
related options (``--strict-markers`` and ``--strict-config`` at the moment, more might be introduced in the future).


- `7988 <https://github.com/pytest-dev/pytest/issues/7988>`_: The ``pytest.yield_fixture`` decorator/function is now deprecated. Use :func:`pytest.fixture` instead.

``yield_fixture`` has been an alias for ``fixture`` for a very long time, so can be search/replaced safely.



Features
--------

- `5299 <https://github.com/pytest-dev/pytest/issues/5299>`_: pytest now warns about unraisable exceptions and unhandled thread exceptions that occur in tests on Python>=3.8.
See :ref:`unraisable` for more information.


- `7425 <https://github.com/pytest-dev/pytest/issues/7425>`_: New :fixture:`pytester` fixture, which is identical to :fixture:`testdir` but its methods return :class:`pathlib.Path` when appropriate instead of ``py.path.local``.

This is part of the movement to use :class:`pathlib.Path` objects internally, in order to remove the dependency to ``py`` in the future.

Internally, the old :class:`Testdir <_pytest.pytester.Testdir>` is now a thin wrapper around :class:`Pytester <_pytest.pytester.Pytester>`, preserving the old interface.


- `7695 <https://github.com/pytest-dev/pytest/issues/7695>`_: A new hook was added, `pytest_markeval_namespace` which should return a dictionary.
This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.

Pseudo example

``conftest.py``:

.. code-block:: python

  def pytest_markeval_namespace():
      return {"color": "red"}

``test_func.py``:

.. code-block:: python

  pytest.mark.skipif("color == 'blue'", reason="Color is not red")
  def test_func():
      assert False


- `8006 <https://github.com/pytest-dev/pytest/issues/8006>`_: It is now possible to construct a :class:`~pytest.MonkeyPatch` object directly as ``pytest.MonkeyPatch()``,
in cases when the :fixture:`monkeypatch` fixture cannot be used. Previously some users imported it
from the private `_pytest.monkeypatch.MonkeyPatch` namespace.

Additionally, :meth:`MonkeyPatch.context <pytest.MonkeyPatch.context>` is now a classmethod,
and can be used as ``with MonkeyPatch.context() as mp: ...``. This is the recommended way to use
``MonkeyPatch`` directly, since unlike the ``monkeypatch`` fixture, an instance created directly
is not ``undo()``-ed automatically.



Improvements
------------

- `1265 <https://github.com/pytest-dev/pytest/issues/1265>`_: Added an ``__str__`` implementation to the :class:`~pytest.pytester.LineMatcher` class which is returned from ``pytester.run_pytest().stdout`` and similar. It returns the entire output, like the existing ``str()`` method.


- `2044 <https://github.com/pytest-dev/pytest/issues/2044>`_: Verbose mode now shows the reason that a test was skipped in the test's terminal line after the "SKIPPED", "XFAIL" or "XPASS".


- `7469 <https://github.com/pytest-dev/pytest/issues/7469>`_ The types of builtin pytest fixtures are now exported so they may be used in type annotations of test functions.
The newly-exported types are:

- ``pytest.FixtureRequest`` for the :fixture:`request` fixture.
- ``pytest.Cache`` for the :fixture:`cache` fixture.
- ``pytest.CaptureFixture[str]`` for the :fixture:`capfd` and :fixture:`capsys` fixtures.
- ``pytest.CaptureFixture[bytes]`` for the :fixture:`capfdbinary` and :fixture:`capsysbinary` fixtures.
- ``pytest.LogCaptureFixture`` for the :fixture:`caplog` fixture.
- ``pytest.Pytester`` for the :fixture:`pytester` fixture.
- ``pytest.Testdir`` for the :fixture:`testdir` fixture.
- ``pytest.TempdirFactory`` for the :fixture:`tmpdir_factory` fixture.
- ``pytest.TempPathFactory`` for the :fixture:`tmp_path_factory` fixture.
- ``pytest.MonkeyPatch`` for the :fixture:`monkeypatch` fixture.
- ``pytest.WarningsRecorder`` for the :fixture:`recwarn` fixture.

Constructing them is not supported (except for `MonkeyPatch`); they are only meant for use in type annotations.
Doing so will emit a deprecation warning, and may become a hard-error in pytest 7.0.

Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.


- `7527 <https://github.com/pytest-dev/pytest/issues/7527>`_: When a comparison between :func:`namedtuple <collections.namedtuple>` instances of the same type fails, pytest now shows the differing field names (possibly nested) instead of their indexes.


- `7615 <https://github.com/pytest-dev/pytest/issues/7615>`_: :meth:`Node.warn <_pytest.nodes.Node.warn>` now permits any subclass of :class:`Warning`, not just :class:`PytestWarning <pytest.PytestWarning>`.


- `7701 <https://github.com/pytest-dev/pytest/issues/7701>`_: Improved reporting when using ``--collected-only``. It will now show the number of collected tests in the summary stats.


- `7710 <https://github.com/pytest-dev/pytest/issues/7710>`_: Use strict equality comparison for non-numeric types in :func:`pytest.approx` instead of
raising :class:`TypeError`.

This was the undocumented behavior before 3.7, but is now officially a supported feature.


- `7938 <https://github.com/pytest-dev/pytest/issues/7938>`_: New ``--sw-skip`` argument which is a shorthand for ``--stepwise-skip``.


- `8023 <https://github.com/pytest-dev/pytest/issues/8023>`_: Added ``'node_modules'`` to default value for :confval:`norecursedirs`.


- `8032 <https://github.com/pytest-dev/pytest/issues/8032>`_: :meth:`doClassCleanups <unittest.TestCase.doClassCleanups>` (introduced in :mod:`unittest` in Python and 3.8) is now called appropriately.



Bug Fixes
---------

- `4824 <https://github.com/pytest-dev/pytest/issues/4824>`_: Fixed quadratic behavior and improved performance of collection of items using autouse fixtures and xunit fixtures.


- `7758 <https://github.com/pytest-dev/pytest/issues/7758>`_: Fixed an issue where some files in packages are getting lost from ``--lf`` even though they contain tests that failed. Regressed in pytest 5.4.0.


- `7911 <https://github.com/pytest-dev/pytest/issues/7911>`_: Directories created by by :fixture:`tmp_path` and :fixture:`tmpdir` are now considered stale after 3 days without modification (previous value was 3 hours) to avoid deleting directories still in use in long running test suites.


- `7913 <https://github.com/pytest-dev/pytest/issues/7913>`_: Fixed a crash or hang in :meth:`pytester.spawn <_pytest.pytester.Pytester.spawn>` when the :mod:`readline` module is involved.


- `7951 <https://github.com/pytest-dev/pytest/issues/7951>`_: Fixed handling of recursive symlinks when collecting tests.


- `7981 <https://github.com/pytest-dev/pytest/issues/7981>`_: Fixed symlinked directories not being followed during collection. Regressed in pytest 6.1.0.


- `8016 <https://github.com/pytest-dev/pytest/issues/8016>`_: Fixed only one doctest being collected when using ``pytest --doctest-modules path/to/an/__init__.py``.



Improved Documentation
----------------------

- `7429 <https://github.com/pytest-dev/pytest/issues/7429>`_: Add more information and use cases about skipping doctests.


- `7780 <https://github.com/pytest-dev/pytest/issues/7780>`_: Classes which should not be inherited from are now marked ``final class`` in the API reference.


- `7872 <https://github.com/pytest-dev/pytest/issues/7872>`_: ``_pytest.config.argparsing.Parser.addini()`` accepts explicit ``None`` and ``"string"``.


- `7878 <https://github.com/pytest-dev/pytest/issues/7878>`_: In pull request section, ask to commit after editing changelog and authors file.



Trivial/Internal Changes
------------------------

- `7802 <https://github.com/pytest-dev/pytest/issues/7802>`_: The ``attrs`` dependency requirement is now >=19.2.0 instead of >=17.4.0.


- `8014 <https://github.com/pytest-dev/pytest/issues/8014>`_: `.pyc` files created by pytest's assertion rewriting now conform to the newer PEP-552 format on Python>=3.7.
(These files are internal and only interpreted by pytest itself.)

6.1.2

=========================

Bug Fixes
---------

- `7758 <https://github.com/pytest-dev/pytest/issues/7758>`_: Fixed an issue where some files in packages are getting lost from ``--lf`` even though they contain tests that failed. Regressed in pytest 5.4.0.


- `7911 <https://github.com/pytest-dev/pytest/issues/7911>`_: Directories created by `tmpdir` are now considered stale after 3 days without modification (previous value was 3 hours) to avoid deleting directories still in use in long running test suites.



Improved Documentation
----------------------

- `7815 <https://github.com/pytest-dev/pytest/issues/7815>`_: Improve deprecation warning message for ``pytest._fillfuncargs()``.

6.1.1

=========================

Bug Fixes
---------

- `7807 <https://github.com/pytest-dev/pytest/issues/7807>`_: Fixed regression in pytest 6.1.0 causing incorrect rootdir to be determined in some non-trivial cases where parent directories have config files as well.


- `7814 <https://github.com/pytest-dev/pytest/issues/7814>`_: Fixed crash in header reporting when :confval:`testpaths` is used and contains absolute paths (regression in 6.1.0).

6.1.0

=========================

Breaking Changes
----------------

- `5585 <https://github.com/pytest-dev/pytest/issues/5585>`_: As per our policy, the following features which have been deprecated in the 5.X series are now
removed:

* The ``funcargnames`` read-only property of ``FixtureRequest``, ``Metafunc``, and ``Function`` classes. Use ``fixturenames`` attribute.

* ``pytest.fixture`` no longer supports positional arguments, pass all arguments by keyword instead.

* Direct construction of ``Node`` subclasses now raise an error, use ``from_parent`` instead.

* The default value for ``junit_family`` has changed to ``xunit2``. If you require the old format, add ``junit_family=xunit1`` to your configuration file.

* The ``TerminalReporter`` no longer has a ``writer`` attribute. Plugin authors may use the public functions of the ``TerminalReporter`` instead of accessing the ``TerminalWriter`` object directly.

* The ``--result-log`` option has been removed. Users are recommended to use the `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin instead.


For more information consult
`Deprecations and Removals <https://docs.pytest.org/en/stable/deprecations.html>`__ in the docs.



Deprecations
------------

- `6981 <https://github.com/pytest-dev/pytest/issues/6981>`_: The ``pytest.collect`` module is deprecated: all its names can be imported from ``pytest`` directly.


- `7097 <https://github.com/pytest-dev/pytest/issues/7097>`_: The ``pytest._fillfuncargs`` function is deprecated. This function was kept
for backward compatibi

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 80.604% when pulling 6df6d06 on pyup-scheduled-update-2021-05-31 into 843988d on master.

@pyup-bot
Copy link
Contributor Author

pyup-bot commented Jun 7, 2021

Closing this in favor of #184

@pyup-bot pyup-bot closed this Jun 7, 2021
@buxx buxx deleted the pyup-scheduled-update-2021-05-31 branch June 7, 2021 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants