Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Update #1

Closed
wants to merge 19 commits into from
Closed

Initial Update #1

wants to merge 19 commits into from

Conversation

pyup-bot
Copy link
Collaborator

This is my first visit to this fine repo so I have bundled all updates in a single pull request to make things easier for you to merge.

Close this pull request and delete the branch if you want me to start with single pull requests right away

Here's the executive summary:

Updates

Here's a list of all the updates bundled in this pull request. I've added some links to make it easier for you to find all the information you need.

PyYAML 3.12 » 3.12 PyPI | Changelog | Homepage
attrs 16.3.0 » 17.3.0 PyPI | Changelog | Homepage
crossbar 17.3.1 » 17.11.1 PyPI | Changelog | Homepage
pexpect 4.3.0 » 4.3.0 PyPI | Changelog | Docs
pytest 3.3.0 » 3.3.0 PyPI | Changelog | Repo | Homepage
pytest-cache 1.0 » 1.0 PyPI | Changelog | Repo | Docs
pytest-cov 2.5.1 » 2.5.1 PyPI | Changelog | Repo
pytest-isort 0.1.0 » 0.1.0 PyPI | Changelog | Repo
pytest-mock 1.6.3 » 1.6.3 PyPI | Changelog | Repo
pytest-pylint 0.7.1 » 0.7.1 PyPI | Changelog | Repo
pytest-runner 3.0 » 3.0 PyPI | Changelog | Repo
pyudev 0.21.0 » 0.21.0 PyPI | Changelog | Docs
yapf 0.20.0 » 0.20.0 PyPI | Changelog
requests 2.13.0 » 2.18.4 PyPI | Changelog | Homepage
autobahn 0.18.1 » 17.10.1 PyPI | Changelog | Homepage
sphinxcontrib-napoleon 0.6.1 » 0.6.1 PyPI | Docs
Sphinx 1.6.5 » 1.6.5 PyPI | Changelog | Homepage
sphinx_rtd_theme 0.2.4 » 0.2.4 PyPI | Changelog | Repo
docutils 0.13.1 » 0.14 PyPI | Changelog | Homepage | Bugtracker

Changelogs

PyYAML -> 3.12

3.10


  • Do not try to build LibYAML bindings on platforms other than CPython
    (Thank to olt(at)bogosoft(dot)com).
  • Clear cyclic references in the parser and the emitter
    (Thank to kristjan(at)ccpgames(dot)com).
  • Dropped support for Python 2.3 and 2.4.

3.09


  • Fixed an obscure scanner error not reported when there is
    no line break at the end of the stream (Thank to Ingy).
  • Fixed use of uninitialized memory when emitting anchors with
    LibYAML bindings (Thank to cegner(at)yahoo-inc(dot)com).
  • Fixed emitting incorrect BOM characters for UTF-16 (Thank to
    Valentin Nechayev)
  • Fixed the emitter for folded scalars not respecting the preferred
    line width (Thank to Ingy).
  • Fixed a subtle ordering issue with emitting '%TAG' directives
    (Thank to Andrey Somov).
  • Fixed performance regression with LibYAML bindings.

3.08


  • Python 3 support (Thank to Erick Tryzelaar).
  • Use Cython instead of Pyrex to build LibYAML bindings.
  • Refactored support for unicode and byte input/output streams.

3.07


  • The emitter learned to use an optional indentation indicator
    for block scalar; thus scalars with leading whitespaces
    could now be represented in a literal or folded style.
  • The test suite is now included in the source distribution.
    To run the tests, type 'python setup.py test'.
  • Refactored the test suite: dropped unittest in favor of
    a custom test appliance.
  • Fixed the path resolver in CDumper.
  • Forced an explicit document end indicator when there is
    a possibility of parsing ambiguity.
  • More setup.py improvements: the package should be usable
    when any combination of setuptools, Pyrex and LibYAML
    is installed.
  • Windows binary packages are built against LibYAML-0.1.2.
  • Minor typos and corrections (Thank to Ingy dot Net
    and Andrey Somov).

3.06


  • setup.py checks whether LibYAML is installed and if so, builds
    and installs LibYAML bindings. To force or disable installation
    of LibYAML bindings, use '--with-libyaml' or '--without-libyaml'
    respectively.
  • The source distribution includes compiled Pyrex sources so
    building LibYAML bindings no longer requires Pyrex installed.
  • 'yaml.load()' raises an exception if the input stream contains
    more than one YAML document.
  • Fixed exceptions produced by LibYAML bindings.
  • Fixed a dot '.' character being recognized as !!float.
  • Fixed Python 2.3 compatibility issue in constructing !!timestamp values.
  • Windows binary packages are built against the LibYAML stable branch.
  • Added attributes 'yaml.version' and 'yaml.with_libyaml'.

3.05


  • Windows binary packages were built with LibYAML trunk.
  • Fixed a bug that prevent processing a live stream of YAML documents in
    timely manner (Thanks edward(at)sweetbytes(dot)net).
  • Fixed a bug when the path in add_path_resolver contains boolean values
    (Thanks jstroud(at)mbi(dot)ucla(dot)edu).
  • Fixed loss of microsecond precision in timestamps
    (Thanks edemaine(at)mit(dot)edu).
  • Fixed loading an empty YAML stream.
  • Allowed immutable subclasses of YAMLObject.
  • Made the encoding of the unicode->str conversion explicit so that
    the conversion does not depend on the default Python encoding.
  • Forced emitting float values in a YAML compatible form.

3.04


  • Include experimental LibYAML bindings.
  • Fully support recursive structures.
  • Sort dictionary keys. Mapping node values are now represented
    as lists of pairs instead of dictionaries. No longer check
    for duplicate mapping keys as it didn't work correctly anyway.
  • Fix invalid output of single-quoted scalars in cases when a single
    quote is not escaped when preceeded by whitespaces or line breaks.
  • To make porting easier, rewrite Parser not using generators.
  • Fix handling of unexpected block mapping values.
  • Fix a bug in Representer.represent_object: copy_reg.dispatch_table
    was not correctly handled.
  • Fix a bug when a block scalar is incorrectly emitted in the simple
    key context.
  • Hold references to the objects being represented.
  • Make Representer not try to guess !!pairs when a list is represented.
  • Fix timestamp constructing and representing.
  • Fix the 'N' plain scalar being incorrectly recognized as !!bool.

3.03


  • Fix Python 2.5 compatibility issues.
  • Fix numerous bugs in the float handling.
  • Fix scanning some ill-formed documents.
  • Other minor fixes.

3.02


  • Fix win32 installer. Apparently bdist_wininst does not work well
    under Linux.
  • Fix a bug in add_path_resolver.
  • Add the yaml-highlight example. Try to run on a color terminal:
    python yaml_hl.py <any_document.yaml.

3.01


  • Initial release. The version number reflects the codename
    of the project (PyYAML 3000) and differenciates it from
    the abandoned PyYaml module.

attrs 16.3.0 -> 17.3.0

17.3.0


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

  • Attributes are not defined on the class body anymore.

This means that if you define a class C with an attribute x, the class will not have an attribute x for introspection anymore.
Instead of C.x, use attr.fields(C).x or look at C.__attrs_attrs__.
The old behavior has been deprecated since version 16.1.
(253 <https://github.com/python-attrs/attrs/issues/253>_)

Changes
^^^^^^^

  • super() and __class__ now work on Python 3 when slots=True.
    (102 <https://github.com/python-attrs/attrs/issues/102>, 226 <https://github.com/python-attrs/attrs/issues/226>, 269 <https://github.com/python-attrs/attrs/issues/269>, 270 <https://github.com/python-attrs/attrs/issues/270>, 272 <https://github.com/python-attrs/attrs/issues/272>_)
  • Added type argument to attr.ib() and corresponding type attribute to attr.Attribute.

This change paves the way for automatic type checking and serialization (though as of this release attrs does not make use of it).
In Python 3.6 or higher, the value of attr.Attribute.type can alternately be set using variable type annotations
(see PEP 526 <https://www.python.org/dev/peps/pep-0526/>). (151 <https://github.com/python-attrs/attrs/issues/151>, 214 <https://github.com/python-attrs/attrs/issues/214>, 215 <https://github.com/python-attrs/attrs/issues/215>, 239 <https://github.com/python-attrs/attrs/issues/239>_)

  • The combination of str=True and slots=True now works on Python 2.
    (198 <https://github.com/python-attrs/attrs/issues/198>_)
  • attr.Factory is hashable again. (204 <https://github.com/python-attrs/attrs/issues/204>_)
  • Subclasses now can overwrite attribute definitions of their superclass.

That means that you can -- for example -- change the default value for an attribute by redefining it.
(221 <https://github.com/python-attrs/attrs/issues/221>, 229 <https://github.com/python-attrs/attrs/issues/229>)

  • Added new option auto_attribs to attr.s that allows to collect annotated fields without setting them to attr.ib().

Setting a field to an attr.ib() is still possible to supply options like validators.
Setting it to any other value is treated like it was passed as attr.ib(default=value) -- passing an instance of attr.Factory also works as expected.
(262 <https://github.com/python-attrs/attrs/issues/262>, 277 <https://github.com/python-attrs/attrs/issues/277>)

  • Instances of classes created using attr.make_class() can now be pickled.
    (282 <https://github.com/python-attrs/attrs/issues/282>_)

17.2.0


Changes:
^^^^^^^^

  • Validators are hashable again.
    Note that validators may become frozen in the future, pending availability of no-overhead frozen classes.
    192 <https://github.com/python-attrs/attrs/issues/192>_

17.1.0


To encourage more participation, the project has also been moved into a dedicated GitHub organization <https://github.com/python-attrs/>_ and everyone is most welcome to join!

attrs also has a logo now!

.. image:: http://www.attrs.org/en/latest/_static/attrs_logo.png
:alt: attrs logo

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

  • attrs will set the __hash__() method to None by default now.
    The way hashes were handled before was in conflict with Python's specification <https://docs.python.org/3/reference/datamodel.htmlobject.__hash__>.
    This may break some software although this breakage is most likely just surfacing of latent bugs.
    You can always make attrs create the __hash__() method using attr.s(hash=True).
    See 136
    for the rationale of this change.

.. warning::

Please do not upgrade blindly and do test your software!
Especially if you use instances as dict keys or put them into sets!

  • Correspondingly, attr.ib's hash argument is None by default too and mirrors the cmp argument as it should.

Deprecations:
^^^^^^^^^^^^^

  • attr.assoc() is now deprecated in favor of attr.evolve() and will stop working in 2018.

Changes:
^^^^^^^^

  • Fix default hashing behavior.
    Now hash mirrors the value of cmp and classes are unhashable by default.
    136_
    142 <https://github.com/python-attrs/attrs/issues/142>_
  • Added attr.evolve() that, given an instance of an attrs class and field changes as keyword arguments, will instantiate a copy of the given instance with the changes applied.
    evolve() replaces assoc(), which is now deprecated.
    evolve() is significantly faster than assoc(), and requires the class have an initializer that can take the field values as keyword arguments (like attrs itself can generate).
    116 <https://github.com/python-attrs/attrs/issues/116>_
    124 <https://github.com/python-attrs/attrs/pull/124>_
    135 <https://github.com/python-attrs/attrs/pull/135>_
  • FrozenInstanceError is now raised when trying to delete an attribute from a frozen class.
    118 <https://github.com/python-attrs/attrs/pull/118>_
  • Frozen-ness of classes is now inherited.
    128 <https://github.com/python-attrs/attrs/pull/128>_
  • __attrs_post_init__() is now run if validation is disabled.
    130 <https://github.com/python-attrs/attrs/pull/130>_
  • Added attr.validators.in_(options) that, given the allowed options, checks whether the attribute value is in it.
    This can be used to check constants, enums, mappings, etc.
    181 <https://github.com/python-attrs/attrs/pull/181>_
  • Added attr.validators.and_() that composes multiple validators into one.
    161 <https://github.com/python-attrs/attrs/issues/161>_
  • For convenience, the validator argument of attr.s now can take a list of validators that are wrapped using and_().
    138 <https://github.com/python-attrs/attrs/issues/138>_
  • Accordingly, attr.validators.optional() now can take a list of validators too.
    161 <https://github.com/python-attrs/attrs/issues/161>_
  • Validators can now be defined conveniently inline by using the attribute as a decorator.
    Check out the examples <http://www.attrs.org/en/stable/examples.htmlvalidators>_ to see it in action!
    143 <https://github.com/python-attrs/attrs/issues/143>_
  • attr.Factory() now has a takes_self argument that makes the initializer to pass the partially initialized instance into the factory.
    In other words you can define attribute defaults based on other attributes.
    165_
    189 <https://github.com/python-attrs/attrs/issues/189>_
  • Default factories can now also be defined inline using decorators.
    They are always passed the partially initialized instance.
    165_
  • Conversion can now be made optional using attr.converters.optional().
    105 <https://github.com/python-attrs/attrs/issues/105>_
    173 <https://github.com/python-attrs/attrs/pull/173>_
  • attr.make_class() now accepts the keyword argument bases which allows for subclassing.
    152 <https://github.com/python-attrs/attrs/pull/152>_
  • Metaclasses are now preserved with slots=True.
    155 <https://github.com/python-attrs/attrs/pull/155>_

.. _136: python-attrs/attrs#136
.. _165: python-attrs/attrs#165


crossbar 17.3.1 -> 17.11.1

17.4.1

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

  • new: MQTT core protocol support in beta
  • new: MQTT payload mapping modes (passthrough, native, dynamic)
  • new: use WAMP payload transparency for MQTT
  • new: Web resource type "nodeinfo"

pexpect -> 4.3.0

4.3

  • The async= parameter to integrate with asyncio has become async_=
    (:ghpull:431), as async is becoming a Python keyword from Python 3.6.
    Pexpect will still recognise async as an alternative spelling.
  • Similarly, the module pexpect.async became pexpect._async
    (:ghpull:450). This module is not part of the public API.
  • Fix problems with asyncio objects closing file descriptors during garbage
    collection (:ghissue:347, :ghpull:376).
  • Set the .pid attribute of a :class:~.PopenSpawn object (:ghpull:417).
  • Fix passing Windows paths to :class:~.PopenSpawn (:ghpull:446).
  • :class:~.PopenSpawn on Windows can pass string commands through to Popen
    without splitting them into a list (:ghpull:447).
  • Stop shlex trying to read from stdin when :class:~.PopenSpawn is
    passed cmd=None (:ghissue:433, :ghpull:434).
  • Ensure that an error closing a Pexpect spawn object raises a Pexpect error,
    rather than a Ptyprocess error (:ghissue:383, :ghpull:386).
  • Cleaned up invalid backslash escape sequences in strings (:ghpull:430,
    :ghpull:445).
  • The pattern for a password prompt in :mod:pexpect.pxssh changed from
    password to password: (:ghpull:452).
  • Correct docstring for using unicode with spawn (:ghpull:395).
  • Various other improvements to documentation.

4.2.1

  • Fix to allow running env in replwrap-ed bash.
  • Raise more informative exception from pxssh if it fails to connect.
  • Change passmass example to not log passwords entered.

4.2

  • Change: When an env parameter is specified to the :class:~.spawn or
    :class:~.run family of calls containing a value for PATH, its value is
    used to discover the target executable from a relative path, rather than the
    current process's environment PATH. This mirrors the behavior of
    :func:subprocess.Popen in the standard library (:ghissue:348).
  • Regression: Re-introduce capability for :meth:read_nonblocking in class
    :class:fdspawn as previously supported in version 3.3 (:ghissue:359).

4.0

  • Integration with :mod:asyncio: passing async=True to :meth:~.spawn.expect,
    :meth:~.spawn.expect_exact or :meth:~.spawn.expect_list will make them return a
    coroutine. You can get the result using yield from, or wrap it in an
    :class:asyncio.Task. This allows the event loop to do other things while
    waiting for output that matches a pattern.
  • Experimental support for Windows (with some caveats)—see :ref:windows.
  • Enhancement: allow method as callbacks of argument events for
    :func:pexpect.run (:ghissue:176).
  • It is now possible to call :meth:~.spawn.wait multiple times, or after a process
    is already determined to be terminated without raising an exception
    (:ghpull:211).
  • New :class:pexpect.spawn keyword argument, dimensions=(rows, columns)
    allows setting terminal screen dimensions before launching a program
    (:ghissue:122).
  • Fix regression that prevented executable, but unreadable files from
    being found when not specified by absolute path -- such as
    /usr/bin/sudo (:ghissue:104).
  • Fixed regression when executing pexpect with some prior releases of
    the multiprocessing module where stdin has been closed (:ghissue:86).

Backwards incompatible changes

  • Deprecated pexpect.screen and pexpect.ANSI. Please use other packages
    such as pyte <https://pypi.python.org/pypi/pyte>__ to emulate a terminal.
  • Removed the independent top-level modules (pxssh fdpexpect FSM screen ANSI)
    which were installed alongside Pexpect. These were moved into the Pexpect
    package in 3.0, but the old names were left as aliases.
  • Child processes created by Pexpect no longer ignore SIGHUP by default: the
    ignore_sighup parameter of :class:pexpect.spawn defaults to False. To
    get the old behaviour, pass ignore_sighup=True.

3.3

  • Added a mechanism to wrap REPLs, or shells, in an object which can conveniently
    be used to send commands and wait for the output (:mod:pexpect.replwrap).
  • Fixed issue where pexpect would attempt to execute a directory because
    it has the 'execute' bit set (:ghissue:37).
  • Removed the pexpect.psh module. This was never documented, and we found
    no evidence that people use it. The new :mod:pexpect.replwrap module
    provides a more flexible alternative.
  • Fixed TypeError: got <type 'str'> ('\r\n') as pattern in :meth:spawnu.readline
    method (:ghissue:67).
  • Fixed issue where EOF was not correctly detected in :meth:~.interact, causing
    a repeating loop of output on Linux, and blocking before EOF on BSD and
    Solaris (:ghissue:49).
  • Several Solaris (SmartOS) bugfixes, preventing :exc:IOError exceptions, especially
    when used with cron(1) (:ghissue:44).
  • Added new keyword argument echo=True for :class:spawn. On SVR4-like
    systems, the method :meth:~.isatty will always return False: the child pty
    does not appear as a terminal. Therefore, :meth:~.setecho, :meth:~.getwinsize,
    :meth:~.setwinsize, and :meth:~.waitnoecho are not supported on those platforms.

After this, we intend to start working on a bigger refactoring of the code, to
be released as Pexpect 4. There may be more bugfix 3.x releases, however.

3.2

  • Fix exception handling from :func:select.select on Python 2 (:ghpull:38).
    This was accidentally broken in the previous release when it was fixed for
    Python 3.
  • Removed a workaround for TIOCSWINSZ on very old systems, which was causing
    issues on some BSD systems (:ghpull:40).
  • Fixed an issue with exception handling in :mod:~pexpect.pxssh (:ghpull:43)

The documentation for :mod:~pexpect.pxssh was improved.

3.1

  • Fix an issue that prevented importing pexpect on Python 3 when sys.stdout
    was reassigned (:ghissue:30).
  • Improve prompt synchronisation in :mod:~pexpect.pxssh (:ghpull:28).
  • Fix pickling exception instances (:ghpull:34).
  • Fix handling exceptions from :func:select.select on Python 3 (:ghpull:33).

The examples have also been cleaned up somewhat - this will continue in future
releases.

3.0

The new major version number doesn't indicate any deliberate API incompatibility.
We have endeavoured to avoid breaking existing APIs. However, pexpect is under
new maintenance after a long dormancy, so some caution is warranted.

  • A new :ref:unicode API <unicode> was introduced.
  • Python 3 is now supported, using a single codebase.
  • Pexpect now requires at least Python 2.6 or 3.2.
  • The modules other than pexpect, such as :mod:pexpect.fdpexpect and
    :mod:pexpect.pxssh, were moved into the pexpect package. For now, wrapper
    modules are installed to the old locations for backwards compatibility (e.g.
    import pxssh will still work), but these will be removed at some point in
    the future.
  • Ignoring SIGHUP is now optional - thanks to Kimmo Parviainen-Jalanko for
    the patch.

We also now have docs on ReadTheDocs <https://pexpect.readthedocs.io/>,
and continuous integration on Travis CI <https://travis-ci.org/pexpect/pexpect>
.

2.4

  • Fix a bug regarding making the pty the controlling terminal when the process
    spawning it is not, actually, a terminal (such as from cron)

2.3

  • Fixed OSError exception when a pexpect object is cleaned up. Previously, you
    might have seen this exception::
 Exception exceptions.OSError: (10, 'No child processes')
 in <bound method spawn.__del__ of <pexpect.spawn instance at 0xd248c>> ignored

You should not see that anymore. Thanks to Michael Surette.

  • Added support for buffering reads. This greatly improves speed when trying to
    match long output from a child process. When you create an instance of the spawn
    object you can then set a buffer size. For now you MUST do the following to turn
    on buffering -- it may be on by default in future version::
 child = pexpect.spawn ('my_command')
 child.maxread=1000  Sets buffer to 1000 characters.
  • I made a subtle change to the way TIMEOUT and EOF exceptions behave.
    Previously you could either expect these states in which case pexpect
    will not raise an exception, or you could just let pexpect raise an
    exception when these states were encountered. If you expected the
    states then the before property was set to everything before the
    state was encountered, but if you let pexpect raise the exception then
    before was not set. Now, the before property will get set either
    way you choose to handle these states.
  • The spawn object now provides iterators for a file-like interface.
    This makes Pexpect a more complete file-like object. You can now write
    code like this::
 child = pexpect.spawn ('ls -l')
 for line in child:
     print line
  • write and writelines() no longer return a value. Use send() if you need that
    functionality. I did this to make the Spawn object more closely match a
    file-like object.
  • Added the attribute exitstatus. This will give the exit code returned
    by the child process. This will be set to None while the child is still
    alive. When isalive() returns 0 then exitstatus will be set.
  • Made a few more tweaks to isalive() so that it will operate more
    consistently on different platforms. Solaris is the most difficult to support.
  • You can now put TIMEOUT in a list of expected patterns. This is just like
    putting EOF in the pattern list. Expecting for a TIMEOUT may not be
    used as often as EOF, but this makes Pexpect more consistent.
  • Thanks to a suggestion and sample code from Chad J. Schroeder I added the ability
    for Pexpect to operate on a file descriptor that is already open. This means that
    Pexpect can be used to control streams such as those from serial port devices. Now,
    you just pass the integer file descriptor as the "command" when constructing a
    spawn open. For example on a Linux box with a modem on ttyS1::
 fd = os.open("/dev/ttyS1", os.O_RDWR|os.O_NONBLOCK|os.O_NOCTTY)
 m = pexpect.spawn(fd)  Note integer fd is used instead of usual string.
 m.send("+++")  Escape sequence
 m.send("ATZ0\r")  Reset modem to profile 0
 rval = m.expect(["OK", "ERROR"])
  • read() was renamed to read_nonblocking(). Added new read() method
    that matches file-like object interface. In general, you should not notice
    the difference except that read() no longer allows you to directly set the
    timeout value. I hope this will not effect any existing code. Switching to
    read_nonblocking() should fix existing code.
  • Changed the name of set_echo() to setecho().
  • Changed the name of send_eof() to sendeof().
  • Modified kill() so that it checks to make sure the pid isalive().
  • modified spawn() (really called from __spawn()) so that it does not
    raise an exception if setwinsize() fails. Some platforms such as Cygwin
    do not like setwinsize. This was a constant problem and since it is not a
    critical feature I decided to just silence the error. Normally I don't like
    to do that, but in this case I'm making an exception.
  • Added a method close() that does what you think. It closes the file
    descriptor of the child application. It makes no attempt to actually kill the
    child or wait for its status.
  • Add variables __version__ and __revision__ (from cvs) to the pexpect
    modules. This is mainly helpful to me so that I can make sure that I'm testing
    with the right version instead of one already installed.
  • log_open() and log_close( have been removed. Now use setlog().
    The setlog() method takes a file object. This is far more flexible than
    the previous log method. Each time data is written to the file object it will
    be flushed. To turn logging off simply call setlog() with None.
  • renamed the isAlive() method to isalive() to match the more typical
    naming style in Python. Also the technique used to detect child process
    status has been drastically modified. Previously I did some funky stuff
    with signals which caused indigestion in other Python modules on some
    platforms. It was a big headache. It still is, but I think it works
    better now.
  • attribute matched renamed to after
  • new attribute match
  • The expect_eof() method is gone. You can now simply use the
    expect() method to look for EOF.
  • Pexpect works on OS X, but the nature of the quirks cause many of the
    tests to fail. See bugs. (Incomplete Child Output). The problem is more
    than minor, but Pexpect is still more than useful for most tasks.
  • Solaris: For some reason, the second time a pty file descriptor is created and
    deleted it never gets returned for use. It does not effect the first time
    or the third time or any time after that. It's only the second time. This
    is weird... This could be a file descriptor leak, or it could be some
    peculiarity of how Solaris recycles them. I thought it was a UNIX requirement
    for the OS to give you the lowest available filedescriptor number. In any case,
    this should not be a problem unless you create hundreds of pexpect instances...
    It may also be a pty module bug.

Moves and forks

  • Pexpect development used to be hosted on Sourceforge.
  • In 2011, Thomas Kluyver forked pexpect as 'pexpect-u', to support
    Python 3. He later decided he had taken the wrong approach with this.
  • In 2012, Noah Spurrier, the original author of Pexpect, moved the
    project to Github, but was still too busy to develop it much.
  • In 2013, Thomas Kluyver and Jeff Quast forked Pexpect again, intending
    to call the new fork Pexpected. Noah Spurrier agreed to let them use
    the name Pexpect, so Pexpect versions 3 and above are based on this
    fork, which now lives here on Github <https://github.com/pexpect/pexpect>_.

pytest -> 3.3.0

3.3.0

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

Deprecations and Removals

  • Pytest no longer supports Python 2.6 and 3.3. Those Python versions
    are EOL for some time now and incur maintenance and compatibility costs on
    the pytest core team, and following up with the rest of the community we
    decided that they will no longer be supported starting on this version. Users
    which still require those versions should pin pytest to <3.3. (2812 <https://github.com/pytest-dev/pytest/issues/2812>_)
  • Remove internal _preloadplugins() function. This removal is part of the
    pytest_namespace() hook deprecation. (2236 <https://github.com/pytest-dev/pytest/issues/2236>_)
  • Internally change CallSpec2 to have a list of marks instead of a broken
    mapping of keywords. This removes the keywords attribute of the internal
    CallSpec2 class. (2672 <https://github.com/pytest-dev/pytest/issues/2672>_)
  • Remove ParameterSet.deprecated_arg_dict - its not a public api and the lack
    of the underscore was a naming error. (2675 <https://github.com/pytest-dev/pytest/issues/2675>_)
  • Remove the internal multi-typed attribute Node._evalskip and replace it
    with the boolean Node._skipped_by_mark. (2767 <https://github.com/pytest-dev/pytest/issues/2767>_)

Features

  • pytest_fixture_post_finalizer hook can now receive a request
    argument. (2124 <https://github.com/pytest-dev/pytest/issues/2124>_)
  • Replace the old introspection code in compat.py that determines the available
    arguments of fixtures with inspect.signature on Python 3 and
    funcsigs.signature on Python 2. This should respect __signature__
    declarations on functions. (2267 <https://github.com/pytest-dev/pytest/issues/2267>_)
  • Report tests with global pytestmark variable only once. (2549 <https://github.com/pytest-dev/pytest/issues/2549>_)
  • Now pytest displays the total progress percentage while running tests. The
    previous output style can be set by configuring the console_output_style
    setting to classic. (2657 <https://github.com/pytest-dev/pytest/issues/2657>_)
  • Match warns signature to raises by adding match keyword. (2708 <https://github.com/pytest-dev/pytest/issues/2708>_)
  • Pytest now captures and displays output from the standard logging module.
    The user can control the logging level to be captured by specifying options
    in pytest.ini, the command line and also during individual tests using
    markers. Also, a caplog fixture is available that enables users to test
    the captured log during specific tests (similar to capsys for example).
    For more information, please see the logging docs <https://docs.pytest.org/en/latest/logging.html>. This feature was
    introduced by merging the popular pytest-catchlog <https://pypi.org/project/pytest-catchlog/>
    plugin, thanks to Thomas Hisch <https://github.com/thisch>. Be advised that during the merging the
    backward compatibility interface with the defunct pytest-capturelog has
    been dropped. (2794 <https://github.com/pytest-dev/pytest/issues/2794>
    )
  • Add allow_module_level kwarg to pytest.skip(), enabling to skip the
    whole module. (2808 <https://github.com/pytest-dev/pytest/issues/2808>_)
  • Allow setting file_or_dir, -c, and -o in PYTEST_ADDOPTS. (2824 <https://github.com/pytest-dev/pytest/issues/2824>_)
  • Return stdout/stderr capture results as a namedtuple, so out and
    err can be accessed by attribute. (2879 <https://github.com/pytest-dev/pytest/issues/2879>_)
  • Add capfdbinary, a version of capfd which returns bytes from
    readouterr(). (2923 <https://github.com/pytest-dev/pytest/issues/2923>_)
  • Add capsysbinary a version of capsys which returns bytes from
    readouterr(). (2934 <https://github.com/pytest-dev/pytest/issues/2934>_)
  • Implement feature to skip setup.py files when run with
    --doctest-modules. (502 <https://github.com/pytest-dev/pytest/issues/502>_)

Bug Fixes

  • Resume output capturing after capsys/capfd.disabled() context manager.
    (1993 <https://github.com/pytest-dev/pytest/issues/1993>_)
  • pytest_fixture_setup and pytest_fixture_post_finalizer hooks are now
    called for all conftest.py files. (2124 <https://github.com/pytest-dev/pytest/issues/2124>_)
  • If an exception happens while loading a plugin, pytest no longer hides the
    original traceback. In python2 it will show the original traceback with a new
    message that explains in which plugin. In python3 it will show 2 canonized
    exceptions, the original exception while loading the plugin in addition to an
    exception that PyTest throws about loading a plugin. (2491 <https://github.com/pytest-dev/pytest/issues/2491>_)
  • capsys and capfd can now be used by other fixtures. (2709 <https://github.com/pytest-dev/pytest/issues/2709>_)
  • Internal pytester plugin properly encodes bytes arguments to
    utf-8. (2738 <https://github.com/pytest-dev/pytest/issues/2738>_)
  • testdir now uses use the same method used by tmpdir to create its
    temporary directory. This changes the final structure of the testdir
    directory slightly, but should not affect usage in normal scenarios and
    avoids a number of potential problems. (2751 <https://github.com/pytest-dev/pytest/issues/2751>_)
  • Pytest no longer complains about warnings with unicode messages being
    non-ascii compatible even for ascii-compatible messages. As a result of this,
    warnings with unicode messages are converted first to an ascii representation
    for safety. (2809 <https://github.com/pytest-dev/pytest/issues/2809>_)
  • Change return value of pytest command when --maxfail is reached from
    2 (interrupted) to 1 (failed). (2845 <https://github.com/pytest-dev/pytest/issues/2845>_)
  • Fix issue in assertion rewriting which could lead it to rewrite modules which
    should not be rewritten. (2939 <https://github.com/pytest-dev/pytest/issues/2939>_)
  • Handle marks without description in pytest.ini. (2942 <https://github.com/pytest-dev/pytest/issues/2942>_)

Trivial/Internal Changes

  • pytest now depends on attrs <https://pypi.org/project/attrs/>_ for internal
    structures to ease code maintainability. (2641 <https://github.com/pytest-dev/pytest/issues/2641>_)
  • Refactored internal Python 2/3 compatibility code to use six. (2642 <https://github.com/pytest-dev/pytest/issues/2642>_)
  • Stop vendoring pluggy - we're missing out on its latest changes for not
    much benefit (2719 <https://github.com/pytest-dev/pytest/issues/2719>_)
  • Internal refactor: simplify ascii string escaping by using the
    backslashreplace error handler in newer Python 3 versions. (2734 <https://github.com/pytest-dev/pytest/issues/2734>_)
  • Remove unnecessary mark evaluator in unittest plugin (2767 <https://github.com/pytest-dev/pytest/issues/2767>_)
  • Calls to Metafunc.addcall now emit a deprecation warning. This function
    is scheduled to be removed in pytest-4.0. (2876 <https://github.com/pytest-dev/pytest/issues/2876>_)
  • Internal move of the parameterset extraction to a more maintainable place.
    (2877 <https://github.com/pytest-dev/pytest/issues/2877>_)
  • Internal refactoring to simplify scope node lookup. (2910 <https://github.com/pytest-dev/pytest/issues/2910>_)
  • Configure pytest to prevent pip from installing pytest in unsupported
    Python versions. (2922 <https://github.com/pytest-dev/pytest/issues/2922>_)

3.2.5

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

Bug Fixes

  • Remove py<1.5 restriction from pytest as this can cause version
    conflicts in some installations. (2926 <https://github.com/pytest-dev/pytest/issues/2926>_)

3.2.4

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

Bug Fixes

  • Fix the bug where running with --pyargs will result in items with
    empty parent.nodeid if run from a different root directory. (2775 <https://github.com/pytest-dev/pytest/issues/2775>_)
  • Fix issue with pytest.parametrize if argnames was specified as keyword arguments.
    (2819 <https://github.com/pytest-dev/pytest/issues/2819>_)
  • Strip whitespace from marker names when reading them from INI config. (2856 <https://github.com/pytest-dev/pytest/issues/2856>_)
  • Show full context of doctest source in the pytest output, if the line number of
    failed example in the docstring is < 9. (2882 &lt;https://github.com/pytest-dev/pytest/issues/2882&gt;_)
  • Match fixture paths against actual path segments in order to avoid matching folders which share a prefix.
    (2836 &lt;https://github.com/pytest-dev/pytest/issues/2836&gt;_)

Improved Documentation

  • Introduce a dedicated section about conftest.py. (1505 &lt;https://github.com/pytest-dev/pytest/issues/1505&gt;_)
  • Explicitly mention xpass in the documentation of xfail. (1997 &lt;https://github.com/pytest-dev/pytest/issues/1997&gt;_)
  • Append example for pytest.param in the example/parametrize document. (2658 &lt;https://github.com/pytest-dev/pytest/issues/2658&gt;_)
  • Clarify language of proposal for fixtures parameters (2893 &lt;https://github.com/pytest-dev/pytest/issues/2893&gt;_)
  • List python 3.6 in the documented supported versions in the getting started
    document. (2903 &lt;https://github.com/pytest-dev/pytest/issues/2903&gt;_)
  • Clarify the documentation of available fixture scopes. (538 &lt;https://github.com/pytest-dev/pytest/issues/538&gt;_)
  • Add documentation about the python -m pytest invocation adding the
    current directory to sys.path. (911 &lt;https://github.com/pytest-dev/pytest/issues/911&gt;_)

3.2.3

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

Bug Fixes

  • Fix crash in tab completion when no prefix is given. (2748 &lt;https://github.com/pytest-dev/pytest/issues/2748&gt;_)
  • The equality checking function (__eq__) of MarkDecorator returns
    False if one object is not an instance of MarkDecorator. (2758 &lt;https://github.com/pytest-dev/pytest/issues/2758&gt;_)
  • When running pytest --fixtures-per-test: don't crash if an item has no
    fixtureinfo attribute (e.g. doctests) (2788 &lt;https://github.com/pytest-dev/pytest/issues/2788&gt;)

Improved Documentation

  • In help text of -k option, add example of using not to not select
    certain tests whose names match the provided expression. (1442 &lt;https://github.com/pytest-dev/pytest/issues/1442&gt;_)
  • Add note in parametrize.rst about calling metafunc.parametrize
    multiple times. (1548 &lt;https://github.com/pytest-dev/pytest/issues/1548&gt;_)

Trivial/Internal Changes

  • Set xfail_strict=True in pytest's own test suite to catch expected
    failures as soon as they start to pass. (2722 &lt;https://github.com/pytest-dev/pytest/issues/2722&gt;_)
  • Fix typo in example of passing a callable to markers (in example/markers.rst)
    (2765 &lt;https://github.com/pytest-dev/pytest/issues/2765&gt;_)

3.2.2

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

Bug Fixes

  • Calling the deprecated request.getfuncargvalue() now shows the source of
    the call. (2681 &lt;https://github.com/pytest-dev/pytest/issues/2681&gt;_)
  • Allow tests declared as staticmethod to use fixtures. (2699 &lt;https://github.com/pytest-dev/pytest/issues/2699&gt;_)
  • Fixed edge-case during collection: attributes which raised pytest.fail
    when accessed would abort the entire collection. (2707 &lt;https://github.com/pytest-dev/pytest/issues/2707&gt;_)
  • Fix ReprFuncArgs with mixed unicode and UTF-8 args. (2731 &lt;https://github.com/pytest-dev/pytest/issues/2731&gt;_)

Improved Documentation

  • In examples on working with custom markers, add examples demonstrating the
    usage of pytest.mark.MARKER_NAME.with_args in comparison with
    pytest.mark.MARKER_NAME.__call__ (2604 &lt;https://github.com/pytest-dev/pytest/issues/2604&gt;_)
  • In one of the simple examples, use pytest_collection_modifyitems() to skip
    tests based on a command-line option, allowing its sharing while preventing a
    user error when acessing pytest.config before the argument parsing. (2653 &lt;https://github.com/pytest-dev/pytest/issues/2653&gt;_)

Trivial/Internal Changes

  • Fixed minor error in 'Good Practices/Manual Integration' code snippet.
    (2691 &lt;https://github.com/pytest-dev/pytest/issues/2691&gt;_)
  • Fixed typo in goodpractices.rst. (2721 &lt;https://github.com/pytest-dev/pytest/issues/2721&gt;_)
  • Improve user guidance regarding --resultlog deprecation. (2739 &lt;https://github.com/pytest-dev/pytest/issues/2739&gt;_)

3.2.1

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

Bug Fixes

  • Fixed small terminal glitch when collecting a single test item. (2579 &lt;https://github.com/pytest-dev/pytest/issues/2579&gt;_)
  • Correctly consider / as the file separator to automatically mark plugin
    files for rewrite on Windows. (2591 &lt;https://github.com/pytest- dev/pytest/issues/2591&gt;_)
  • Properly escape test names when setting PYTEST_CURRENT_TEST environment
    variable. (2644 &lt;https://github.com/pytest-dev/pytest/issues/2644&gt;_)
  • Fix error on Windows and Python 3.6+ when sys.stdout has been replaced
    with a stream-like object which does not implement the full io module
    buffer protocol. In particular this affects pytest-xdist users on the
    aforementioned platform. (2666 &lt;https://github.com/pytest- dev/pytest/issues/2666&gt;_)

Improved Documentation

  • Explicitly document which pytest features work with unittest. (2626 &lt;https://github.com/pytest-dev/pytest/issues/2626&gt;_)

3.2.0

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

Deprecations and Removals

  • pytest.approx no longer supports &gt;, &gt;=, &lt; and &lt;=
    operators to avoid surprising/inconsistent behavior. See the approx docs &lt;https://docs.pytest.org/en/latest/builtin.htmlpytest.approx&gt;_ for more
    information. (2003 &lt;https://github.com/pytest-dev/pytest/issues/2003&gt;_)
  • All old-style specific behavior in current classes in the pytest's API is
    considered deprecated at this point and will be removed in a future release.
    This affects Python 2 users only and in rare situations. (2147 &lt;https://github.com/pytest-dev/pytest/issues/2147&gt;_)
  • A deprecation warning is now raised when using marks for parameters
    in pytest.mark.parametrize. Use pytest.param to apply marks to
    parameters instead. (2427 &lt;https://github.com/pytest-dev/pytest/issues/2427&gt;_)

Features

  • Add support for numpy arrays (and dicts) to approx. (1994 &lt;https://github.com/pytest-dev/pytest/issues/1994&gt;_)
  • Now test function objects have a pytestmark attribute containing a list
    of marks applied directly to the test function, as opposed to marks inherited
    from parent classes or modules. (2516 &lt;https://github.com/pytest- dev/pytest/issues/2516&gt;_)
  • Collection ignores local virtualenvs by default; --collect-in-virtualenv
    overrides this behavior. (2518 &lt;https://github.com/pytest- dev/pytest/issues/2518&gt;_)
  • Allow class methods decorated as staticmethod to be candidates for
    collection as a test function. (Only for Python 2.7 and above. Python 2.6
    will still ignore static methods.) (2528 &lt;https://github.com/pytest- dev/pytest/issues/2528&gt;_)
  • Introduce mark.with_args in order to allow passing functions/classes as
    sole argument to marks. (2540 &lt;https://github.com/pytest- dev/pytest/issues/2540&gt;_)
  • New cache_dir ini option: sets the directory where the contents of the
    cache plugin are stored. Directory may be relative or absolute path: if relative path, then
    directory is created relative to rootdir, otherwise it is used as is.
    Additionally path may contain environment variables which are expanded during
    runtime. (2543 &lt;https://github.com/pytest-dev/pytest/issues/2543&gt;_)
  • Introduce the PYTEST_CURRENT_TEST environment variable that is set with
    the nodeid and stage (setup, call and teardown) of the test
    being currently executed. See the documentation &lt;https://docs.pytest.org/en/latest/example/simple.htmlpytest-current-test- environment-variable&gt;_ for more info. (2583 &lt;https://github.com/pytest- dev/pytest/issues/2583&gt;_)
  • Introduced pytest.mark.filterwarnings mark which allows overwriting the
    warnings filter on a per test, class or module level. See the docs &lt;https://docs.pytest.org/en/latest/warnings.htmlpytest-mark- filterwarnings&gt;_ for more information. (2598 &lt;https://github.com/pytest- dev/pytest/issues/2598&gt;_)
  • --last-failed now remembers forever when a test has failed and only
    forgets it if it passes again. This makes it easy to fix a test suite by
    selectively running files and fixing tests incrementally. (2621 &lt;https://github.com/pytest-dev/pytest/issues/2621&gt;_)
  • New pytest_report_collectionfinish hook which allows plugins to add
    messages to the terminal reporting after collection has been finished
    successfully. (2622 &lt;https://github.com/pytest-dev/pytest/issues/2622&gt;_)
  • Added support for PEP-415&#39;s &lt;https://www.python.org/dev/peps/pep-0415/&gt;_
    Exception.__suppress_context__. Now if a raise exception from None is
    caught by pytest, pytest will no longer chain the context in the test report.
    The behavior now matches Python's traceback behavior. (2631 &lt;https://github.com/pytest-dev/pytest/issues/2631&gt;_)
  • Exceptions raised by pytest.fail, pytest.skip and pytest.xfail
    now subclass BaseException, making them harder to be caught unintentionally
    by normal code. (580 &lt;https://github.com/pytest-dev/pytest/issues/580&gt;_)

Bug Fixes

  • Set stdin to a closed PIPE in pytester.py.Testdir.popen() for
    avoid unwanted interactive pdb (2023 &lt;https://github.com/pytest- dev/pytest/issues/2023&gt;_)
  • Add missing encoding attribute to sys.std* streams when using
    capsys capture mode. (2375 &lt;https://github.com/pytest- dev/pytest/issues/2375&gt;_)
  • Fix terminal color changing to black on Windows if colorama is imported
    in a conftest.py file. (2510 &lt;https://github.com/pytest- dev/pytest/issues/2510&gt;_)
  • Fix line number when reporting summary of skipped tests. (2548 &lt;https://github.com/pytest-dev/pytest/issues/2548&gt;_)
  • capture: ensure that EncodedFile.name is a string. (2555 &lt;https://github.com/pytest-dev/pytest/issues/2555&gt;_)
  • The options --fixtures and --fixtures-per-test will now keep
    indentation within docstrings. (2574 &lt;https://github.com/pytest- dev/pytest/issues/2574&gt;_)
  • doctests line numbers are now reported correctly, fixing pytest-sugar122 &lt;https://github.com/Frozenball/pytest-sugar/issues/122&gt;. (2610 &lt;https://github.com/pytest-dev/pytest/issues/2610&gt;)
  • Fix non-determinism in order of fixture collection. Adds new dependency
    (ordereddict) for Python 2.6. (920 &lt;https://github.com/pytest- dev/pytest/issues/920&gt;_)

Improved Documentation

  • Clarify pytest_configure hook call order. (2539 &lt;https://github.com/pytest-dev/pytest/issues/2539&gt;_)
  • Extend documentation for testing plugin code with the pytester plugin.
    (971 &lt;https://github.com/pytest-dev/pytest/issues/971&gt;_)

Trivial/Internal Changes

  • Update help message for --strict to make it clear it only deals with
    unregistered markers, not warnings. (2444 &lt;https://github.com/pytest- dev/pytest/issues/2444&gt;_)
  • Internal code move: move code for pytest.approx/pytest.raises to own files in
    order to cut down the size of python.py (2489 &lt;https://github.com/pytest- dev/pytest/issues/2489&gt;_)
  • Renamed the utility function _pytest.compat._escape_strings to
    _ascii_escaped to better communicate the function's purpose. (2533 &lt;https://github.com/pytest-dev/pytest/issues/2533&gt;_)
  • Improve error message for CollectError with skip/skipif. (2546 &lt;https://github.com/pytest-dev/pytest/issues/2546&gt;_)
  • Emit warning about yield tests being deprecated only once per generator.
    (2562 &lt;https://github.com/pytest-dev/pytest/issues/2562&gt;_)
  • Ensure final collected line doesn't include artifacts of previous write.
    (2571 &lt;https://github.com/pytest-dev/pytest/issues/2571&gt;_)
  • Fixed all flake8 errors and warnings. (2581 &lt;https://github.com/pytest- dev/pytest/issues/2581&gt;_)
  • Added fix-lint tox environment to run automatic pep8 fixes on the code.
    (2582 &lt;https://github.com/pytest-dev/pytest/issues/2582&gt;_)
  • Turn warnings into errors in pytest's own test suite in order to catch
    regressions due to deprecations more promptly. (2588 &lt;https://github.com/pytest-dev/pytest/issues/2588&gt;_)
  • Show multiple issue links in CHANGELOG entries. (2620 &lt;https://github.com/pytest-dev/pytest/issues/2620&gt;_)

3.1.3

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

Bug Fixes

  • Fix decode error in Python 2 for doctests in docstrings. (2434 &lt;https://github.com/pytest-dev/pytest/issues/2434&gt;_)
  • Exceptions raised during teardown by finalizers are now suppressed until all
    finalizers are called, with the initial exception reraised. (2440 &lt;https://github.com/pytest-dev/pytest/issues/2440&gt;_)
  • Fix incorrect "collected items" report when specifying tests on the command-
    line. (2464 &lt;https://github.com/pytest-dev/pytest/issues/2464&gt;_)
  • deprecated_call in context-manager form now captures deprecation warnings
    even if the same warning has already been raised. Also, deprecated_call
    will always produce the same error message (previously it would produce
    different messages in context-manager vs. function-call mode). (2469 &lt;https://github.com/pytest-dev/pytest/issues/2469&gt;_)
  • Fix issue where paths collected by pytest could have triple leading /
    characters. (2475 &lt;https://github.com/pytest-dev/pytest/issues/2475&gt;_)
  • Fix internal error when trying to detect the start of a recursive traceback.
    (2486 &lt;https://github.com/pytest-dev/pytest/issues/2486&gt;_)

Improved Documentation

  • Explicitly state for which hooks the calls stop after the first non-None
    result. (2493 &lt;https://github.com/pytest-dev/pytest/issues/2493&gt;_)

Trivial/Internal Changes

  • Create invoke tasks for updating the vendored packages. (2474 &lt;https://github.com/pytest-dev/pytest/issues/2474&gt;_)
  • Update copyright dates in LICENSE, README.rst and in the documentation.
    (2499 &lt;https://github.com/pytest-dev/pytest/issues/2499&gt;_)

3.1.2

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

Bug Fixes

  • Required options added via pytest_addoption will no longer prevent using
    --help without passing them. (1999)
  • Respect python_files in assertion rewriting. (2121)
  • Fix recursion error detection when frames in the traceback contain objects
    that can't be compared (like numpy arrays). (2459)
  • UnicodeWarning is issued from the internal pytest warnings plugin only
    when the message contains non-ascii unicode (Python 2 only). (2463)
  • Added a workaround for Python 3.6 WindowsConsoleIO breaking due to Pytests's
    FDCapture. Other code using console handles might still be affected by the
    very same issue and might require further workarounds/fixes, i.e. colorama.
    (2467)

Improved Documentation

  • Fix internal API links to pluggy objects. (2331)
  • Make it clear that pytest.xfail stops test execution at the calling point
    and improve overall flow of the skipping docs. (810)

3.1.1

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

Bug Fixes

  • pytest warning capture no longer overrides existing warning filters. The
    previous behaviour would override all filters and caused regressions in test
    suites which configure warning filters to match their needs. Note that as a
    side-effect of this is that DeprecationWarning and
    PendingDeprecationWarning are no longer shown by default. (2430)
  • Fix issue with non-ascii contents in doctest text files. (2434)
  • Fix encoding errors for unicode warnings in Python 2. (2436)
  • pytest.deprecated_call now captures PendingDeprecationWarning in
    context manager form. (2441)

Improved Documentation

  • Addition of towncrier for changelog management. (2390)

3.1.0

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

New Features

  • The pytest-warnings plugin has been integrated into the core and now pytest automatically
    captures and displays warnings at the end of the test session.

.. warning::

This feature may disrupt test suites which apply and treat warnings themselves, and can be
disabled in your pytest.ini:

.. code-block:: ini

 [pytest]
 addopts = -p no:warnings

See the warnings documentation page &lt;https://docs.pytest.org/en/latest/warnings.html&gt;_ for more
information.

Thanks nicoddemus_ for the PR.

  • Added junit_suite_name ini option to specify root &lt;testsuite&gt; name for JUnit XML reports (533_).
  • Added an ini option doctest_encoding to specify which encoding to use for doctest files.
    Thanks wheerd_ for the PR (2101_).
  • pytest.warns now checks for subclass relationship rather than
    class equality. Thanks lesteve_ for the PR (2166_)
  • pytest.raises now asserts that the error message matches a text or regex
    with the match keyword argument. Thanks Kriechi_ for the PR.
  • pytest.param can be used to declare test parameter sets with marks and test ids.
    Thanks RonnyPfannschmidt_ for the PR.

Changes

  • remove all internal uses of pytest_namespace hooks,
    this is to prepare the removal of preloadconfig in pytest 4.0
    Thanks to RonnyPfannschmidt_ for the PR.
  • pytest now warns when a callable ids raises in a parametrized test. Thanks fogo_ for the PR.
  • It is now possible to skip test classes from being collected by setting a
    __test__ attribute to False in the class body (2007). Thanks
    to syre
    for the report and lwm_ for the PR.
  • Change junitxml.py to produce reports that comply with Junitxml schema.
    If the same test fails with failure in call and then errors in teardown
    we split testcase element into two, one containing the error and the other
    the failure. (2228) Thanks to kkoukiou for the PR.
  • Testcase reports with a url attribute will now properly write this to junitxml.
    Thanks fushi_ for the PR (1874_).
  • Remove common items from dict comparision output when verbosity=1. Also update
    the truncation message to make it clearer that pytest truncates all
    assertion messages if verbosity < 2 (1512).
    Thanks mattduck
    for the PR
  • --pdbcls no longer implies --pdb. This makes it possible to use
    addopts=--pdbcls=module.SomeClass on pytest.ini. Thanks davidszotten_ for
    the PR (1952_).
  • fix 2013_: turn RecordedWarning into namedtuple,
    to give it a comprehensible repr while preventing unwarranted modification.
  • fix 2208_: ensure a iteration limit for pytest.compat.get_real_func.
    Thanks RonnyPfannschmidt
    for the report and PR.
  • Hooks are now verified after collection is complete, rather than right after loading installed plugins. This
    makes it easy to write hooks for plugins which will be loaded during collection, for example using the
    pytest_plugins special variable (1821).
    Thanks nicoddemus
    for the PR.
  • Modify pytest_make_parametrize_id() hook to accept argname as an
    additional parameter.
    Thanks unsignedint_ for the PR.
  • Add venv to the default norecursedirs setting.
    Thanks The-Compiler_ for the PR.
  • PluginManager.import_plugin now accepts unicode plugin names in Python 2.
    Thanks reutsharabani_ for the PR.
  • fix 2308: When using both --lf and --ff, only the last failed tests are run.
    Thanks ojii
    for the PR.
  • Replace minor/patch level version numbers in the documentation with placeholders.
    This significantly reduces change-noise as different contributors regnerate
    the documentation on different platforms.
    Thanks RonnyPfannschmidt_ for the PR.
  • fix 2391: consider pytest_plugins on all plugin modules
    Thanks RonnyPfannschmidt
    for the PR.

Bug Fixes

  • Fix AttributeError on sys.stdout.buffer / sys.stderr.buffer
    while using capsys fixture in python 3. (1407).
    Thanks to asottile
    .
  • Change capture.py's DontReadFromInput class to throw io.UnsupportedOperation errors rather
    than ValueErrors in the fileno method (2276).
    Thanks metasyn
    and vlad-dragos_ for the PR.
  • Fix exception formatting while importing modules when the exception message
    contains non-ascii characters (2336).
    Thanks fabioz
    for the report and nicoddemus_ for the PR.
  • Added documentation related to issue (1937)
    Thanks skylarjhdownes
    for the PR.
  • Allow collecting files with any file extension as Python modules (2369).
    Thanks Kodiologist
    for the PR.
  • Show the correct error message when collect "parametrize" func with wrong args (2383).
    Thanks The-Compiler
    for the report and robin0371_ for the PR.

.. _davidszotten: https://github.com

@jluebbe jluebbe closed this Feb 16, 2018
@jluebbe jluebbe deleted the pyup-initial-update branch February 16, 2018 09:53
jluebbe pushed a commit that referenced this pull request Mar 21, 2024
The docker docs contain [1] these COPY forms:

  COPY [--chown=<user>:<group>] [--chmod=<perms>] <src>... <dest>
  COPY [--chown=<user>:<group>] [--chmod=<perms>] ["<src>",... "<dest>"]

Arguments within [ ] are optional. The square brackets are not meant to
be part of the actual instruction.

The docker docs [1] mention that "[e]ach <src> may contain wildcards and
matching will be done using Go’s filepath.Match rules". Go’s
filepath.Match [2] interprets terms in square brackets as a character
class. "[--chown=root:root]" must have been interpreted as a valid
character class until recently. A couple of days ago, building the "dut"
service started failing:

  Building dut
  #0 building with "default" instance using docker driver

  #1 [internal] load build definition from Dockerfile
  #1 transferring dockerfile: 924B done
  #1 DONE 0.0s

  #2 [internal] load .dockerignore
  #2 transferring context: 2B done
  #2 DONE 0.0s

  #3 [internal] load metadata for docker.io/library/debian:bookworm-slim
  #3 DONE 0.1s

  #4 [1/4] FROM docker.io/library/debian:bookworm-slim@sha256:89468107e4c2b9fdea2f15fc582bf92c25aa4296a661ca0202f7ea2f4fc3f48c
  #4 CACHED

  #5 [internal] load build context
  #5 transferring context: 56B done
  #5 ERROR: error from sender: invalid includepatterns: []: syntax error in pattern

Fix this by dropping the accidental square brackets around the --chown
option.

[1] https://docs.docker.com/engine/reference/builder/#copy
[2] https://pkg.go.dev/path/filepath#Match

Signed-off-by: Bastian Krause <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants