[Python-modules-commits] [pytest] 01/08: Import pytest_3.1.2.orig.tar.gz

Sebastian Ramacher sramacher at moszumanska.debian.org
Mon Jun 12 20:46:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

sramacher pushed a commit to branch master
in repository pytest.

commit 8e6355fefd41619a68ed7c4183e001292a4427c3
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Mon Jun 12 22:31:24 2017 +0200

    Import pytest_3.1.2.orig.tar.gz
---
 .gitattributes                                     |   1 +
 .gitignore                                         |  39 ++++
 AUTHORS                                            |  16 ++
 CHANGELOG.rst                                      | 245 ++++++++++++++++++++-
 CONTRIBUTING.rst                                   |  10 +-
 HOWTORELEASE.rst                                   |  92 +++-----
 MANIFEST.in                                        |   3 +
 PKG-INFO                                           |  17 +-
 README.rst                                         |  15 +-
 _pytest/__init__.py                                |  10 +-
 _pytest/_argcomplete.py                            |   2 +-
 _pytest/_code/__init__.py                          |   1 +
 _pytest/_code/_py2traceback.py                     |   1 +
 _pytest/_code/code.py                              |  51 ++++-
 _pytest/_code/source.py                            |   2 +-
 _pytest/_pluggy.py                                 |   2 +-
 _pytest/_version.py                                |   4 +
 _pytest/assertion/__init__.py                      |  25 +--
 _pytest/assertion/rewrite.py                       |   7 +-
 _pytest/assertion/truncate.py                      | 102 +++++++++
 _pytest/assertion/util.py                          |   7 +-
 _pytest/cacheprovider.py                           |  12 +-
 _pytest/capture.py                                 |  61 ++++-
 _pytest/compat.py                                  |  76 ++++++-
 _pytest/config.py                                  | 110 +++++----
 _pytest/debugging.py                               |  39 ++--
 _pytest/deprecated.py                              |   2 +-
 _pytest/doctest.py                                 |  36 ++-
 _pytest/fixtures.py                                |  79 +++----
 _pytest/freeze_support.py                          |   5 +-
 _pytest/helpconfig.py                              |  37 +++-
 _pytest/hookspec.py                                |   9 +-
 _pytest/junitxml.py                                |  54 ++++-
 _pytest/main.py                                    |  71 +++---
 _pytest/mark.py                                    | 175 ++++++++++-----
 _pytest/monkeypatch.py                             |   9 +-
 _pytest/nose.py                                    |  19 +-
 _pytest/pastebin.py                                |   2 +
 _pytest/pytester.py                                |  49 +++--
 _pytest/python.py                                  | 185 +++++++++-------
 _pytest/recwarn.py                                 |  72 ++----
 _pytest/resultlog.py                               |   5 +-
 _pytest/runner.py                                  |  34 +--
 _pytest/setuponly.py                               |   2 +
 _pytest/setupplan.py                               |   2 +
 _pytest/skipping.py                                |  68 +++---
 _pytest/terminal.py                                |  72 ++++--
 _pytest/tmpdir.py                                  |   2 +
 _pytest/unittest.py                                |  48 ++--
 _pytest/vendored_packages/pluggy.py                |   2 +-
 _pytest/warnings.py                                |  88 ++++++++
 changelog/_template.rst                            |  39 ++++
 doc/en/Makefile                                    |   9 +-
 doc/en/announce/index.rst                          |   3 +
 doc/en/announce/release-3.1.0.rst                  |  61 +++++
 doc/en/announce/release-3.1.1.rst                  |  23 ++
 doc/en/announce/release-3.1.2.rst                  |  23 ++
 doc/en/assert.rst                                  |  25 ++-
 doc/en/cache.rst                                   |   6 +-
 doc/en/capture.rst                                 |   2 +-
 doc/en/contents.rst                                |   3 +-
 doc/en/customize.rst                               |  28 ++-
 doc/en/doctest.rst                                 |  15 +-
 doc/en/example/assertion/failure_demo.py           |  12 +-
 .../example/assertion/test_setup_flow_example.py   |   2 +-
 doc/en/example/attic.rst                           |   4 +-
 doc/en/example/costlysetup/conftest.py             |   2 +-
 doc/en/example/markers.rst                         |  38 ++--
 doc/en/example/multipython.py                      |   2 +-
 doc/en/example/nonpython.rst                       |   6 +-
 doc/en/example/parametrize.rst                     |  36 ++-
 doc/en/example/pythoncollection.py                 |   2 +-
 doc/en/example/pythoncollection.rst                |   8 +-
 doc/en/example/reportingdemo.rst                   |  39 ++--
 doc/en/example/simple.rst                          |  27 +--
 doc/en/example/special.rst                         |   4 +-
 doc/en/existingtestsuite.rst                       |  34 +++
 doc/en/fixture.rst                                 |  24 +-
 doc/en/funcarg_compare.rst                         |   2 +-
 doc/en/genapi.py                                   |   2 +-
 doc/en/getting-started.rst                         |   7 +-
 doc/en/goodpractices.rst                           | 133 +++++++----
 doc/en/index.rst                                   |   2 +-
 doc/en/nose.rst                                    |  13 +-
 doc/en/parametrize.rst                             |  42 +++-
 doc/en/recwarn.rst                                 | 140 +-----------
 doc/en/requirements.txt                            |   3 +
 doc/en/skipping.rst                                | 245 ++++++++++-----------
 doc/en/talks.rst                                   |  15 +-
 doc/en/test/attic.rst                              |   2 +-
 doc/en/tmpdir.rst                                  |   2 +-
 doc/en/unittest.rst                                |   7 +-
 doc/en/usage.rst                                   |  27 ++-
 doc/en/{recwarn.rst => warnings.rst}               | 119 +++++++++-
 doc/en/writing_plugins.rst                         |   7 +-
 pyproject.toml                                     |  35 +++
 pytest.egg-info/PKG-INFO                           |  17 +-
 pytest.egg-info/SOURCES.txt                        |  21 ++
 pytest.egg-info/requires.txt                       |   2 +-
 pytest.py                                          |  72 +++++-
 scripts/check-manifest.py                          |   5 +-
 scripts/check-rst.py                               |  11 +
 setup.cfg                                          |   5 +-
 setup.py                                           |  44 ++--
 tasks/__init__.py                                  |   9 +
 tasks/generate.py                                  | 162 ++++++++++++++
 tasks/release.minor.rst                            |  27 +++
 tasks/release.patch.rst                            |  17 ++
 tasks/requirements.txt                             |   4 +
 testing/acceptance_test.py                         |  72 +++++-
 testing/code/test_code.py                          |   7 +-
 testing/code/test_excinfo.py                       |  44 +++-
 testing/code/test_source.py                        |  23 +-
 testing/deprecated_test.py                         |   5 +-
 testing/python/approx.py                           |   2 +-
 testing/python/collect.py                          | 112 +++++++---
 testing/python/fixture.py                          | 139 ++++++------
 testing/python/integration.py                      |  18 +-
 testing/python/metafunc.py                         | 207 ++++++++++++-----
 testing/python/raises.py                           |  27 ++-
 testing/test_argcomplete.py                        |   4 +-
 testing/test_assertion.py                          | 173 +++++++++++----
 testing/test_assertrewrite.py                      |  43 +++-
 testing/test_cache.py                              |  33 ++-
 testing/test_capture.py                            |  48 ++--
 testing/test_collection.py                         |  53 +++--
 testing/test_compat.py                             |  34 ++-
 testing/test_config.py                             |  42 ++--
 testing/test_conftest.py                           |  21 +-
 testing/test_doctest.py                            |  68 +++++-
 testing/test_entry_points.py                       |   1 +
 testing/test_helpconfig.py                         |   3 +-
 testing/test_junitxml.py                           |  93 +++++++-
 testing/test_mark.py                               |  82 +++++--
 testing/test_modimport.py                          |  25 +++
 testing/test_monkeypatch.py                        |   9 +-
 testing/test_nose.py                               |  11 +-
 testing/test_parseopt.py                           |  21 +-
 testing/test_pastebin.py                           |   7 +-
 testing/test_pdb.py                                |  68 ++++--
 testing/test_pluginmanager.py                      |  25 ++-
 testing/test_pytester.py                           |   7 +-
 testing/test_recwarn.py                            |  65 ++++--
 testing/test_resultlog.py                          |   3 +-
 testing/test_runner.py                             |  20 +-
 testing/test_runner_xunit.py                       |  24 +-
 testing/test_session.py                            |  13 +-
 testing/test_skipping.py                           |  21 +-
 testing/test_terminal.py                           |  43 ++--
 testing/test_tmpdir.py                             |   5 +-
 testing/test_unittest.py                           |   5 +-
 testing/test_warnings.py                           | 190 ++++++++++++++++
 tox.ini                                            |  20 +-
 153 files changed, 4079 insertions(+), 1610 deletions(-)

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..242d3da
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+CHANGELOG    merge=union
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3b7ec9f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,39 @@
+# Automatically generated by `hgimportsvn`
+.svn
+.hgsvn
+
+# Ignore local virtualenvs
+lib/
+bin/
+include/
+.Python/
+
+# These lines are suggested according to the svn:ignore property
+# Feel free to enable them by uncommenting them
+*.pyc
+*.pyo
+*.swp
+*.class
+*.orig
+*~
+.hypothesis/
+
+# autogenerated
+_pytest/_version.py
+# setuptools
+.eggs/
+
+doc/*/_build
+build/
+dist/
+*.egg-info
+issue/
+env/
+.env/
+3rdparty/
+.tox
+.cache
+.coverage
+.ropeproject
+.idea
+.hypothesis
diff --git a/AUTHORS b/AUTHORS
index ce19f1f..ca28287 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,12 +6,14 @@ Contributors include::
 Abdeali JK
 Abhijeet Kasurde
 Ahn Ki-Wook
+Alexander Johnson
 Alexei Kozlenok
 Anatoly Bubenkoff
 Andreas Zeidler
 Andrzej Ostrowski
 Andy Freeland
 Anthon van der Neut
+Anthony Sottile
 Antony Lee
 Armin Rigo
 Aron Curzon
@@ -46,6 +48,7 @@ David Vierra
 Denis Kirisov
 Diego Russo
 Dmitry Dygalo
+Dmitry Pribysh
 Duncan Betts
 Edison Gustavo Muenz
 Edoardo Batini
@@ -67,6 +70,7 @@ Grig Gheorghiu
 Grigorii Eremeev (budulianin)
 Guido Wesdorp
 Harald Armin Massa
+Hui Wang (coldnight)
 Ian Bicking
 Jaap Broekhuizen
 Jan Balster
@@ -77,6 +81,7 @@ Javier Romero
 Jeff Widman
 John Towler
 Jon Sonesen
+Jonas Obrist
 Jordan Guymon
 Joshua Bronson
 Jurko Gospodnetić
@@ -84,6 +89,7 @@ Justyna Janczyszyn
 Kale Kundert
 Katarzyna Jachim
 Kevin Cox
+Kodi B. Arfer
 Lee Kamentsky
 Lev Maximov
 Loic Esteve
@@ -91,6 +97,8 @@ Lukas Bednar
 Luke Murphy
 Maciek Fijalkowski
 Maho
+Mandeep Bhutani
+Manuel Krebber
 Marc Schlaich
 Marcin Bachry
 Mark Abramowitz
@@ -100,6 +108,7 @@ Martin K. Scherer
 Martin Prusse
 Mathieu Clabaut
 Matt Bachmann
+Matt Duck
 Matt Williams
 Matthias Hafner
 mbyt
@@ -107,6 +116,7 @@ Michael Aquilina
 Michael Birtwell
 Michael Droettboom
 Michael Seifert
+Michal Wajszczuk
 Mike Lundy
 Ned Batchelder
 Neven Mundar
@@ -116,6 +126,7 @@ Oliver Bestwalter
 Omar Kohl
 Omer Hadari
 Patrick Hayes
+Paweł Adamczak
 Pieter Mulder
 Piotr Banaszkiewicz
 Punyashloka Biswal
@@ -124,6 +135,7 @@ Ralf Schmitt
 Ran Benita
 Raphael Pierzina
 Raquel Alegre
+Ravi Chandra
 Roberto Polli
 Romain Dorgueil
 Roman Bolshakov
@@ -132,7 +144,9 @@ Ross Lawley
 Russel Winder
 Ryan Wooden
 Samuele Pedroni
+Segev Finer
 Simon Gomizelj
+Skylar Downes
 Stefan Farmbauer
 Stefan Zimmermann
 Stefano Taschini
@@ -147,5 +161,7 @@ Tyler Goodlet
 Vasily Kuznetsov
 Victor Uriarte
 Vidar T. Fauske
+Vitaly Lashmanov
+Vlad Dragos
 Wouter van Ackooy
 Xuecong Liao
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 19b62a1..34fee33 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,10 +1,246 @@
+.. 
+    You should *NOT* be adding new change log entries to this file, this
+    file is managed by towncrier. You *may* edit previous change logs to
+    fix problems like typo corrections or such.
+    To add a new change log entry, please see
+    https://pip.pypa.io/en/latest/development/#adding-a-news-entry
+    we named the news folder changelog
+
+.. towncrier release notes start
+
+Pytest 3.1.2 (2017-06-08)
+=========================
+
+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)
+
+
+Pytest 3.1.1 (2017-05-30)
+=========================
+
+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 (2017-05-22)
+==================
+
+
+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 <https://docs.pytest.org/en/latest/warnings.html>`_ for more
+    information.
+
+  Thanks `@nicoddemus`_ for the PR.
+
+* Added ``junit_suite_name`` ini option to specify root ``<testsuite>`` 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.
+
+
+.. _ at davidszotten: https://github.com/davidszotten
+.. _ at fabioz: https://github.com/fabioz
+.. _ at fogo: https://github.com/fogo
+.. _ at fushi: https://github.com/fushi
+.. _ at Kodiologist: https://github.com/Kodiologist
+.. _ at Kriechi: https://github.com/Kriechi
+.. _ at mandeep: https://github.com/mandeep
+.. _ at mattduck: https://github.com/mattduck
+.. _ at metasyn: https://github.com/metasyn
+.. _ at MichalTHEDUDE: https://github.com/MichalTHEDUDE
+.. _ at ojii: https://github.com/ojii
+.. _ at reutsharabani: https://github.com/reutsharabani
+.. _ at robin0371: https://github.com/robin0371
+.. _ at skylarjhdownes: https://github.com/skylarjhdownes
+.. _ at unsignedint: https://github.com/unsignedint
+.. _ at wheerd: https://github.com/wheerd
+
+
+.. _#1407: https://github.com/pytest-dev/pytest/issues/1407
+.. _#1512: https://github.com/pytest-dev/pytest/issues/1512
+.. _#1821: https://github.com/pytest-dev/pytest/issues/1821
+.. _#1874: https://github.com/pytest-dev/pytest/pull/1874
+.. _#1937: https://github.com/pytest-dev/pytest/issues/1937
+.. _#1952: https://github.com/pytest-dev/pytest/pull/1952
+.. _#2007: https://github.com/pytest-dev/pytest/issues/2007
+.. _#2013: https://github.com/pytest-dev/pytest/issues/2013
+.. _#2101: https://github.com/pytest-dev/pytest/pull/2101
+.. _#2166: https://github.com/pytest-dev/pytest/pull/2166
+.. _#2208: https://github.com/pytest-dev/pytest/issues/2208
+.. _#2228: https://github.com/pytest-dev/pytest/issues/2228
+.. _#2276: https://github.com/pytest-dev/pytest/issues/2276
+.. _#2308: https://github.com/pytest-dev/pytest/issues/2308
+.. _#2336: https://github.com/pytest-dev/pytest/issues/2336
+.. _#2369: https://github.com/pytest-dev/pytest/issues/2369
+.. _#2383: https://github.com/pytest-dev/pytest/issues/2383
+.. _#2391: https://github.com/pytest-dev/pytest/issues/2391
+.. _#533: https://github.com/pytest-dev/pytest/issues/533
+
+
+
 3.0.7 (2017-03-14)
 ==================
 
 
 * Fix issue in assertion rewriting breaking due to modules silently discarding
   other modules when importing fails
-  Notably, importing the `anydbm` module is fixed. (`#2248`_).
+  Notably, importing the ``anydbm`` module is fixed. (`#2248`_).
   Thanks `@pfhayes`_ for the PR.
 
 * junitxml: Fix problematic case where system-out tag occured twice per testcase
@@ -15,13 +251,13 @@
 
 * Ignore exceptions raised from descriptors (e.g. properties) during Python test collection (`#2234`_).
   Thanks to `@bluetech`_.
-  
+
 * ``--override-ini`` now correctly overrides some fundamental options like ``python_files`` (`#2238`_).
   Thanks `@sirex`_ for the report and `@nicoddemus`_ for the PR.
 
 * Replace ``raise StopIteration`` usages in the code by simple ``returns`` to finish generators, in accordance to `PEP-479`_ (`#2160`_).
   Thanks `@tgoodlet`_ for the report and `@nicoddemus`_ for the PR.
-  
+
 * Fix internal errors when an unprintable ``AssertionError`` is raised inside a test.
   Thanks `@omerhadari`_ for the PR.
 
@@ -149,6 +385,7 @@
 * Cope gracefully with a .pyc file with no matching .py file (`#2038`_). Thanks
   `@nedbat`_.
 
+.. _ at syre: https://github.com/syre
 .. _ at adler-j: https://github.com/adler-j
 .. _ at d-b-w: https://bitbucket.org/d-b-w/
 .. _ at DuncanBetts: https://github.com/DuncanBetts
@@ -256,6 +493,7 @@
 .. _ at raquel-ucl: https://github.com/raquel-ucl
 .. _ at axil: https://github.com/axil
 .. _ at tgoodlet: https://github.com/tgoodlet
+.. _ at vlad-dragos: https://github.com/vlad-dragos
 
 .. _#1853: https://github.com/pytest-dev/pytest/issues/1853
 .. _#1905: https://github.com/pytest-dev/pytest/issues/1905
@@ -265,6 +503,7 @@
 
 
 
+
 3.0.2 (2016-09-01)
 ==================
 
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 71dc04d..edf71da 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -206,12 +206,12 @@ but here is a simple overview:
 
 #. Run all the tests
 
-   You need to have Python 2.7 and 3.5 available in your system.  Now
+   You need to have Python 2.7 and 3.6 available in your system.  Now
    running tests is as simple as issuing this command::
 
-    $ tox -e linting,py27,py35
+    $ tox -e linting,py27,py36
 
-   This command will run tests via the "tox" tool against Python 2.7 and 3.5
+   This command will run tests via the "tox" tool against Python 2.7 and 3.6
    and also perform "lint" coding-style checks.
 
 #. You can now edit your local working copy.
@@ -223,9 +223,9 @@ but here is a simple overview:
 
     $ tox -e py27 -- --pdb
 
-   Or to only run tests in a particular test module on Python 3.5::
+   Or to only run tests in a particular test module on Python 3.6::
 
-    $ tox -e py35 -- testing/test_config.py
+    $ tox -e py36 -- testing/test_config.py
 
 #. Commit and push once your tests pass and you are happy with your change(s)::
 
diff --git a/HOWTORELEASE.rst b/HOWTORELEASE.rst
index 372ecf7..f094e36 100644
--- a/HOWTORELEASE.rst
+++ b/HOWTORELEASE.rst
@@ -1,85 +1,61 @@
 How to release pytest
 --------------------------------------------
 
-Note: this assumes you have already registered on pypi.
+.. important::
 
-1. Bump version numbers in ``_pytest/__init__.py`` (``setup.py`` reads it).
+    pytest releases must be prepared on **Linux** because the docs and examples expect
+    to be executed in that platform.
 
-2. Check and finalize ``CHANGELOG.rst``.
+#. Install development dependencies in a virtual environment with::
 
-3. Write ``doc/en/announce/release-VERSION.txt`` and include
-   it in ``doc/en/announce/index.txt``. Run this command to list names of authors involved::
+    pip3 install -r tasks/requirements.txt
 
-        git log $(git describe --abbrev=0 --tags)..HEAD --format='%aN' | sort -u
+#. Create a branch ``release-X.Y.Z`` with the version for the release.
 
-4. Regenerate the docs examples using tox::
+   * **patch releases**: from the latest ``master``;
 
-      tox -e regen
+   * **minor releases**: from the latest ``features``; then merge with the latest ``master``;
 
-5. At this point, open a PR named ``release-X`` so others can help find regressions or provide suggestions.
+   Ensure your are in a clean work tree.
 
-6. Use devpi for uploading a release tarball to a staging area::
+#. Generate docs, changelog, announcements and upload a package to
+   your ``devpi`` staging server::
 
-     devpi use https://devpi.net/USER/dev
-     devpi upload --formats sdist,bdist_wheel
+     invoke generate.pre_release <VERSION> <DEVPI USER> --password <DEVPI PASSWORD>
 
-7. Run from multiple machines::
+   If ``--password`` is not given, it is assumed the user is already logged in ``devpi``.
+   If you don't have an account, please ask for one.
 
-     devpi use https://devpi.net/USER/dev
-     devpi test pytest==VERSION
+#. Open a PR for this branch targeting ``master``.
 
-   Alternatively, you can use `devpi-cloud-tester <https://github.com/nicoddemus/devpi-cloud-tester>`_ to test
-   the package on AppVeyor and Travis (follow instructions on the ``README``).
+#. Test the package
 
-8. Check that tests pass for relevant combinations with::
+   * **Manual method**
 
-       devpi list pytest
-
-   or look at failures with "devpi list -f pytest".
-
-9. Feeling confident? Publish to pypi::
-
-      devpi push pytest==VERSION pypi:NAME
-
-   where NAME is the name of pypi.python.org as configured in your ``~/.pypirc``
-   file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_.
+     Run from multiple machines::
 
-10. Tag the release::
+       devpi use https://devpi.net/USER/dev
+       devpi test pytest==VERSION
 
-      git tag VERSION <hash>
-      git push origin VERSION
+     Check that tests pass for relevant combinations with::
 
-    Make sure ``<hash>`` is **exactly** the git hash at the time the package was created.
-
-11. Send release announcement to mailing lists:
-
-    - pytest-dev at python.org
-    - python-announce-list at python.org
-    - testing-in-python at lists.idyll.org (only for minor/major releases)
-
-    And announce the release on Twitter, making sure to add the hashtag ``#pytest``.
-
-12. **After the release**
+       devpi list pytest
 
-  a. **patch release (2.8.3)**:
+   * **CI servers**
 
-        1. Checkout ``master``.
-        2. Update version number in ``_pytest/__init__.py`` to ``"2.8.4.dev0"``.
-        3. Create a new section in ``CHANGELOG.rst`` titled ``2.8.4.dev0`` and add a few bullet points as placeholders for new entries.
-        4. Commit and push.
+     Configure a repository as per-instructions on
+     devpi-cloud-test_ to test the package on Travis_ and AppVeyor_.
+     All test environments should pass.
 
-  b. **minor release (2.9.0)**:
+#. Publish to PyPI::
 
-        1. Merge ``features`` into ``master``.
-        2. Checkout ``master``.
-        3. Follow the same steps for a **patch release** above, using the next patch release: ``2.9.1.dev0``.
-        4. Commit ``master``.
-        5. Checkout ``features`` and merge with ``master`` (should be a fast-forward at this point).
-        6. Update version number in ``_pytest/__init__.py`` to the next minor release: ``"2.10.0.dev0"``.
-        7. Create a new section in ``CHANGELOG.rst`` titled ``2.10.0.dev0``, above ``2.9.1.dev0``, and add a few bullet points as placeholders for new entries.
-        8. Commit ``features``.
-        9. Push ``master`` and ``features``.
+      invoke generate.publish_release <VERSION> <DEVPI USER> <PYPI_NAME>
 
-  c. **major release (3.0.0)**: same steps as that of a **minor release**
+   where PYPI_NAME is the name of pypi.python.org as configured in your ``~/.pypirc``
+   file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_.
 
+#. After a minor/major release, merge ``features`` into ``master`` and push (or open a PR).
 
+.. _devpi-cloud-test: https://github.com/obestwalter/devpi-cloud-test
+.. _AppVeyor: https://www.appveyor.com/
+.. _Travis: https://travis-ci.org
diff --git a/MANIFEST.in b/MANIFEST.in
index c57cbd9..abf57fe 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,6 +1,7 @@
 include CHANGELOG.rst
 include LICENSE
 include AUTHORS
+include pyproject.toml
 
 include README.rst
 include CONTRIBUTING.rst
@@ -9,6 +10,7 @@ include HOWTORELEASE.rst
 include tox.ini
 include setup.py
 
+recursive-include changelog *
 recursive-include scripts *.py
 recursive-include scripts *.bat
 
@@ -20,6 +22,7 @@ recursive-include extra *.py
 graft testing
 graft doc
 prune doc/en/_build
+graft tasks
 
 exclude _pytest/impl
 
diff --git a/PKG-INFO b/PKG-INFO
index 5ca32a9..e033632 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pytest
-Version: 3.0.7
+Version: 3.1.2
 Summary: pytest: simple powerful testing with Python
 Home-page: http://pytest.org
 Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
@@ -14,13 +14,20 @@ Description: .. image:: http://docs.pytest.org/en/latest/_static/pytest1.png
         ------
         
         .. image:: https://img.shields.io/pypi/v/pytest.svg
-           :target: https://pypi.python.org/pypi/pytest
+            :target: https://pypi.python.org/pypi/pytest
+        
+        .. image:: https://anaconda.org/conda-forge/pytest/badges/version.svg
+            :target: https://anaconda.org/conda-forge/pytest
+        
         .. image:: https://img.shields.io/pypi/pyversions/pytest.svg
-          :target: https://pypi.python.org/pypi/pytest
+            :target: https://pypi.python.org/pypi/pytest
+        
         .. image:: https://img.shields.io/coveralls/pytest-dev/pytest/master.svg
-           :target: https://coveralls.io/r/pytest-dev/pytest
+            :target: https://coveralls.io/r/pytest-dev/pytest
+        
         .. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master
             :target: https://travis-ci.org/pytest-dev/pytest
+        
         .. image:: https://ci.appveyor.com/api/projects/status/mrgbjaua7t33pg6b?svg=true
             :target: https://ci.appveyor.com/project/pytestbot/pytest
         
@@ -42,7 +49,7 @@ Description: .. image:: http://docs.pytest.org/en/latest/_static/pytest1.png
         To execute it::
         
             $ pytest
-            ============================= test session starts =============================    
+            ============================= test session starts =============================
             collected 1 items
         
             test_sample.py F
diff --git a/README.rst b/README.rst
index d5650af..3a0abc5 100644
--- a/README.rst
+++ b/README.rst
@@ -6,13 +6,20 @@
 ------
 
 .. image:: https://img.shields.io/pypi/v/pytest.svg
-   :target: https://pypi.python.org/pypi/pytest
+    :target: https://pypi.python.org/pypi/pytest
+
+.. image:: https://anaconda.org/conda-forge/pytest/badges/version.svg
+    :target: https://anaconda.org/conda-forge/pytest
+
 .. image:: https://img.shields.io/pypi/pyversions/pytest.svg
-  :target: https://pypi.python.org/pypi/pytest
+    :target: https://pypi.python.org/pypi/pytest
+
 .. image:: https://img.shields.io/coveralls/pytest-dev/pytest/master.svg
-   :target: https://coveralls.io/r/pytest-dev/pytest
+    :target: https://coveralls.io/r/pytest-dev/pytest
+
 .. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master
     :target: https://travis-ci.org/pytest-dev/pytest
+
 .. image:: https://ci.appveyor.com/api/projects/status/mrgbjaua7t33pg6b?svg=true
     :target: https://ci.appveyor.com/project/pytestbot/pytest
 
@@ -34,7 +41,7 @@ An example of a simple test:
 To execute it::
 
     $ pytest
-    ============================= test session starts =============================    
+    ============================= test session starts =============================
     collected 1 items
 
     test_sample.py F
diff --git a/_pytest/__init__.py b/_pytest/__init__.py
index 45375bc..6e41f05 100644
--- a/_pytest/__init__.py
+++ b/_pytest/__init__.py
@@ -1,2 +1,8 @@
-#
-__version__ = '3.0.7'
+__all__ = ['__version__']
+
+try:
+    from ._version import version as __version__
+except ImportError:
+    # broken installation, we don't even try
+    # unknown only works because we do poor mans version compare
+    __version__ = 'unknown'
diff --git a/_pytest/_argcomplete.py b/_pytest/_argcomplete.py
index 3ab679d..8c93e4c 100644
--- a/_pytest/_argcomplete.py
+++ b/_pytest/_argcomplete.py
@@ -57,7 +57,7 @@ If things do not work right away:
   which should throw a KeyError: 'COMPLINE' (which is properly set by the
   global argcomplete script).
 """
-
+from __future__ import absolute_import, division, print_function
 import sys
 import os
 from glob import glob
diff --git a/_pytest/_code/__init__.py b/_pytest/_code/__init__.py
index 3463c11..815c13b 100644
--- a/_pytest/_code/__init__.py
+++ b/_pytest/_code/__init__.py
@@ -1,4 +1,5 @@
 """ python inspection/code generation API """
+from __future__ import absolute_import, division, print_function
 from .code import Code  # noqa
 from .code import ExceptionInfo  # noqa
 from .code import Frame  # noqa
diff --git a/_pytest/_code/_py2traceback.py b/_pytest/_code/_py2traceback.py
index a830d98..d45ee01 100644
--- a/_pytest/_code/_py2traceback.py
+++ b/_pytest/_code/_py2traceback.py
@@ -2,6 +2,7 @@
 # CHANGES:
 # - some_str is replaced, trying to create unicode strings
 #
+from __future__ import absolute_import, division, print_function
 import types
 
 def format_exception_only(etype, value):
diff --git a/_pytest/_code/code.py b/_pytest/_code/code.py
index 6eceb0c..9b3408d 100644
--- a/_pytest/_code/code.py
+++ b/_pytest/_code/code.py
@@ -1,14 +1,16 @@
+from __future__ import absolute_import, division, print_function
 import sys
 from inspect import CO_VARARGS, CO_VARKEYWORDS
 import re
 from weakref import ref
+from _pytest.compat import _PY2, _PY3, PY35, safe_str
 
 import py
 builtin_repr = repr
 
 reprlib = py.builtin._tryimport('repr', 'reprlib')
 
-if sys.version_info[0] >= 3:
+if _PY3:
     from traceback import format_exception_only
 else:
     from ._py2traceback import format_exception_only
@@ -352,7 +354,7 @@ class ExceptionInfo(object):
         help for navigating the traceback.
     """
     _striptext = ''
-    _assert_start_repr = "AssertionError(u\'assert " if sys.version_info[0] < 3 else "AssertionError(\'assert "
+    _assert_start_repr = "AssertionError(u\'assert " if _PY2 else "AssertionError(\'assert "
 
     def __init__(self, tup=None, exprinfo=None):
         import _pytest._code
@@ -600,24 +602,51 @@ class FormattedExcinfo(object):
         traceback = excinfo.traceback
         if self.tbfilter:
             traceback = traceback.filter()
-        recursionindex = None
+
         if is_recursion_error(excinfo):
-            recursionindex = traceback.recursionindex()
+            traceback, extraline = self._truncate_recursive_traceback(traceback)
+        else:
+            extraline = None
+
         last = traceback[-1]
         entries = []
-        extraline = None
         for index, entry in enumerate(traceback):
             einfo = (last == entry) and excinfo or None
             reprentry = self.repr_traceback_entry(entry, einfo)
             entries.append(reprentry)
-            if index == recursionindex:
-                extraline = "!!! Recursion detected (same locals & position)"
-                break
         return ReprTraceback(entries, extraline, style=self.style)
 
+    def _truncate_recursive_traceback(self, traceback):
+        """
+        Truncate the given recursive traceback trying to find the starting point
+        of the recursion.
+
+        The detection is done by going through each traceback entry and finding the
+        point in which the locals of the frame are equal to the locals of a previous frame (see ``recursionindex()``.
+
+        Handle the situation where the recursion process might raise an exception (for example
+        comparing numpy arrays using equality raises a TypeError), in which case we do our best to
+        warn the user of the error and show a limited traceback.
+        """
+        try:
+            recursionindex = traceback.recursionindex()
... 11584 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pytest.git



More information about the Python-modules-commits mailing list