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 #2

Open
wants to merge 15 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@pyup-bot

pyup-bot commented Oct 12, 2018

This PR sets up pyup.io on this repo and updates all dependencies at once, in a single branch.

Subsequent pull requests will update one dependency at a time, each in their own branch. If you want to start with that right away, simply close this PR.

Update gitpython from 2.1.11 to 2.1.11.

Changelog

2.1.11

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

see the following for (most) details:
https://github.com/gitpython-developers/gitpython/milestone/26?closed=1

or run have a look at the difference between tags v2.1.10 and v2.1.11:
https://github.com/gitpython-developers/GitPython/compare/2.1.10...2.1.11

2.1.10

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

see the following for (most) details:
https://github.com/gitpython-developers/gitpython/milestone/25?closed=1

or run have a look at the difference between tags v2.1.9 and v2.1.10:
https://github.com/gitpython-developers/GitPython/compare/2.1.9...2.1.10

2.1.9 - Dropping support for Python 2.6
=======================================

see the following for (most) details:
https://github.com/gitpython-developers/gitpython/milestone/24?closed=1

or run have a look at the difference between tags v2.1.8 and v2.1.9:
https://github.com/gitpython-developers/GitPython/compare/2.1.8...2.1.9

2.1.8

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

see the following for (most) details:
https://github.com/gitpython-developers/gitpython/milestone/23?closed=1

or run have a look at the difference between tags v2.1.7 and v2.1.8:
https://github.com/gitpython-developers/GitPython/compare/2.1.7...2.1.8

2.1.6

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

* support for worktrees

2.1.3

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

All issues and PRs can be viewed in all detail when following this URL:
https://github.com/gitpython-developers/GitPython/milestone/21?closed=1

2.1.1

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

All issues and PRs can be viewed in all detail when following this URL:
https://github.com/gitpython-developers/GitPython/issues?q=is%3Aclosed+milestone%3A%22v2.1.1+-+Bugfixes%22

2.1.0

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

Special thanks to ankostis, who made this release possible (nearly) single-handedly.
GitPython is run by its users, and their PRs make all the difference, they keep
GitPython relevant. Thank you all so much for contributing !

Notable fixes
-------------

* The `GIT_DIR` environment variable does not override the `path` argument when
initializing a `Repo` object anymore. However, if said `path` unset, `GIT_DIR`
will be used to fill the void.

All issues and PRs can be viewed in all detail when following this URL:
https://github.com/gitpython-developers/GitPython/issues?q=is%3Aclosed+milestone%3A%22v2.1.0+-+proper+windows+support%22

2.0.9

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

* `tag.commit` will now resolve commits deeply.
* `Repo` objects can now be pickled, which helps with multi-processing.
* `Head.checkout()` now deals with detached heads, which is when it will return
the `HEAD` reference instead.

* `DiffIndex.iter_change_type(...)` produces better results when diffing

2.0.8

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

* `DiffIndex.iter_change_type(...)` produces better results when diffing
an index against the working tree.
* `Repo().is_dirty(...)` now supports the `path` parameter, to specify a single
path by which to filter the output. Similar to `git status <path>`
* Symbolic refs created by this library will now be written with a newline
character, which was previously missing.
* `blame()` now properly preserves multi-line commit messages.
* No longer corrupt ref-logs by writing multi-line comments into them.

2.0.7

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

* `IndexFile.commit(...,skip_hooks=False)` added. This parameter emulates the 
behaviour of `--no-verify` on the command-line.

2.0.6

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

* Fix: remote output parser now correctly matches refs with non-ASCII
chars in them
* API: Diffs now have `a_rawpath`, `b_rawpath`, `raw_rename_from`,
`raw_rename_to` properties, which are the raw-bytes equivalents of their
unicode path counterparts.
* Fix: TypeError about passing keyword argument to string decode() on
Python 2.6.
* Feature: `setUrl API on Remotes <https://github.com/gitpython-developers/GitPython/pull/446issuecomment-224670539>`_

2.0.5

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

* Fix: parser of fetch info lines choked on some legitimate lines

2.0.4

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

* Fix: parser of commit object data is now robust against cases where
commit object contains invalid bytes.  The invalid characters are now
replaced rather than choked on.
* Fix: non-ASCII paths are now properly decoded and returned in
``.diff()`` output
* Fix: `RemoteProgress` will now strip the ', ' prefix or suffix from messages.
* API: Remote.[fetch|push|pull](...) methods now allow the ``progress`` argument to
be a callable. This saves you from creating a custom type with usually just one
implemented method.

2.0.3

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

* Fix: bug in ``git-blame --incremental`` output parser that broken when
commit messages contained ``\r`` characters
* Fix: progress handler exceptions are not caught anymore, which would usually just hide bugs
previously.
* Fix: The `Git.execute` method will now redirect `stdout` to `devnull` if `with_stdout` is false, 
which is the intended behaviour based on the parameter's documentation.

2.0.2

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

* Fix: source package does not include \*.pyc files
* Fix: source package does include doc sources

2.0.1

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

* Fix: remote output parser now correctly matches refs with "" in them

2.0.0

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

Please note that due to breaking changes, we have to increase the major version.

* **IMPORTANT**: This release drops support for python 2.6, which is
officially deprecated by the python maintainers.
* **CRITICAL**: `Diff` objects created with patch output will now not carry
the --- and +++ header lines anymore.  All diffs now start with the
header line directly.  Users that rely on the old behaviour can now
(reliably) read this information from the a_path and b_path properties
without having to parse these lines manually.
* `Commit` now has extra properties `authored_datetime` and
`committer_datetime` (to get Python datetime instances rather than
timestamps)
* `Commit.diff()` now supports diffing the root commit via
`Commit.diff(NULL_TREE)`.
* `Repo.blame()` now respects `incremental=True`, supporting incremental
blames.  Incremental blames are slightly faster since they don't include
the file's contents in them.
* Fix: `Diff` objects created with patch output will now have their
`a_path` and `b_path` properties parsed out correctly.  Previously, some
values may have been populated incorrectly when a file was added or
deleted.
* Fix: diff parsing issues with paths that contain "unsafe" chars, like
spaces, tabs, backslashes, etc.

1.0.2

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

* IMPORTANT: Changed default object database of `Repo` objects to `GitCmdObjectDB`. The pure-python implementation
used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
with large repositories.
* CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
divisiblej by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
* A list of all additional fixes can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`_
* CRITICAL: `Tree.cache` was removed without replacement. It is technically impossible to change individual trees and expect their serialization results to be consistent with what *git* expects. Instead, use the `IndexFile` facilities to adjust the content of the staging area, and write it out to the respective tree objects using `IndexFile.write_tree()` instead.

1.0.1

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

* A list of all issues can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed>`_

1.0.0

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

This version is equivalent to v0.3.7, but finally acknowledges that GitPython is stable and production ready.

It follows the `semantic version scheme <http://semver.org>`_, and thus will not break its existing API unless it goes 2.0.

0.3.7

=============
* `IndexFile.add()` will now write the index without any extension data by default. However, you may override this behaviour with the new `write_extension_data` keyword argument.

- Renamed `ignore_tree_extension_data` keyword argument in `IndexFile.write(...)` to `ignore_extension_data`
* If the git command executed during `Remote.push(...)|fetch(...)` returns with an non-zero exit code and GitPython didn't
obtain any head-information, the corresponding `GitCommandError` will be raised. This may break previous code which expected
these operations to never raise. However, that behavious is undesirable as it would effectively hide the fact that there
was an error. See `this issue <https://github.com/gitpython-developers/GitPython/issues/271>`_ for more information.

* If the git executable can't be found in the PATH or at the path provided by `GIT_PYTHON_GIT_EXECUTABLE`, this is made
obvious by throwing `GitCommandNotFound`, both on unix and on windows.

- Those who support **GUI on windows** will now have to set `git.Git.USE_SHELL = True` to get the previous behaviour.

* A list of all issues can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed>`_

0.3.6

================
* **DOCS**

* special members like `__init__` are now listed in the API documentation
* tutorial section was revised entirely, more advanced examples were added.

* **POSSIBLY BREAKING CHANGES**

* As `rev_parse` will now throw `BadName` as well as `BadObject`, client code will have to catch both exception types.
* Repo.working_tree_dir now returns None if it is bare. Previously it raised AssertionError.
* IndexFile.add() previously raised AssertionError when paths where used with bare repository, now it raises InvalidGitRepositoryError

* Added `Repo.merge_base()` implementation. See the `respective issue on GitHub <https://github.com/gitpython-developers/GitPython/issues/169>`_
* `[include]` sections in git configuration files are now respected
* Added `GitConfigParser.rename_section()`
* Added `Submodule.rename()`
* A list of all issues can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.6+-+Features%22+>`_

0.3.5

================
* push/pull/fetch operations will not block anymore
* diff() can now properly detect renames, both in patch and raw format. Previously it only worked when create_patch was True.
* repo.odb.update_cache() is now called automatically after fetch and pull operations. In case you did that in your own code, you might want to remove your line to prevent a double-update that causes unnecessary IO.
* `Repo(path)` will not automatically search upstream anymore and find any git directory on its way up. If you need that behaviour, you can turn it back on using the new `search_parent_directories=True` flag when constructing a `Repo` object.
* IndexFile.commit() now runs the `pre-commit` and `post-commit` hooks. Verified to be working on posix systems only.
* A list of all fixed issues can be found here: https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.5+-+bugfixes%22+

0.3.4 - Python 3 Support
========================
* Internally, hexadecimal SHA1 are treated as ascii encoded strings. Binary SHA1 are treated as bytes.
* Id attribute of Commit objects is now `hexsha`, instead of `binsha`. The latter makes no sense in python 3 and I see no application of it anyway besides its artificial usage in test cases.
* **IMPORTANT**: If you were using the config_writer(), you implicitly relied on __del__ to work as expected to flush changes. To be sure changes are flushed under PY3, you will have to call the new `release()` method to trigger a flush. For some reason, __del__ is not called necessarily anymore when a symbol goes out of scope.
* The `Tree` now has a `.join('name')` method which is equivalent to `tree / 'name'`

0.3.3

=====
* When fetching, pulling or pushing, and an error occurs, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing.
* Code Cleanup (in preparation for python 3 support)

* Applied autopep8 and cleaned up code
* Using python logging module instead of print statements to signal certain kinds of errors

0.3.2.1

=======
* `Fix for 207 <https://github.com/gitpython-developers/GitPython/issues/207>`_

0.3.2

=========
* **git** command wrapper

* Added ``version_info`` property which returns a tuple of integers representing the installed git version.

* Added GIT_PYTHON_GIT_EXECUTABLE environment variable, which can be used to set the desired git executable to be used. despite of what would be found in the path.

* **Blob** Type

* Added mode constants to ease the manual creation of blobs

* **IterableList**

* Added __contains__ and __delitem__ methods

* **More Changes**

* Configuration file parsing is more robust. It should now be able to handle everything that the git command can parse as well.
* The progress parsing was updated to support git 1.7.0.3 and newer. Previously progress was not enabled for the git command or only worked with ssh in case of older git versions.
* Parsing of tags was improved. Previously some parts of the name could not be parsed properly.
* The rev-parse pure python implementation now handles branches correctly if they look like hexadecimal sha's.
* GIT_PYTHON_TRACE is now set on class level of the Git type, previously it was a module level global variable.
* GIT_PYTHON_GIT_EXECUTABLE is a class level variable as well.

0.3.1

============
* Full Submodule-Support
* Added unicode support for author names. Commit.author.name is now unicode instead of string.
* Head Type changes

* config_reader() & config_writer() methods added for access to head specific options.
* tracking_branch() & set_tracking_branch() methods added for easy configuration of tracking branches.

0.3.0

============
Renamed Modules
---------------
* For consistency with naming conventions used in sub-modules like gitdb, the following modules have been renamed

* git.utils -> git.util
* git.errors -> git.exc
* git.objects.utils -> git.objects.util

General
-------
* Object instances, and everything derived from it, now use binary sha's internally. The 'sha' member was removed, in favor of the 'binsha' member. An 'hexsha' property is available for convenient conversions. They may only be initialized using their binary shas, reference names or revision specs are not allowed anymore.
* IndexEntry instances contained in IndexFile.entries now use binary sha's. Use the .hexsha property to obtain the hexadecimal version. The .sha property was removed to make the use of the respective sha more explicit.
* If objects are instantiated explicitly, a binary sha is required to identify the object, where previously any rev-spec could be used. The ref-spec compatible version still exists as Object.new or Repo.commit|Repo.tree respectively.
* The .data attribute was removed from the Object type, to obtain plain data, use the data_stream property instead.
* ConcurrentWriteOperation was removed, and replaced by LockedFD
* IndexFile.get_entries_key was renamed to entry_key
* IndexFile.write_tree: removed missing_ok keyword, its always True now. Instead of raising GitCommandError it raises UnmergedEntriesError. This is required as the pure-python implementation doesn't support the missing_ok keyword yet.
* diff.Diff.null_hex_sha renamed to NULL_HEX_SHA, to be conforming with the naming in the Object base class

0.2

=====
General
-------
* file mode in Tree, Blob and Diff objects now is an int compatible to definitions
in the stat module, allowing you to query whether individual user, group and other
read, write and execute bits are set.
* Adjusted class hierarchy to generally allow comparison and hash for Objects and Refs
* Improved Tag object which now is a Ref that may contain a tag object with additional
Information
* id_abbrev method has been removed as it could not assure the returned short SHA's
where unique
* removed basename method from Objects with path's as it replicated features of os.path
* from_string and list_from_string methods are now private and were renamed to
_from_string  and _list_from_string respectively. As part of the private API, they
may change without prior notice.
* Renamed all find_all methods to list_items - this method is part of the Iterable interface
that also provides a more efficients and more responsive iter_items method
* All dates, like authored_date and committer_date, are stored as seconds since epoch
to consume less memory - they can be converted using time.gmtime in a more suitable
presentation format if needed.
* Named method parameters changed on a wide scale to unify their use. Now git specific
terms are used everywhere, such as "Reference" ( ref ) and "Revision" ( rev ).
Previously multiple terms where used making it harder to know which type was allowed
or not.
* Unified diff interface to allow easy diffing between trees, trees and index, trees
and working tree, index and working tree, trees and index. This closely follows
the git-diff capabilities.
* Git.execute does not take the with_raw_output option anymore. It was not used
by anyone within the project and False by default.


Item Iteration
--------------
* Previously one would return and process multiple items as list only which can
hurt performance and memory consumption and reduce response times.
iter_items method provide an iterator that will return items on demand as parsed
from a stream. This way any amount of objects can be handled.
* list_items method returns IterableList allowing to access list members by name

objects Package
----------------
* blob, tree, tag and commit module have been moved to new objects package. This should
not affect you though unless you explicitly imported individual objects. If you just
used the git package, names did not change.

Blob
----
* former 'name' member renamed to path as it suits the actual data better

GitCommand
-----------
* git.subcommand call scheme now prunes out None from the argument list, allowing
to be called more comfortably as None can never be a valid to the git command
if converted to a string.
* Renamed 'git_dir' attribute to 'working_dir' which is exactly how it is used

Commit
------
* 'count' method is not an instance method to increase its ease of use
* 'name_rev' property returns a nice name for the commit's sha

Config
------
* The git configuration can now be read and manipulated directly from within python
using the GitConfigParser
* Repo.config_reader() returns a read-only parser
* Repo.config_writer() returns a read-write parser

Diff
----
* Members a a_commit and b_commit renamed to a_blob and b_blob - they are populated
with Blob objects if possible
* Members a_path and b_path removed as this information is kept in the blobs
* Diffs are now returned as DiffIndex allowing to more quickly find the kind of
diffs you are interested in

Diffing
-------
* Commit and Tree objects now support diffing natively with a common interface to
compare against other Commits or Trees, against the working tree or against the index.

Index
-----
* A new Index class allows to read and write index files directly, and to perform
simple two and three way merges based on an arbitrary index.

References
------------
* References are object that point to a Commit
* SymbolicReference are a pointer to a Reference Object, which itself points to a specific
Commit
* They will dynamically retrieve their object at the time of query to assure the information
is actual. Recently objects would be cached, hence ref object not be safely kept
persistent.

Repo
----
* Moved blame method from Blob to repo as it appeared to belong there much more.
* active_branch method now returns a Head object instead of a string with the name
of the active branch.
* tree method now requires a Ref instance as input and defaults to the active_branch
instead of master
* is_dirty now takes additional arguments allowing fine-grained control about what is
considered dirty
* Removed the following methods:

- 'log' method as it as effectively the same as the 'commits' method
- 'commits_since' as it is just a flag given to rev-list in Commit.iter_items
- 'commit_count' as it was just a redirection to the respective commit method
- 'commits_between', replaced by a note on the iter_commits method as it can achieve the same thing
- 'commit_delta_from' as it was a very special case by comparing two different repjrelated repositories, i.e. clones, git-rev-list would be sufficient to find commits that would need to be transferred for example.
- 'create' method which equals the 'init' method's functionality
- 'diff' - it returned a mere string which still had to be parsed
- 'commit_diff' - moved to Commit, Tree and Diff types respectively

* Renamed the following methods:

- commits to iter_commits to improve the performance, adjusted signature
- init_bare to init, implying less about the options to be used
- fork_bare to clone, as it was to represent general clone functionality, but implied
 a bare clone to be more versatile
- archive_tar_gz and archive_tar and replaced by archive method with different signature

* 'commits' method has no max-count of returned commits anymore, it now behaves  like git-rev-list
* The following methods and properties were added

- 'untracked_files' property, returning all currently untracked files
- 'head', creates a head object
- 'tag', creates a tag object
- 'iter_trees' method
- 'config_reader' method
- 'config_writer' method
- 'bare' property, previously it was a simple attribute that could be written

* Renamed the following attributes

- 'path' is now 'git_dir'
- 'wd' is now 'working_dir'

* Added attribute

- 'working_tree_dir' which may be None in case of bare repositories

Remote
------
* Added Remote object allowing easy access to remotes
* Repo.remotes lists all remotes
* Repo.remote returns a remote of the specified name if it exists

Test Framework
--------------
* Added support for common TestCase base class that provides additional functionality
to receive repositories tests can also write to. This way, more aspects can be
tested under real-world ( un-mocked ) conditions.

Tree
----
* former 'name' member renamed to path as it suits the actual data better
* added traverse method allowing to recursively traverse tree items
* deleted blob method
* added blobs and trees properties allowing to query the respective items in the
tree
* now mimics behaviour of a read-only list instead of a dict to maintain order.
* content_from_string method is now private and not part of the public API anymore

0.1.6

=====

General
-------
* Added in Sphinx documentation.

* Removed ambiguity between paths and treeishs. When calling commands that
accept treeish and path arguments and there is a path with the same name as
a treeish git cowardly refuses to pick one and asks for the command to use
the unambiguous syntax where '--' separates the treeish from the paths.

* ``Repo.commits``, ``Repo.commits_between``, ``Repo.commits_since``,
``Repo.commit_count``, ``Repo.commit``, ``Commit.count`` and
``Commit.find_all`` all now optionally take a path argument which
constrains the lookup by path.  This changes the order of the positional
arguments in ``Repo.commits`` and ``Repo.commits_since``.

Commit
------
* ``Commit.message`` now contains the full commit message (rather than just
the first line) and a new property ``Commit.summary`` contains the first
line of the commit message.

* Fixed a failure when trying to lookup the stats of a parentless commit from
a bare repo.

Diff
----
* The diff parser is now far faster and also addresses a bug where
sometimes b_mode was not set.

* Added support for parsing rename info to the diff parser. Addition of new
properties ``Diff.renamed``, ``Diff.rename_from``, and ``Diff.rename_to``.

Head
----
* Corrected problem where branches was only returning the last path component
instead of the entire path component following refs/heads/.

Repo
----
* Modified the gzip archive creation to use the python gzip module.

* Corrected ``commits_between`` always returning None instead of the reversed
list.

0.1.5

=====

General
-------
* upgraded to Mock 0.4 dependency.

* Replace GitPython with git in repr() outputs.

* Fixed packaging issue caused by ez_setup.py.

Blob
----
* No longer strip newlines from Blob data.

Commit
------
* Corrected problem with git-rev-list --bisect-all. See
http://groups.google.com/group/git-python/browse_thread/thread/aed1d5c4b31d5027

Repo
----
* Corrected problems with creating bare repositories.

* Repo.tree no longer accepts a path argument. Use:

 >>> dict(k, o for k, o in tree.items() if k in paths)

* Made daemon export a property of Repo. Now you can do this:

 >>> exported = repo.daemon_export
 >>> repo.daemon_export = True

* Allows modifying the project description. Do this:

 >>> repo.description = "Foo Bar"
 >>> repo.description
 'Foo Bar'

* Added a read-only property Repo.is_dirty which reflects the status of the
working directory.

* Added a read-only Repo.active_branch property which returns the name of the
currently active branch.


Tree
----
* Switched to using a dictionary for Tree contents since you will usually want
to access them by name and order is unimportant.

* Implemented a dictionary protocol for Tree objects. The following:

 child = tree.contents['grit']

becomes:

 child = tree['grit']

* Made Tree.content_from_string a static method.

0.1.4.1

=======

* removed ``method_missing`` stuff and replaced with a ``__getattr__``
override in ``Git``.

0.1.4

=====

* renamed ``git_python`` to ``git``. Be sure to delete all pyc files before
testing.

Commit
------
* Fixed problem with commit stats not working under all conditions.

Git
---
* Renamed module to cmd.

* Removed shell escaping completely.

* Added support for ``stderr``, ``stdin``, and ``with_status``.

* ``git_dir`` is now optional in the constructor for ``git.Git``.  Git now
falls back to ``os.getcwd()`` when git_dir is not specified.

* add a ``with_exceptions`` keyword argument to git commands.
``GitCommandError`` is raised when the exit status is non-zero.

* add support for a ``GIT_PYTHON_TRACE`` environment variable.
``GIT_PYTHON_TRACE`` allows us to debug GitPython's usage of git through
the use of an environment variable.

Tree
----
* Fixed up problem where ``name`` doesn't exist on root of tree.

Repo
----
* Corrected problem with creating bare repo.  Added ``Repo.create`` alias.

0.1.2

=====

Tree
----
* Corrected problem with ``Tree.__div__`` not working with zero length files.
Removed ``__len__`` override and replaced with size instead. Also made size
cache properly. This is a breaking change.

0.1.1

=====
Fixed up some urls because I'm a moron

0.1.0

=====
initial release
Links

Update pytest from 3.8.2 to 3.8.2.

Changelog

3.8.2

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

Deprecations and Removals
-------------------------

- `4036 <https://github.com/pytest-dev/pytest/issues/4036>`_: The ``item`` parameter of ``pytest_warning_captured`` hook is now documented as deprecated. We realized only after
the ``3.8`` release that this parameter is incompatible with ``pytest-xdist``.

Our policy is to not deprecate features during bugfix releases, but in this case we believe it makes sense as we are
only documenting it as deprecated, without issuing warnings which might potentially break test suites. This will get
the word out that hook implementers should not use this parameter at all.

In a future release ``item`` will always be ``None`` and will emit a proper warning when a hook implementation
makes use of it.



Bug Fixes
---------

- `3539 <https://github.com/pytest-dev/pytest/issues/3539>`_: Fix reload on assertion rewritten modules.


- `4034 <https://github.com/pytest-dev/pytest/issues/4034>`_: The ``.user_properties`` attribute of ``TestReport`` objects is a list
of (name, value) tuples, but could sometimes be instantiated as a tuple
of tuples.  It is now always a list.


- `4039 <https://github.com/pytest-dev/pytest/issues/4039>`_: No longer issue warnings about using ``pytest_plugins`` in non-top-level directories when using ``--pyargs``: the
current ``--pyargs`` mechanism is not reliable and might give false negatives.


- `4040 <https://github.com/pytest-dev/pytest/issues/4040>`_: Exclude empty reports for passed tests when ``-rP`` option is used.


- `4051 <https://github.com/pytest-dev/pytest/issues/4051>`_: Improve error message when an invalid Python expression is passed to the ``-m`` option.


- `4056 <https://github.com/pytest-dev/pytest/issues/4056>`_: ``MonkeyPatch.setenv`` and ``MonkeyPatch.delenv`` issue a warning if the environment variable name is not ``str`` on Python 2.

In Python 2, adding ``unicode`` keys to ``os.environ`` causes problems with ``subprocess`` (and possible other modules),
making this a subtle bug specially susceptible when used with ``from __future__ import unicode_literals``.



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

- `3928 <https://github.com/pytest-dev/pytest/issues/3928>`_: Add possible values for fixture scope to docs.

3.8.1

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

Bug Fixes
---------

- `3286 <https://github.com/pytest-dev/pytest/issues/3286>`_: ``.pytest_cache`` directory is now automatically ignored by Git. Users who would like to contribute a solution for other SCMs please consult/comment on this issue.


- `3749 <https://github.com/pytest-dev/pytest/issues/3749>`_: Fix the following error during collection of tests inside packages::

   TypeError: object of type 'Package' has no len()


- `3941 <https://github.com/pytest-dev/pytest/issues/3941>`_: Fix bug where indirect parametrization would consider the scope of all fixtures used by the test function to determine the parametrization scope, and not only the scope of the fixtures being parametrized.


- `3973 <https://github.com/pytest-dev/pytest/issues/3973>`_: Fix crash of the assertion rewriter if a test changed the current working directory without restoring it afterwards.


- `3998 <https://github.com/pytest-dev/pytest/issues/3998>`_: Fix issue that prevented some caplog properties (for example ``record_tuples``) from being available when entering the debugger with ``--pdb``.


- `3999 <https://github.com/pytest-dev/pytest/issues/3999>`_: Fix ``UnicodeDecodeError`` in python2.x when a class returns a non-ascii binary ``__repr__`` in an assertion which also contains non-ascii text.



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

- `3996 <https://github.com/pytest-dev/pytest/issues/3996>`_: New `Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`_ page shows all currently
deprecated features, the rationale to do so, and alternatives to update your code. It also list features removed
from pytest in past major releases to help those with ancient pytest versions to upgrade.



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

- `3955 <https://github.com/pytest-dev/pytest/issues/3955>`_: Improve pre-commit detection for changelog filenames


- `3975 <https://github.com/pytest-dev/pytest/issues/3975>`_: Remove legacy code around im_func as that was python2 only

3.8.0

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

Deprecations and Removals
-------------------------

- `2452 <https://github.com/pytest-dev/pytest/issues/2452>`_: ``Config.warn`` and ``Node.warn`` have been
deprecated, see `<https://docs.pytest.org/en/latest/deprecations.htmlconfig-warn-and-node-warn>`_ for rationale and
examples.

- `3936 <https://github.com/pytest-dev/pytest/issues/3936>`_: ``pytest.mark.filterwarnings`` second parameter is no longer regex-escaped,
making it possible to actually use regular expressions to check the warning message.

**Note**: regex-escaping the match string was an implementation oversight that might break test suites which depend
on the old behavior.



Features
--------

- `2452 <https://github.com/pytest-dev/pytest/issues/2452>`_: Internal pytest warnings are now issued using the standard ``warnings`` module, making it possible to use
the standard warnings filters to manage those warnings. This introduces ``PytestWarning``,
``PytestDeprecationWarning`` and ``RemovedInPytest4Warning`` warning types as part of the public API.

Consult `the documentation <https://docs.pytest.org/en/latest/warnings.htmlinternal-pytest-warnings>`_ for more info.


- `2908 <https://github.com/pytest-dev/pytest/issues/2908>`_: ``DeprecationWarning`` and ``PendingDeprecationWarning`` are now shown by default if no other warning filter is
configured. This makes pytest more compliant with
`PEP-0506 <https://www.python.org/dev/peps/pep-0565/recommended-filter-settings-for-test-runners>`_. See
`the docs <https://docs.pytest.org/en/latest/warnings.htmldeprecationwarning-and-pendingdeprecationwarning>`_ for
more info.


- `3251 <https://github.com/pytest-dev/pytest/issues/3251>`_: Warnings are now captured and displayed during test collection.


- `3784 <https://github.com/pytest-dev/pytest/issues/3784>`_: ``PYTEST_DISABLE_PLUGIN_AUTOLOAD`` environment variable disables plugin auto-loading when set.


- `3829 <https://github.com/pytest-dev/pytest/issues/3829>`_: Added the ``count`` option to ``console_output_style`` to enable displaying the progress as a count instead of a percentage.


- `3837 <https://github.com/pytest-dev/pytest/issues/3837>`_: Added support for 'xfailed' and 'xpassed' outcomes to the ``pytester.RunResult.assert_outcomes`` signature.



Bug Fixes
---------

- `3911 <https://github.com/pytest-dev/pytest/issues/3911>`_: Terminal writer now takes into account unicode character width when writing out progress.


- `3913 <https://github.com/pytest-dev/pytest/issues/3913>`_: Pytest now returns with correct exit code (EXIT_USAGEERROR, 4) when called with unknown arguments.


- `3918 <https://github.com/pytest-dev/pytest/issues/3918>`_: Improve performance of assertion rewriting.



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

- `3566 <https://github.com/pytest-dev/pytest/issues/3566>`_: Added a blurb in usage.rst for the usage of -r flag which is used to show an extra test summary info.


- `3907 <https://github.com/pytest-dev/pytest/issues/3907>`_: Corrected type of the exceptions collection passed to ``xfail``: ``raises`` argument accepts a ``tuple`` instead of ``list``.



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

- `3853 <https://github.com/pytest-dev/pytest/issues/3853>`_: Removed ``"run all (no recorded failures)"`` message printed with ``--failed-first`` and ``--last-failed`` when there are no failed tests.

3.7.4

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

Bug Fixes
---------

- `3506 <https://github.com/pytest-dev/pytest/issues/3506>`_: Fix possible infinite recursion when writing ``.pyc`` files.


- `3853 <https://github.com/pytest-dev/pytest/issues/3853>`_: Cache plugin now obeys the ``-q`` flag when ``--last-failed`` and ``--failed-first`` flags are used.


- `3883 <https://github.com/pytest-dev/pytest/issues/3883>`_: Fix bad console output when using ``console_output_style=classic``.


- `3888 <https://github.com/pytest-dev/pytest/issues/3888>`_: Fix macOS specific code using ``capturemanager`` plugin in doctests.



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

- `3902 <https://github.com/pytest-dev/pytest/issues/3902>`_: Fix pytest.org links

3.7.3

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

Bug Fixes
---------

- `3033 <https://github.com/pytest-dev/pytest/issues/3033>`_: Fixtures during teardown can again use ``capsys`` and ``capfd`` to inspect output captured during tests.


- `3773 <https://github.com/pytest-dev/pytest/issues/3773>`_: Fix collection of tests from ``__init__.py`` files if they match the ``python_files`` configuration option.


- `3796 <https://github.com/pytest-dev/pytest/issues/3796>`_: Fix issue where teardown of fixtures of consecutive sub-packages were executed once, at the end of the outer
package.


- `3816 <https://github.com/pytest-dev/pytest/issues/3816>`_: Fix bug where ``--show-capture=no`` option would still show logs printed during fixture teardown.


- `3819 <https://github.com/pytest-dev/pytest/issues/3819>`_: Fix ``stdout/stderr`` not getting captured when real-time cli logging is active.


- `3843 <https://github.com/pytest-dev/pytest/issues/3843>`_: Fix collection error when specifying test functions directly in the command line using ``test.py::test`` syntax together with ``--doctest-modules``.


- `3848 <https://github.com/pytest-dev/pytest/issues/3848>`_: Fix bugs where unicode arguments could not be passed to ``testdir.runpytest`` on Python 2.


- `3854 <https://github.com/pytest-dev/pytest/issues/3854>`_: Fix double collection of tests within packages when the filename starts with a capital letter.



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

- `3824 <https://github.com/pytest-dev/pytest/issues/3824>`_: Added example for multiple glob pattern matches in ``python_files``.


- `3833 <https://github.com/pytest-dev/pytest/issues/3833>`_: Added missing docs for ``pytester.Testdir``.


- `3870 <https://github.com/pytest-dev/pytest/issues/3870>`_: Correct documentation for setuptools integration.



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

- `3826 <https://github.com/pytest-dev/pytest/issues/3826>`_: Replace broken type annotations with type comments.


- `3845 <https://github.com/pytest-dev/pytest/issues/3845>`_: Remove a reference to issue `568 <https://github.com/pytest-dev/pytest/issues/568>`_ from the documentation, which has since been
fixed.

3.7.2

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

Bug Fixes
---------

- `3671 <https://github.com/pytest-dev/pytest/issues/3671>`_: Fix ``filterwarnings`` not being registered as a builtin mark.


- `3768 <https://github.com/pytest-dev/pytest/issues/3768>`_, `3789 <https://github.com/pytest-dev/pytest/issues/3789>`_: Fix test collection from packages mixed with normal directories.


- `3771 <https://github.com/pytest-dev/pytest/issues/3771>`_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``.


- `3774 <https://github.com/pytest-dev/pytest/issues/3774>`_: Fix bug where decorated fixtures would lose functionality (for example ``mock.patch``).


- `3775 <https://github.com/pytest-dev/pytest/issues/3775>`_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``.


- `3788 <https://github.com/pytest-dev/pytest/issues/3788>`_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``.


- `3804 <https://github.com/pytest-dev/pytest/issues/3804>`_: Fix traceback reporting for exceptions with ``__cause__`` cycles.



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

- `3746 <https://github.com/pytest-dev/pytest/issues/3746>`_: Add documentation for ``metafunc.config`` that had been mistakenly hidden.

3.7.1

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

Bug Fixes
---------

- `3473 <https://github.com/pytest-dev/pytest/issues/3473>`_: Raise immediately if ``approx()`` is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.).


- `3712 <https://github.com/pytest-dev/pytest/issues/3712>`_: Correctly represent the dimensions of an numpy array when calling ``repr()`` on ``approx()``.

- `3742 <https://github.com/pytest-dev/pytest/issues/3742>`_: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute '_collectfile'``.

- `3745 <https://github.com/pytest-dev/pytest/issues/3745>`_: Display the absolute path if ``cache_dir`` is not relative to the ``rootdir`` instead of failing.


- `3747 <https://github.com/pytest-dev/pytest/issues/3747>`_: Fix compatibility problem with plugins and the warning code issued by fixture functions when they are called directly.


- `3748 <https://github.com/pytest-dev/pytest/issues/3748>`_: Fix infinite recursion in ``pytest.approx`` with arrays in ``numpy<1.13``.


- `3757 <https://github.com/pytest-dev/pytest/issues/3757>`_: Pin pathlib2 to ``>=2.2.0`` as we require ``__fspath__`` support.


- `3763 <https://github.com/pytest-dev/pytest/issues/3763>`_: Fix ``TypeError`` when the assertion message is ``bytes`` in python 3.

3.7.0

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

Deprecations and Removals
-------------------------

- `2639 <https://github.com/pytest-dev/pytest/issues/2639>`_: ``pytest_namespace`` has been `deprecated <https://docs.pytest.org/en/latest/deprecations.htmlpytest-namespace>`_.


- `3661 <https://github.com/pytest-dev/pytest/issues/3661>`_: Calling a fixture function directly, as opposed to request them in a test function, now issues a ``RemovedInPytest4Warning``. See `the documentation for rationale and examples <https://docs.pytest.org/en/latest/deprecations.htmlcalling-fixtures-directly>`_.



Features
--------

- `2283 <https://github.com/pytest-dev/pytest/issues/2283>`_: New ``package`` fixture scope: fixtures are finalized when the last test of a *package* finishes. This feature is considered **experimental**, so use it sparingly.


- `3576 <https://github.com/pytest-dev/pytest/issues/3576>`_: ``Node.add_marker`` now supports an ``append=True/False`` parameter to determine whether the mark comes last (default) or first.


- `3579 <https://github.com/pytest-dev/pytest/issues/3579>`_: Fixture ``caplog`` now has a ``messages`` property, providing convenient access to the format-interpolated log messages without the extra data provided by the formatter/handler.


- `3610 <https://github.com/pytest-dev/pytest/issues/3610>`_: New ``--trace`` option to enter the debugger at the start of a test.


- `3623 <https://github.com/pytest-dev/pytest/issues/3623>`_: Introduce ``pytester.copy_example`` as helper to do acceptance tests against examples from the project.



Bug Fixes
---------

- `2220 <https://github.com/pytest-dev/pytest/issues/2220>`_: Fix a bug where fixtures overridden by direct parameters (for example parametrization) were being instantiated even if they were not being used by a test.


- `3695 <https://github.com/pytest-dev/pytest/issues/3695>`_: Fix ``ApproxNumpy`` initialisation argument mixup, ``abs`` and ``rel`` tolerances were flipped causing strange comparsion results.
Add tests to check ``abs`` and ``rel`` tolerances for ``np.array`` and test for expecting ``nan`` with ``np.array()``


- `980 <https://github.com/pytest-dev/pytest/issues/980>`_: Fix truncated locals output in verbose mode.



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

- `3295 <https://github.com/pytest-dev/pytest/issues/3295>`_: Correct the usage documentation of ``--last-failed-no-failures`` by adding the missing ``--last-failed`` argument in the presented examples, because they are misleading and lead to think that the missing argument is not needed.



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

- `3519 <https://github.com/pytest-dev/pytest/issues/3519>`_: Now a ``README.md`` file is created in ``.pytest_cache`` to make it clear why the directory exists.

3.6.4

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

Bug Fixes
---------

- Invoke pytest using ``-mpytest`` so ``sys.path`` does not get polluted by packages installed in ``site-packages``. (`742 <https://github.com/pytest-dev/pytest/issues/742>`_)


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

- Use ``smtp_connection`` instead of ``smtp`` in fixtures documentation to avoid possible confusion. (`3592 <https://github.com/pytest-dev/pytest/issues/3592>`_)


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

- Remove obsolete ``__future__`` imports. (`2319 <https://github.com/pytest-dev/pytest/issues/2319>`_)

- Add CITATION to provide information on how to formally cite pytest. (`3402 <https://github.com/pytest-dev/pytest/issues/3402>`_)

- Replace broken type annotations with type comments. (`3635 <https://github.com/pytest-dev/pytest/issues/3635>`_)

- Pin ``pluggy`` to ``<0.8``. (`3727 <https://github.com/pytest-dev/pytest/issues/3727>`_)

3.6.3

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

Bug Fixes
---------

- Fix ``ImportWarning`` triggered by explicit relative imports in
assertion-rewritten package modules. (`3061
<https://github.com/pytest-dev/pytest/issues/3061>`_)

- Fix error in ``pytest.approx`` when dealing with 0-dimension numpy
arrays. (`3593 <https://github.com/pytest-dev/pytest/issues/3593>`_)

- No longer raise ``ValueError`` when using the ``get_marker`` API. (`3605
<https://github.com/pytest-dev/pytest/issues/3605>`_)

- Fix problem where log messages with non-ascii characters would not
appear in the output log file.
(`3630 <https://github.com/pytest-dev/pytest/issues/3630>`_)

- No longer raise ``AttributeError`` when legacy marks can't be stored in
functions. (`3631 <https://github.com/pytest-dev/pytest/issues/3631>`_)


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

- The description above the example for ``pytest.mark.skipif`` now better
matches the code. (`3611
<https://github.com/pytest-dev/pytest/issues/3611>`_)


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

- Internal refactoring: removed unused ``CallSpec2tox ._globalid_args``
attribute and ``metafunc`` parameter from ``CallSpec2.copy()``. (`3598
<https://github.com/pytest-dev/pytest/issues/3598>`_)

- Silence usage of ``reduce`` warning in Python 2 (`3609
<https://github.com/pytest-dev/pytest/issues/3609>`_)

- Fix usage of ``attr.ib`` deprecated ``convert`` parameter. (`3653
<https://github.com/pytest-dev/pytest/issues/3653>`_)

3.6.2

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

Bug Fixes
---------

- Fix regression in ``Node.add_marker`` by extracting the mark object of a
``MarkDecorator``. (`3555
<https://github.com/pytest-dev/pytest/issues/3555>`_)

- Warnings without ``location`` were reported as ``None``. This is corrected to
now report ``<undetermined location>``. (`3563
<https://github.com/pytest-dev/pytest/issues/3563>`_)

- Continue to call finalizers in the stack when a finalizer in a former scope
raises an exception. (`3569
<https://github.com/pytest-dev/pytest/issues/3569>`_)

- Fix encoding error with ``print`` statements in doctests (`3583
<https://github.com/pytest-dev/pytest/issues/3583>`_)


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

- Add documentation for the ``--strict`` flag. (`3549
<https://github.com/pytest-dev/pytest/issues/3549>`_)


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

- Update old quotation style to parens in fixture.rst documentation. (`3525
<https://github.com/pytest-dev/pytest/issues/3525>`_)

- Improve display of hint about ``--fulltrace`` with ``KeyboardInterrupt``.
(`3545 <https://github.com/pytest-dev/pytest/issues/3545>`_)

- pytest's testsuite is no longer runnable through ``python setup.py test`` --
instead invoke ``pytest`` or ``tox`` directly. (`3552
<https://github.com/pytest-dev/pytest/issues/3552>`_)

- Fix typo in documentation (`3567
<https://github.com/pytest-dev/pytest/issues/3567>`_)

3.6.1

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

Bug Fixes
---------

- Fixed a bug where stdout and stderr were logged twice by junitxml when a test
was marked xfail. (`3491
<https://github.com/pytest-dev/pytest/issues/3491>`_)

- Fix ``usefixtures`` mark applyed to unittest tests by correctly instantiating
``FixtureInfo``. (`3498
<https://github.com/pytest-dev/pytest/issues/3498>`_)

- Fix assertion rewriter compatibility with libraries that monkey patch
``file`` objects. (`3503
<https://github.com/pytest-dev/pytest/issues/3503>`_)


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

- Added a section on how to use fixtures as factories to the fixture
documentation. (`3461 <https://github.com/pytest-dev/pytest/issues/3461>`_)


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

- Enable caching for pip/pre-commit in order to reduce build time on
travis/appveyor. (`3502
<https://github.com/pytest-dev/pytest/issues/3502>`_)

- Switch pytest to the src/ layout as we already suggested it for good practice
- now we implement it as well. (`3513
<https://github.com/pytest-dev/pytest/issues/3513>`_)

- Fix if in tests to support 3.7.0b5, where a docstring handling in AST got
reverted. (`3530 <https://github.com/pytest-dev/pytest/issues/3530>`_)

- Remove some python2.5 compatibility code. (`3529
<https://github.com/pytest-dev/pytest/issues/3529>`_)

3.6.0

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

Features
--------

- Revamp the internals of the ``pytest.mark`` implementation with correct per
node handling which fixes a number of long standing bugs caused by the old
design. This introduces new ``Node.iter_markers(name)`` and
``Node.get_closest_mark(name)`` APIs. Users are **strongly encouraged** to
read the `reasons for the revamp in the docs
<https://docs.pytest.org/en/latest/mark.htmlmarker-revamp-and-iteration>`_,
or jump over to details about `updating existing code to use the new APIs
<https://docs.pytest.org/en/latest/mark.htmlupdating-code>`_. (`3317
<https://github.com/pytest-dev/pytest/issues/3317>`_)

- Now when ``pytest.fixture`` is applied more than once to the same function a
``ValueError`` is raised. This buggy behavior would cause surprising problems
and if was working for a test suite it was mostly by accident. (`2334
<https://github.com/pytest-dev/pytest/issues/2334>`_)

- Support for Python 3.7's builtin ``breakpoint()`` method, see `Using the
builtin breakpoint function
<https://docs.pytest.org/en/latest/usage.htmlbreakpoint-builtin>`_ for
details. (`3180 <https://github.com/pytest-dev/pytest/issues/3180>`_)

- ``monkeypatch`` now supports a ``context()`` function which acts as a context
manager which undoes all patching done within the ``with`` block. (`3290
<https://github.com/pytest-dev/pytest/issues/3290>`_)

- The ``--pdb`` option now causes KeyboardInterrupt to enter the debugger,
instead of stopping the test session. On python 2.7, hitting CTRL+C again
exits the debugger. On python 3.2 and higher, use CTRL+D. (`3299
<https://github.com/pytest-dev/pytest/issues/3299>`_)

- pytest not longer changes the log level of the root logger when the
``log-level`` parameter has greater numeric value than that of the level of
the root logger, which makes it play better with custom logging configuration
in user code. (`3307 <https://github.com/pytest-dev/pytest/issues/3307>`_)


Bug Fixes
---------

- A rare race-condition which might result in corrupted ``.pyc`` files on
Windows has been hopefully solved. (`3008
<https://github.com/pytest-dev/pytest/issues/3008>`_)

- Also use iter_marker for discovering the marks applying for marker
expressions from the cli to avoid the bad data from the legacy mark storage.
(`3441 <https://github.com/pytest-dev/pytest/issues/3441>`_)

- When showing diffs of failed assertions where the contents contain only
whitespace, escape them using ``repr()`` first to make it easy to spot the
differences. (`3443 <https://github.com/pytest-dev/pytest/issues/3443>`_)


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

- Change documentation copyright year to a range which auto-updates itself each
time it is published. (`3303
<https://github.com/pytest-dev/pytest/issues/3303>`_)


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

- ``pytest`` now depends on the `python-atomicwrites
<https://github.com/untitaker/python-atomicwrites>`_ library. (`3008
<https://github.com/pytest-dev/pytest/issues/3008>`_)

- Update all pypi.python.org URLs to pypi.org. (`3431
<https://github.com/pytest-dev/pytest/issues/3431>`_)

- Detect `pytest_` prefixed hooks using the internal plugin manager since
``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``.
(`3487 <https://github.com/pytest-dev/pytest/issues/3487>`_)

- Import ``Mapping`` and ``Sequence`` from ``_pytest.compat`` instead of
directly from ``collections`` in ``python_api.py::approx``. Add ``Mapping``
to ``_pytest.compat``, import it from ``collections`` on python 2, but from
``collections.abc`` on Python 3 to avoid a ``DeprecationWarning`` on Python
3.7 or newer. (`3497 <https://github.com/pytest-dev/pytest/issues/3497>`_)

3.5.1

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


Bug Fixes
---------

- Reset ``sys.last_type``, ``sys.last_value`` and ``sys.last_traceback`` before
each test executes. Those attributes are added by pytest during the test run
to aid debugging, but were never reset so they would create a leaking
reference to the last failing test's frame which in turn could never be
reclaimed by the garbage collector. (`2798
<https://github.com/pytest-dev/pytest/issues/2798>`_)

- ``pytest.raises`` now raises ``TypeError`` when receiving an unknown keyword
argument. (`3348 <https://github.com/pytest-dev/pytest/issues/3348>`_)

- ``pytest.raises`` now works with exception classes that look like iterables.
(`3372 <https://github.com/pytest-dev/pytest/issues/3372>`_)


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

- Fix typo in ``caplog`` fixture documentation, which incorrectly identified
certain attributes as methods. (`3406
<https://github.com/pytest-dev/pytest/issues/3406>`_)


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

- Added a more indicative error message when parametrizing a function whose
argument takes a default value. (`3221
<https://github.com/pytest-dev/pytest/issues/3221>`_)

- Remove internal ``_pytest.terminal.flatten`` function in favor of
``more_itertools.collapse``. (`3330
<https://github.com/pytest-dev/pytest/issues/3330>`_)

- Import some modules from ``collections.abc`` instead of ``collections`` as
the former modules trigger ``DeprecationWarning`` in Python 3.7. (`3339
<https://github.com/pytest-dev/pytest/issues/3339>`_)

- record_property is no longer experimental, removing the warnings was
forgotten. (`3360 <https://github.com/pytest-dev/pytest/issues/3360>`_)

- Mention in documentation and CLI help that fixtures with leading ``_`` are
printed by ``pytest --fixtures`` only if the ``-v`` option is added. (`3398
<https://github.com/pytest-dev/pytest/issues/3398>`_)

3.5.0

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

Deprecations and Removals
-------------------------

- ``record_xml_property`` fixture is now deprecated in favor of the more
generic ``record_property``. (`2770
<https://github.com/pytest-dev/pytest/issues/2770>`_)

- Defining ``pytest_plugins`` is now deprecated in non-top-level conftest.py
files, because they "leak" to the entire directory tree. `See the docs <https://docs.pytest.org/en/latest/deprecations.htmlpytest-plugins-in-non-top-level-conftest-files>`_ for the rationale behind this decision (`3084
<https://github.com/pytest-dev/pytest/issues/3084>`_)


Features
--------

- New ``--show-capture`` command-line option that allows to specify how to
display captured output when tests fail: ``no``, ``stdout``, ``stderr``,
``log`` or ``all`` (the default). (`1478
<https://github.com/pytest-dev/pytest/issues/1478>`_)

- New ``--rootdir`` command-line option to override the rules for discovering
the root directory. See `customize
<https://docs.pytest.org/en/latest/customize.html>`_ in the documentation for
details. (`1642 <https://github.com/pytest-dev/pytest/issues/1642>`_)

- Fixtures are now instantiated based on their scopes, with higher-scoped
fixtures (such as ``session``) being instantiated first than lower-scoped
fixtures (such as ``function``). The relative order of fixtures of the same
scope is kept unchanged, based in their declaration order and their
dependencies. (`2405 <https://github.com/pytest-dev/pytest/issues/2405>`_)

- ``record_xml_property`` renamed to ``record_property`` and is now compatible
with xdist, markers and any reporter. ``record_xml_property`` name is now
deprecated. (`2770 <https://github.com/pytest-dev/pytest/issues/2770>`_)

- New ``--nf``, ``--new-first`` options: run new tests first followed by the
rest of the tests, in both cases tests are also sorted by the file modified
time, with more recent files coming first. (`3034
<https://github.com/pytest-dev/pytest/issues/3034>`_)

- New ``--last-failed-no-failures`` command-line option that allows to specify
the behavior of the cache plugin's --last-failed`` feature when no tests
failed in the last run (or no cache was found): ``none`` or ``all`` (the
default). (`3139 <https://github.com/pytest-dev/pytest/issues/3139>`_)

- New ``--doctest-continue-on-failure`` command-line option to enable doctests
to show multiple failures for each snippet, instead of stopping at the first
failure. (`3149 <https://github.com/pytest-dev/pytest/issues/3149>`_)

- Captured log messages are added to the ``<system-out>`` tag in the generated
junit xml file if the ``junit_logging`` ini option is set to ``system-out``.
If the value of this ini option is ``system-err``, the logs are written to
``<system-err>``. The default value for ``junit_logging`` is ``no``, meaning
captured logs are not written to the output file. (`3156
<https://github.com/pytest-dev/pytest/issues/3156>`_)

- Allow the logging plugin to handle ``pytest_runtest_logstart`` and
``pytest_runtest_logfinish`` hooks when live logs are enabled. (`3189
<https://github.com/pytest-dev/pytest/issues/3189>`_)

- Passing ``--log-cli-level`` in the command-line now automatically activates
live logging. (`3190 <https://github.com/pytest-dev/pytest/issues/3190>`_)

- Add command line option ``--deselect`` to allow deselection of individual
tests at collection time. (`3198
<https://github.com/pytest-dev/pytest/issues/3198>`_)

- Captured logs are printed before entering pdb. (`3204
<https://github.com/pytest-dev/pytest/issues/3204>`_)

- Deselected item count is now shown before tests are run, e.g. ``collected X
items / Y deselected``. (`3213
<https://github.com/pytest-dev/pytest/issues/3213>`_)

- The builtin module ``platform`` is now available for use in expressions in
``pytest.mark``. (`3236
<https://github.com/pytest-dev/pytest/issues/3236>`_)

- The *short test summary info* section now is displayed after tracebacks and
warnings in the terminal. (`3255
<https://github.com/pytest-dev/pytest/issues/3255>`_)

- New ``--verbosity`` flag to set verbosity level explicitly. (`3296
<https://github.com/pytest-dev/pytest/issues/3296>`_)

- ``pytest.approx`` now accepts comparing a numpy array with a scalar. (`3312
<https://github.com/pytest-dev/pytest/issues/3312>`_)


Bug Fixes
---------

- Suppress ``IOError`` when closing the temporary file used for capturing
streams in Python 2.7. (`2370
<https://github.com/pytest-dev/pytest/issues/2370>`_)

- Fixed ``clear()`` method on ``caplog`` fixture which cleared ``records``, but
not the ``text`` property. (`3297
<https://github.com/pytest-dev/pytest/issues/3297>`_)

- During test collection, when stdin is not allowed to be read, the
``DontReadFromStdin`` object still allow itself to be iterable and resolved
to an iterator without crashing. (`3314
<https://github.com/pytest-dev/pytest/issues/3314>`_)


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

- Added a `reference <https://docs.pytest.org/en/latest/reference.html>`_ page
to the docs. (`1713 <https://github.com/pytest-dev/pytest/issues/1713>`_)


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

- Change minimum requirement of ``attrs`` to ``17.4.0``. (`3228
<https://github.com/pytest-dev/pytest/issues/3228>`_)

- Renamed example directories so all tests pass when ran from the base
directory. (`3245 <https://github.com/pytest-dev/pytest/issues/3245>`_)

- Internal ``mark.py`` module has been turned into a package. (`3250
<https://github.com/pytest-dev/pytest/issues/3250>`_)

- ``pytest`` now depends on the `more-itertools
<https://github.com/erikrose/more-itertools>`_ package. (`3265
<https://github.com/pytest-dev/pytest/issues/3265>`_)

- Added warning when ``[pytest]`` section is used in a ``.cfg`` file passed
with ``-c`` (`3268 <https://github.com/pytest-dev/pytest/issues/3268>`_)

- ``nodeids`` can now be passed explicitly to ``FSCollector`` and ``Node``
constructors. (`3291 <https://github.com/pytest-dev/pytest/issues/3291>`_)

- Internal refactoring of ``FormattedExcinfo`` to use ``attrs`` facilities and
remove old support code for legacy Python versions. (`3292
<https://github.com/pytest-dev/pytest/issues/3292>`_)

- Refactoring to unify how verbosity is handled internally. (`3296
<https://github.com/pytest-dev/pytest/issues/3296>`_)

- Internal refactoring to better integrate with argparse. (`3304
<https://github.com/pytest-dev/pytest/issues/3304>`_)

- Fix a python example when calling a fixture in doc/en/usage.rst (`3308
<https://github.com/pytest-dev/pytest/issues/3308>`_)

3.4.2

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

Bug Fixes
---------

- Removed progress information when capture option is ``no``. (`3203
<https://github.com/pytest-dev/pytest/issues/320
@mikicz

This comment has been minimized.

Member

mikicz commented Oct 12, 2018

A note: these updates should be propagated to setup.py as well. I'd be happy to release a new version if you make a PR to my repo. Or I could transfer my repo to pyvec and give you rights to publish on PyPI, I can set it up over the weekend...

@encukou

This comment has been minimized.

Member

encukou commented Nov 15, 2018

I think requirements in setup.py should not be pinned, because Arca can be used in other projects. If everything pinned exact dependencies, they'd all need to match at all times. It would be hard to use Arca with other libraries.

@encukou

This comment has been minimized.

Member

encukou commented Nov 15, 2018

And yes, transferring Arca to Pyvec would make things look more official :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment