Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Initial Update #4

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Initial Update #4

wants to merge 22 commits into from

Conversation

pyup-bot
Copy link

@pyup-bot pyup-bot commented Mar 4, 2018

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

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

Here's the executive summary:

Updates

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

flake8 3.5.0 » 3.5.0 PyPI | Changelog | Repo
mock 2.0.0 » 2.0.0 PyPI | Repo
pytest 3.4.1 » 3.4.1 PyPI | Changelog | Repo | Homepage
pytest-cache 1.0 » 1.0 PyPI | Changelog | Repo | Docs
pytest-cover 3.0.0 » 3.0.0 PyPI | Changelog | Repo
pytest-sugar 0.9.1 » 0.9.1 PyPI | Changelog | Homepage
pytest-xdist 1.22.2 » 1.22.2 PyPI | Changelog | Repo
tox 2.9.1 » 2.9.1 PyPI | Changelog | Docs
webtest 2.0.29 » 2.0.29 PyPI | Changelog | Homepage
colander 1.3.3 » 1.4 PyPI | Changelog | Homepage
cornice 2.4.0 » 3.1.0 PyPI | Changelog | Repo | Docs
iso8601 0.1.11 » 0.1.12 PyPI | Repo
plaster 0.5 » 1.0 PyPI | Changelog | Homepage
plaster-pastedeploy 0.4.1 » 0.4.2 PyPI | Changelog | Repo
python-json-logger 0.1.7 » 0.1.8 PyPI | Changelog | Repo
repoze.lru 0.6 » 0.7 PyPI | Homepage
simplejson 3.11.1 » 3.13.2 PyPI | Changelog | Repo
six 1.10.0 » 1.11.0 PyPI | Changelog | Homepage | Docs
waitress 1.0.2 » 1.1.0 PyPI | Changelog | Repo
WebOb 1.7.3 » 1.7.4 PyPI | Changelog | Homepage
zope.deprecation 4.2.0 » 4.3.0 PyPI | Changelog | Repo
zope.interface 4.4.2 » 4.4.3 PyPI | Changelog | Repo

Changelogs

flake8 -> 3.5.0

3.5.0


You can view the 3.5.0 milestone_ on GitLab for more details.

New Dependency Information

  • Allow for PyFlakes 1.6.0 (See also GitLab359_)
  • Start using new PyCodestyle checks for bare excepts and ambiguous identifier
    (See also GitLab361_)

Features

  • Print out information about configuring VCS hooks (See also GitLab335_)
  • Allow users to develop plugins "local" to a repository without using
    setuptools. See our documentation on local plugins for more information.
    (See also GitLab357_)

Bugs Fixed

  • Catch and helpfully report UnicodeDecodeError\ s when parsing
    configuration files. (See also GitLab358_)

.. all links
.. _3.5.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/20

.. issue links
.. _GitLab335:
https://gitlab.com/pycqa/flake8/issues/335
.. _GitLab357:
https://gitlab.com/pycqa/flake8/issues/357
.. _GitLab358:
https://gitlab.com/pycqa/flake8/issues/358
.. _GitLab359:
https://gitlab.com/pycqa/flake8/issues/359
.. _GitLab361:
https://gitlab.com/pycqa/flake8/issues/361

.. merge request links

3.4.1


You can view the 3.4.1 milestone_ on GitLab for more details.

  • Fix minor regression when users specify only a --select list with items
    in the enabled/extended select list. (See also GitLab354_)

.. all links
.. _3.4.1 milestone:
https://gitlab.com/pycqa/flake8/milestones/19

.. issue links
.. _GitLab354:
https://gitlab.com/pycqa/flake8/issues/354

.. merge request links

3.4.0


You can view the 3.4.0 milestone_ on GitLab for more details.

  • Refine logic around --select and --ignore when combined with the
    default values for each. (See also GitLab318_)
  • Handle spaces as an alternate separate for error codes, e.g.,
    --ignore 'E123 E234'. (See also GitLab329_)
  • Filter out empty select and ignore codes, e.g., --ignore E123,,E234.
    (See also GitLab330_)
  • Specify dependencies appropriately in setup.py (See also Gitlab341_)
  • Fix bug in parsing --quiet and --verbose from config files.
    (See also GitLab!193_)
  • Remove unused import of os in the git hook template (See also
    GitLab!194_)

.. all links
.. _3.4.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/18

.. issue links
.. _GitLab318:
https://gitlab.com/pycqa/flake8/issues/318
.. _GitLab329:
https://gitlab.com/pycqa/flake8/issues/329
.. _GitLab330:
https://gitlab.com/pycqa/flake8/issues/330
.. _GitLab341:
https://gitlab.com/pycqa/flake8/issues/341

.. merge request links
.. _GitLab!193:
https://gitlab.com/pycqa/flake8/merge_requests/193
.. _GitLab!194:
https://gitlab.com/pycqa/flake8/merge_requests/194

3.3.0


You can view the 3.3.0 milestone_ on GitLab for more details.

  • Add support for Python 3.6 (via dependencies). Note Flake8 does not
    guarantee that all plugins will support Python 3.6.
  • Added unique error codes for all missing PyFlakes messages. (14 new
    codes, see "Error / Violation Codes")
  • Dramatically improve the performance of Flake8. (See also GitLab!156_)
  • Display the local file path instead of the temporary file path when
    using the git hook. (See also GitLab244_)
  • Add methods to Report class that will be called when Flake8 starts and
    finishes processing a file. (See also GitLab251_)
  • Fix problem where hooks should only check *.py files. (See also
    GitLab268_)
  • Fix handling of SyntaxErrors that do not include physical line information.
    (See also GitLab279_)
  • Update upper bound on PyFlakes to allow for PyFlakes 1.5.0. (See also
    GitLab290_)
  • Update setuptools integration to less eagerly deduplicate packages.
    (See also GitLab295_)
  • Force flake8 --version to be repeatable between invocations. (See also
    GitLab297_)

.. all links
.. _3.3.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/16

.. issue links
.. _GitLab244:
https://gitlab.com/pycqa/flake8/issues/244
.. _GitLab251:
https://gitlab.com/pycqa/flake8/issues/251
.. _GitLab268:
https://gitlab.com/pycqa/flake8/issues/268
.. _GitLab279:
https://gitlab.com/pycqa/flake8/issues/279
.. _GitLab290:
https://gitlab.com/pycqa/flake8/issues/290
.. _GitLab295:
https://gitlab.com/pycqa/flake8/issues/295
.. _GitLab297:
https://gitlab.com/pycqa/flake8/issues/297

.. merge request links
.. _GitLab!156:
https://gitlab.com/pycqa/flake8/merge_requests/156

3.2.1


You can view the 3.2.1 milestone_ on GitLab for more details.

  • Fix subtle bug when deciding whether to report an on-by-default's violation
    (See also GitLab257_)
  • Fix another bug around SyntaxErrors not being reported at the right column
    and row (See also GitLab259_ and GitLab237_ for a related, previously
    fixed bug)
  • Fix regression from 2.x where we run checks against explicitly provided
    files, even if they don't match the filename patterns. (See also
    GitLab266_)

.. links
.. _3.2.1 milestone:
https://gitlab.com/pycqa/flake8/milestones/15
.. _GitLab237:
https://gitlab.com/pycqa/flake8/issues/237
.. _GitLab257:
https://gitlab.com/pycqa/flake8/issues/257
.. _GitLab259:
https://gitlab.com/pycqa/flake8/issues/259
.. _GitLab266:
https://gitlab.com/pycqa/flake8/issues/266

3.2.0


You can view the 3.2.0 milestone_ on GitLab for more details.

  • Allow for pycodestyle 2.2.0 which fixes a bug in E305 (See also
    GitLab256_)

.. links
.. _3.2.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/14
.. _GitLab256:
https://gitlab.com/pycqa/flake8/issues/256

3.1.1


You can view the 3.1.1 milestone_ on GitLab for more details.

  • Do not attempt to install/distribute a man file with the Python package;
    leave this for others to do. (See also GitLab254_)
  • Fix packaging bug where wheel version constraints specified in setup.cfg did
    not match the constraints in setup.py. (See also GitLab255_)

.. links
.. _3.1.1 milestone:
https://gitlab.com/pycqa/flake8/milestones/13
.. _GitLab254:
https://gitlab.com/pycqa/flake8/issues/254
.. _GitLab255:
https://gitlab.com/pycqa/flake8/issues/255

3.1.0


You can view the 3.1.0 milestone_ on GitLab for more details.

  • Add --bug-report flag to make issue reporters' lives easier.
  • Collect configuration files from the current directory when using our Git
    hook. (See also GitLab210, GitLab218, GitLab223_)
  • Avoid unhandled exceptions when dealing with SyntaxErrors. (See also
    GitLab214, GitLab238)
  • Exit early if the value for --diff is empty. (See also GitLab226_)
  • Handle empty --stdin-display-name values. (See also GitLab235_)
  • Properly report the column number of Syntax Errors. We were assuming that
    all reports of column numbers were 0-indexed, however, SyntaxErrors report
    the column number as 1-indexed. This caused us to report a column number
    that was 1 past the actual position. Further, when combined with
    SyntaxErrors that occur at a newline, this caused the position to be
    visually off by two. (See also GitLab237_)
  • Fix the behaviour of --enable-extensions. Previously, items specified
    here were still ignored due to the fact that the off-by-default extension
    codes were being left in the ignore list. (See also GitLab239_)
  • Fix problems around --select and --ignore behaviour that prevented
    codes that were neither explicitly selected nor explicitly ignored from
    being reported. (See also GitLab242_)
  • Truly be quiet when the user specifies -q one or more times. Previously,
    we were showing the if the user specified -q and --show-source. We
    have fixed this bug. (See also GitLab245_)
  • Add new File Processor attribute, previous_unindented_logical_line to
    accommodate pycodestyle 2.1.0. (See also GitLab246_)
  • When something goes wrong, exit non-zero. (See also GitLab248,
    GitLab209
    )
  • Add --tee as an option to allow use of --output-file and printing to
    standard out.
  • Allow the git plugin to actually be lazy when collecting files.
  • Allow for pycodestyle 2.1 series and pyflakes 1.3 series.

.. links
.. _3.1.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/12
.. _GitLab209:
https://gitlab.com/pycqa/flake8/issues/209
.. _GitLab210:
https://gitlab.com/pycqa/flake8/issues/210
.. _GitLab214:
https://gitlab.com/pycqa/flake8/issues/214
.. _GitLab218:
https://gitlab.com/pycqa/flake8/issues/218
.. _GitLab223:
https://gitlab.com/pycqa/flake8/issues/223
.. _GitLab226:
https://gitlab.com/pycqa/flake8/issues/226
.. _GitLab235:
https://gitlab.com/pycqa/flake8/issues/235
.. _GitLab237:
https://gitlab.com/pycqa/flake8/issues/237
.. _GitLab238:
https://gitlab.com/pycqa/flake8/issues/238
.. _GitLab239:
https://gitlab.com/pycqa/flake8/issues/239
.. _GitLab242:
https://gitlab.com/pycqa/flake8/issues/242
.. _GitLab245:
https://gitlab.com/pycqa/flake8/issues/245
.. _GitLab246:
https://gitlab.com/pycqa/flake8/issues/246
.. _GitLab248:
https://gitlab.com/pycqa/flake8/issues/248

3.0.4


  • Side-step a Pickling Error when using Flake8 with multiprocessing on Unix
    systems. (See also GitLab164_)
  • Fix an Attribute Error raised when dealing with Invalid Syntax. (See also
    GitLab203_)
  • Fix an unhandled Syntax Error when tokenizing files. (See also
    GitLab205_)

.. links
.. _GitLab164:
https://gitlab.com/pycqa/flake8/issues/164
.. _GitLab203:
https://gitlab.com/pycqa/flake8/issues/203
.. _GitLab205:
https://gitlab.com/pycqa/flake8/issues/205

3.0.3


  • Disable --jobs for any version of Python on Windows.
    (See also this Python bug report_)
  • Raise exception when entry_point in plugin not callable.
    This raises an informative error when a plugin fails to load because its
    entry_point is not callable, which can happen with a plugin which is buggy or
    not updated for the current version of flake8. This is nicer than raising a
    PicklingError about failing to pickle a module (See also GitLab164_)
  • Fix noqa comments followed by a : and explanation broken by
    3.0.0 (See also GitLab178_)
  • Always open our output file in append mode so we do not overwrite log
    messages. (See also GitLab193_)
  • When normalizing path values read from configuration, keep in context the
    directory where the configuration was found so that relative paths work.
    (See also GitLab194_)
  • Fix issue where users were unable to ignore plugin errors that were on
    by default. (See also GitLab195_)
  • Fix our legacy API StyleGuide's init_report method to actually override
    the previous formatter. (See also GitLab200_)

.. links
.. _GitLab164:
https://gitlab.com/pycqa/flake8/issues/164
.. _GitLab178:
https://gitlab.com/pycqa/flake8/issues/178
.. _GitLab193:
https://gitlab.com/pycqa/flake8/issues/193
.. _GitLab194:
https://gitlab.com/pycqa/flake8/issues/193
.. _GitLab195:
https://gitlab.com/pycqa/flake8/issues/195
.. _GitLab200:
https://gitlab.com/pycqa/flake8/issues/200
.. _this Python bug report:
https://bugs.python.org/issue27649

3.0.2


  • Fix local config file discovery. (See also GitLab181_)
  • Fix indexing of column numbers. We accidentally were starting column indices
    at 0 instead of 1.
  • Fix regression in handling of errors like E402 that rely on a combination of
    attributes. (See also GitLab186_)

.. links
.. _GitLab181:
https://gitlab.com/pycqa/flake8/issues/181
.. _GitLab186:
https://gitlab.com/pycqa/flake8/issues/186

3.0.1


  • Fix regression in handling of noqa for multiline strings.
    (See also GitLab177_)
  • Fix regression in handling of --output-file when not also using
    --verbose. (See also GitLab180_)
  • Fix regression in handling of --quiet. (See also GitLab180_)
  • Fix regression in handling of --statistics. (See also GitLab180_)

.. links
.. _GitLab177:
https://gitlab.com/pycqa/flake8/issues/177
.. _GitLab180:
https://gitlab.com/pycqa/flake8/issues/180

3.0.0


  • Drop explicit support for Pythons 2.6, 3.2, and 3.3.
  • Remove dependence on pep8/pycodestyle for file processing, plugin
    dispatching, and more. We now control all of this while keeping backwards
    compatibility.
  • --select and --ignore can now both be specified and try to find the
    most specific rule from each. For example, if you do --select E --ignore E123 then we will report everything that starts with E except for
    E123. Previously, you would have had to do --ignore E123,F,W which
    will also still work, but the former should be far more intuitive.
  • Add support for in-line noqa comments to specify only the error
    codes to be ignored, e.g., noqa: E123,W503
  • Add entry-point for formatters as well as a base class that new formatters
    can inherit from. See the documentation for more details.
  • Add detailed verbose output using the standard library logging module.
  • Enhance our usage of optparse for plugin developers by adding new parameters
    to the add_option that plugins use to register new options.
  • Update --install-hook to require the name of version control system hook
    you wish to install a Flake8.
  • Stop checking sub-directories more than once via the setuptools command
  • When passing a file on standard-in, allow the caller to specify
    --stdin-display-name so the output is properly formatted
  • The Git hook now uses sys.executable to format the shebang line.
    This allows Flake8 to install a hook script from a virtualenv that points to
    that virtualenv's Flake8 as opposed to a global one (without the virtualenv
    being sourced).
  • Print results in a deterministic and consistent ordering when used with
    multiprocessing
  • When using --count, the output is no longer written to stderr.
  • AST plugins can either be functions or classes and all plugins can now
    register options so long as there are callable attributes named as we
    expect.
  • Stop forcibly re-adding .tox, .eggs, and *.eggs to
    --exclude. Flake8 2.x started always appending those three patterns
    to any exclude list (including the default and any user supplied list).
    Flake8 3 has stopped adding these in, so you may see errors when upgrading
    due to these patterns no longer being forcibly excluded by default if you
    have your own exclude patterns specified.

To fix this, add the appropriate patterns to your exclude patterns list.

.. note::

 This item was added in November of 2016, as a result of a bug
 report.

2.6.2


  • Bug Fix packaging error during release process.

2.6.1


  • Bug Update the config files to search for to include setup.cfg and
    tox.ini. This was broken in 2.5.5 when we stopped passing
    config_file to our Style Guide

2.6.0


  • Requirements Change Switch to pycodestyle as all future pep8 releases
    will use that package name
  • Improvement Allow for Windows users on select versions of Python to
    use --jobs and multiprocessing
  • Improvement Update bounds on McCabe
  • Improvement Update bounds on PyFlakes and blacklist known broken
    versions
  • Improvement Handle new PyFlakes warning with a new error code: F405

2.5.5


  • Bug Fix setuptools integration when parsing config files
  • Bug Don't pass the user's config path as the config_file when creating a
    StyleGuide

2.5.4


  • Bug Missed an attribute rename during the v2.5.3 release.

2.5.3


  • Bug Actually parse output_file and enable_extensions from config
    files

2.5.2


  • Bug Parse output_file and enable_extensions from config files
  • Improvement Raise upper bound on mccabe plugin to allow for version
    0.4.0

2.5.1


  • Bug Properly look for .flake8 in current working directory
    (GitLab103_)
  • Bug Monkey-patch pep8.stdin_get_value to cache the actual value in
    stdin. This helps plugins relying on the function when run with
    multiprocessing. (GitLab105, GitLab107)

.. _GitLab103: https://gitlab.com/pycqa/flake8/issues/103
.. _GitLab105: https://gitlab.com/pycqa/flake8/issues/105
.. _GitLab107: https://gitlab.com/pycqa/flake8/issues/107

2.5.0


  • Improvement Raise cap on PyFlakes for Python 3.5 support
  • Improvement Avoid deprecation warnings when loading extensions
    (GitLab59, GitLab90)
  • Improvement Separate logic to enable "off-by-default" extensions
    (GitLab67_)
  • Bug Properly parse options to setuptools Flake8 command (GitLab!41_)
  • Bug Fix exceptions when output on stdout is truncated before Flake8
    finishes writing the output (GitLab69_)
  • Bug Fix error on OS X where Flake8 can no longer acquire or create new
    semaphores (GitLab74_)

.. _GitLab!41: https://gitlab.com/pycqa/flake8/merge_requests/41
.. _GitLab59: https://gitlab.com/pycqa/flake8/issues/59
.. _GitLab67: https://gitlab.com/pycqa/flake8/issues/67
.. _GitLab69: https://gitlab.com/pycqa/flake8/issues/69
.. _GitLab74: https://gitlab.com/pycqa/flake8/issues/74
.. _GitLab90: https://gitlab.com/pycqa/flake8/issues/90

2.4.1


  • Bug Do not raise a SystemError unless there were errors in the
    setuptools command. (GitLab39, GitLab!23)
  • Bug Do not verify dependencies of extensions loaded via entry-points.
  • Improvement Blacklist versions of pep8 we know are broken

.. _GitLab39: https://gitlab.com/pycqa/flake8/issues/39
.. _GitLab!23: https://gitlab.com/pycqa/flake8/merge_requests/23

2.4.0


  • Bug Print filenames when using multiprocessing and -q option.
    (GitLab31_)
  • Bug Put upper cap on dependencies. The caps for 2.4.0 are:
  • pep8 < 1.6 (Related to GitLab35_)
  • mccabe < 0.4
  • pyflakes < 0.9

See also GitLab32_

  • Bug Files excluded in a config file were not being excluded when flake8
    was run from a git hook. (GitHub2_)
  • Improvement Print warnings for users who are providing mutually
    exclusive options to flake8. (GitLab8, GitLab!18)
  • Feature Allow git hook configuration to live in .git/config.
    See the updated VCS hooks docs_ for more details. (GitLab!20_)

.. _GitHub2: PyCQA/flake8#2
.. _GitLab8: https://gitlab.com/pycqa/flake8/issues/8
.. _GitLab31: https://gitlab.com/pycqa/flake8/issues/31
.. _GitLab32: https://gitlab.com/pycqa/flake8/issues/32
.. _GitLab35: https://gitlab.com/pycqa/flake8/issues/35
.. _GitLab!18: https://gitlab.com/pycqa/flake8/merge_requests/18
.. _GitLab!20: https://gitlab.com/pycqa/flake8/merge_requests/20
.. _VCS hooks docs: https://flake8.readthedocs.org/en/latest/vcs.html

2.3.0


  • Feature: Add --output-file option to specify a file to write to
    instead of stdout.
  • Bug Fix interleaving of output while using multiprocessing
    (GitLab17_)

.. _GitLab17: https://gitlab.com/pycqa/flake8/issues/17

2.2.5


  • Flush standard out when using multiprocessing
  • Make the check for " flake8: noqa" more strict

2.2.4


  • Fix bugs triggered by turning multiprocessing on by default (again)

Multiprocessing is forcibly disabled in the following cases:

  • Passing something in via stdin
  • Analyzing a diff
  • Using windows
  • Fix --install-hook when there are no config files present for pep8 or
    flake8.
  • Fix how the setuptools command parses excludes in config files
  • Fix how the git hook determines which files to analyze (Thanks Chris
    Buccella!)

2.2.3


  • Actually turn multiprocessing on by default

2.2.2


  • Re-enable multiprocessing by default while fixing the issue Windows users
    were seeing.

2.2.1


  • Turn off multiple jobs by default. To enable automatic use of all CPUs, use
    --jobs=auto. Fixes 155 and 154.

2.2.0


  • New option doctests to run Pyflakes checks on doctests too
  • New option jobs to launch multiple jobs in parallel
  • Turn on using multiple jobs by default using the CPU count
  • Add support for python -m flake8 on Python 2.7 and Python 3
  • Fix Git and Mercurial hooks: issues 88, 133, 148 and 149
  • Fix crashes with Python 3.4 by upgrading dependencies
  • Fix traceback when running tests with Python 2.6
  • Fix the setuptools command python setup.py flake8 to read
    the project configuration

2.1.0


  • Add FLAKE8_LAZY and FLAKE8_IGNORE environment variable support to git and
    mercurial hooks
  • Force git and mercurial hooks to repsect configuration in setup.cfg
  • Only check staged files if that is specified
  • Fix hook file permissions
  • Fix the git hook on python 3
  • Ignore non-python files when running the git hook
  • Ignore .tox directories by default
  • Flake8 now reports the column number for PyFlakes messages

2.0.0


  • Pyflakes errors are prefixed by an F instead of an E
  • McCabe complexity warnings are prefixed by a C instead of a W
  • Flake8 supports extensions through entry points
  • Due to the above support, we require setuptools
  • We publish the documentation <https://flake8.readthedocs.org/>_
  • Fixes 13: pep8, pyflakes and mccabe become external dependencies
  • Split run.py into main.py, engine.py and hooks.py for better logic
  • Expose our parser for our users
  • New feature: Install git and hg hooks automagically
  • By relying on pyflakes (0.6.1), we also fixed 45 and 35

1.7.0


  • Fixes part of 35: Exception for no WITHITEM being an attribute of Checker
    for Python 3.3
  • Support stdin
  • Incorporate phd's builtins pull request
  • Fix the git hook
  • Update pep8.py to the latest version

1.6.2


  • fixed the NameError: global name 'message' is not defined (46)

1.6.1


  • fixed the mercurial hook, a change from a previous patch was not properly
    applied
  • fixed an assumption about warnings/error messages that caused an exception
    to be thrown when McCabe is used

1.6


  • changed the signatures of the check_file function in flake8/run.py,
    skip_warning in flake8/util.py and the check, checkPath
    functions in flake8/pyflakes.py.
  • fix --exclude and --ignore command flags (14, 19)
  • fix the git hook that wasn't catching files not already added to the index
    (29)
  • pre-emptively includes the addition to pep8 to ignore certain lines.
    Add nopep8 to the end of a line to ignore it. (37)
  • check_file can now be used without any special prior setup (21)
  • unpacking exceptions will no longer cause an exception (20)
  • fixed crash on non-existent file (38)

1.5


  • fixed the stdin
  • make sure mccabe catches the syntax errors as warnings
  • pep8 upgrade
  • added max_line_length default value
  • added Flake8Command and entry points if setuptools is around
  • using the setuptools console wrapper when available

1.4


  • git_hook: Only check staged changes for compliance
  • use pep8 1.2

1.3.1


  • fixed support for Python 2.5

1.3


  • fixed false W402 warning on exception blocks.

1.2


  • added a git hook
  • now Python 3 compatible
  • mccabe and pyflakes have warning codes like pep8 now

1.1


  • fixed the value returned by --version
  • allow the flake8: header to be more generic
  • fixed the "hg hook raises 'physical lines'" bug
  • allow three argument form of raise
  • now uses setuptools if available, for 'develop' command

1.0


  • Deactivates by default the complexity checker
  • Introduces the complexity option in the HG hook and the command line.

0.9


  • update pep8 version to 0.6.1
  • mccabe check: gracefully handle compile failure

0.8


  • fixed hg hook
  • discard unexisting files on hook check

0.7


  • Fix pep8 initialization when run through Hg
  • Make pep8 short options work when run through the command line
  • Skip duplicates when controlling files via Hg

0.6


  • Fix the McCabe metric on some loops

pytest -> 3.4.1

3.4.1

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

Bug Fixes

  • Move import of doctest.UnexpectedException to top-level to avoid possible
    errors when using --pdb. (1810 <https://github.com/pytest-dev/pytest/issues/1810>_)
  • Added printing of captured stdout/stderr before entering pdb, and improved a
    test which was giving false negatives about output capturing. (3052 <https://github.com/pytest-dev/pytest/issues/3052>_)
  • Fix ordering of tests using parametrized fixtures which can lead to fixtures
    being created more than necessary. (3161 <https://github.com/pytest-dev/pytest/issues/3161>_)
  • Fix bug where logging happening at hooks outside of "test run" hooks would
    cause an internal error. (3184 <https://github.com/pytest-dev/pytest/issues/3184>_)
  • Detect arguments injected by unittest.mock.patch decorator correctly when
    pypi mock.patch is installed and imported. (3206 <https://github.com/pytest-dev/pytest/issues/3206>_)
  • Errors shown when a pytest.raises() with match= fails are now cleaner
    on what happened: When no exception was raised, the "matching '...'" part got
    removed as it falsely implies that an exception was raised but it didn't
    match. When a wrong exception was raised, it's now thrown (like
    pytest.raised() without match= would) instead of complaining about
    the unmatched text. (3222 <https://github.com/pytest-dev/pytest/issues/3222>_)
  • Fixed output capture handling in doctests on macOS. (985 <https://github.com/pytest-dev/pytest/issues/985>_)

Improved Documentation

  • Add Sphinx parameter docs for match and message args to
    pytest.raises. (3202 <https://github.com/pytest-dev/pytest/issues/3202>_)

Trivial/Internal Changes

  • pytest has changed the publication procedure and is now being published to
    PyPI directly from Travis. (3060 <https://github.com/pytest-dev/pytest/issues/3060>_)
  • Rename ParameterSet._for_parameterize() to _for_parametrize() in
    order to comply with the naming convention. (3166 <https://github.com/pytest-dev/pytest/issues/3166>_)
  • Skip failing pdb/doctest test on mac. (985 <https://github.com/pytest-dev/pytest/issues/985>_)

3.4.0

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

Deprecations and Removals

  • All pytest classes now subclass object for better Python 2/3 compatibility.
    This should not affect user code except in very rare edge cases. (2147 <https://github.com/pytest-dev/pytest/issues/2147>_)

Features

  • Introduce empty_parameter_set_mark ini option to select which mark to
    apply when pytest.mark.parametrize is given an empty set of parameters.
    Valid options are skip (default) and xfail. Note that it is planned
    to change the default to xfail in future releases as this is considered
    less error prone. (2527 <https://github.com/pytest-dev/pytest/issues/2527>_)
  • Incompatible change: after community feedback the logging <https://docs.pytest.org/en/latest/logging.html>_ functionality has
    undergone some changes. Please consult the logging documentation <https://docs.pytest.org/en/latest/logging.htmlincompatible-changes-in-pytest-3-4>_
    for details. (3013 <https://github.com/pytest-dev/pytest/issues/3013>_)
  • Console output falls back to "classic" mode when capturing is disabled (-s),
    otherwise the output gets garbled to the point of being useless. (3038 <https://github.com/pytest-dev/pytest/issues/3038>_)
  • New pytest_runtest_logfinish <https://docs.pytest.org/en/latest/writing_plugins.html_pytest.hookspec.pytest_runtest_logfinish>_
    hook which is called when a test item has finished executing, analogous to
    pytest_runtest_logstart <https://docs.pytest.org/en/latest/writing_plugins.html_pytest.hookspec.pytest_runtest_start>.
    (3101 <https://github.com/pytest-dev/pytest/issues/3101>
    )
  • Improve performance when collecting tests using many fixtures. (3107 <https://github.com/pytest-dev/pytest/issues/3107>_)
  • New caplog.get_records(when) method which provides access to the captured
    records for the "setup", "call" and "teardown"
    testing stages. (3117 <https://github.com/pytest-dev/pytest/issues/3117>_)
  • New fixture record_xml_attribute that allows modifying and inserting
    attributes on the <testcase> xml node in JUnit reports. (3130 <https://github.com/pytest-dev/pytest/issues/3130>_)
  • The default cache directory has been renamed from .cache to
    .pytest_cache after community feedback that the name .cache did not
    make it clear that it was used by pytest. (3138 <https://github.com/pytest-dev/pytest/issues/3138>_)
  • Colorize the levelname column in the live-log output. (3142 <https://github.com/pytest-dev/pytest/issues/3142>_)

Bug Fixes

  • Fix hanging pexpect test on MacOS by using flush() instead of wait().
    (2022 <https://github.com/pytest-dev/pytest/issues/2022>_)
  • Fix restoring Python state after in-process pytest runs with the
    pytester plugin; this may break tests using multiple inprocess
    pytest runs if later ones depend on earlier ones leaking global interpreter
    changes. (3016 <https://github.com/pytest-dev/pytest/issues/3016>_)
  • Fix skipping plugin reporting hook when test aborted before plugin setup
    hook. (3074 <https://github.com/pytest-dev/pytest/issues/3074>_)
  • Fix progress percentage reported when tests fail during teardown. (3088 <https://github.com/pytest-dev/pytest/issues/3088>_)
  • Incompatible change: -o/--override option no longer eats all the
    remaining options, which can lead to surprising behavior: for example,
    pytest -o foo=1 /path/to/test.py would fail because /path/to/test.py
    would be considered as part of the -o command-line argument. One
    consequence of this is that now multiple configuration overrides need
    multiple -o flags: pytest -o foo=1 -o bar=2. (3103 <https://github.com/pytest-dev/pytest/issues/3103>_)

Improved Documentation

  • Document hooks (defined with historic=True) which cannot be used with
    hookwrapper=True. (2423 <https://github.com/pytest-dev/pytest/issues/2423>_)
  • Clarify that warning capturing doesn't change the warning filter by default.
    (2457 <https://github.com/pytest-dev/pytest/issues/2457>_)
  • Clarify a possible confusion when using pytest_fixture_setup with fixture
    functions that return None. (2698 <https://github.com/pytest-dev/pytest/issues/2698>_)
  • Fix the wording of a sentence on doctest flags used in pytest. (3076 <https://github.com/pytest-dev/pytest/issues/3076>_)
  • Prefer https://*.readthedocs.io over http://*.rtfd.org for links in
    the documentation. (3092 <https://github.com/pytest-dev/pytest/issues/3092>_)
  • Improve readability (wording, grammar) of Getting Started guide (3131 <https://github.com/pytest-dev/pytest/issues/3131>_)
  • Added note that calling pytest.main multiple times from the same process is
    not recommended because of import caching. (3143 <https://github.com/pytest-dev/pytest/issues/3143>_)

Trivial/Internal Changes

  • Show a simple and easy error when keyword expressions trigger a syntax error
    (for example, "-k foo and import" will show an error that you can not use
    the import keyword in expressions). (2953 <https://github.com/pytest-dev/pytest/issues/2953>_)
  • Change parametrized automatic test id generation to use the __name__
    attribute of functions instead of the fallback argument name plus counter.
    (2976 <https://github.com/pytest-dev/pytest/issues/2976>_)
  • Replace py.std with stdlib imports. (3067 <https://github.com/pytest-dev/pytest/issues/3067>_)
  • Corrected 'you' to 'your' in logging docs. (3129 <https://github.com/pytest-dev/pytest/issues/3129>_)

3.3.2

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

Bug Fixes

  • pytester: ignore files used to obtain current user metadata in the fd leak
    detector. (2784 <https://github.com/pytest-dev/pytest/issues/2784>_)
  • Fix memory leak where objects returned by fixtures were never destructed
    by the garbage collector. (2981 <https://github.com/pytest-dev/pytest/issues/2981>_)
  • Fix conversion of pyargs to filename to not convert symlinks on Python 2. (2985 <https://github.com/pytest-dev/pytest/issues/2985>_)
  • PYTEST_DONT_REWRITE is now checked for plugins too rather than only for
    test modules. (2995 <https://github.com/pytest-dev/pytest/issues/2995>_)

Improved Documentation

  • Add clarifying note about behavior of multiple parametrized arguments (3001 <https://github.com/pytest-dev/pytest/issues/3001>_)

Trivial/Internal Changes

  • Code cleanup. (3015 <https://github.com/pytest-dev/pytest/issues/3015>,
    3021 <https://github.com/pytest-dev/pytest/issues/3021>
    )
  • Clean up code by replacing imports and references of _ast to ast. (3018 <https://github.com/pytest-dev/pytest/issues/3018>_)

3.3.1

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

Bug Fixes

  • Fix issue about -p no:<plugin> having no effect. (2920 <https://github.com/pytest-dev/pytest/issues/2920>_)
  • Fix regression with warnings that contained non-strings in their arguments in
    Python 2. (2956 <https://github.com/pytest-dev/pytest/issues/2956>_)
  • Always escape null bytes when setting PYTEST_CURRENT_TEST. (2957 <https://github.com/pytest-dev/pytest/issues/2957>_)
  • Fix ZeroDivisionError when using the testmon plugin when no tests
    were actually collected. (2971 <https://github.com/pytest-dev/pytest/issues/2971>_)
  • Bring back TerminalReporter.writer as an alias to
    TerminalReporter._tw. This alias was removed by accident in the 3.3.0
    release. (2984 <https://github.com/pytest-dev/pytest/issues/2984>_)
  • The pytest-capturelog plugin is now also blacklisted, avoiding errors when
    running pytest with it still installed. (3004 <https://github.com/pytest-dev/pytest/issues/3004>_)

Improved Documentation

  • Fix broken link to plugin pytest-localserver. (2963 <https://github.com/pytest-dev/pytest/issues/2963>_)

Trivial/Internal Changes

  • Update github "bugs" link in CONTRIBUTING.rst (2949 <https://github.com/pytest-dev/pytest/issues/2949>_)

3.3.0

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

Deprecations and Removals

  • Pytest no longer supports Python 2.6 and 3.3. Those Python versions
    are EOL for some time now and incur maintenance and compatibility costs on
    the pytest core team, and following up with the rest of the community we
    decided that they will no longer be supported starting on this version. Users
    which still require those versions should pin pytest to <3.3. (2812 <https://github.com/pytest-dev/pytest/issues/2812>_)
  • Remove internal _preloadplugins() function. This removal is part of the
    pytest_namespace() hook deprecation. (2636 <https://github.com/pytest-dev/pytest/issues/2636>_)
  • Internally change CallSpec2 to have a list of marks instead of a broken
    mapping of keywords. This removes the keywords attribute of the internal
    CallSpec2 class. (2672 <https://github.com/pytest-dev/pytest/issues/2672>_)
  • Remove ParameterSet.deprecated_arg_dict - its not a public api and the lack
    of the underscore was a naming error. (2675 <https://github.com/pytest-dev/pytest/issues/2675>_)
  • Remove the internal multi-typed attribute Node._evalskip and replace it
    with the boolean Node._skipped_by_mark. (2767 <https://github.com/pytest-dev/pytest/issues/2767>_)
  • The params list passed to pytest.fixture is now for
    all effects considered immutable and frozen at the moment of the pytest.fixture
    call. Previously the list could be changed before the first invocation of the fixture
    allowing for a form of dynamic parametrization (for example, updated from command-line options),
    but this was an unwanted implementation detail which complicated the internals and prevented
    some internal cleanup. See issue 2959 <https://github.com/pytest-dev/pytest/issues/2959>_
    for details and a recommended workaround.

Features

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

Bug Fixes

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

Trivial/Internal Changes

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

3.2.5

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

Bug Fixes

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

3.2.4

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

Bug Fixes

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

Improved Documentation

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

3.2.3

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

Bug Fixes

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

Improved Documentation

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

Trivial/Internal Changes

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

3.2.2

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

Bug Fixes

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

Improved Documentation

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

Trivial/Internal Changes

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

3.2.1

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

Bug Fixes

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

Improved Documentation

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

3.2.0

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

Deprecations and Removals

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

Features

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

Bug Fixes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant