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

pin #1

Closed
wants to merge 13 commits into from
Closed

pin #1

wants to merge 13 commits into from

Conversation

pyup-bot
Copy link

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:

Pins

Name Pinned to pypi
pytest-cov 2.3.1 pypi
pytest-watch 4.1.0 pypi
pytest-remove-stale-bytecode 2.1 pypi
pytest-xdist 1.15.0 pypi
pytest-pylint 0.6.0 pypi
sphinxcontrib-napoleon 0.5.3 pypi
pytest-testmon 0.8.2 pypi
colorama 0.3.6 pypi
tox 2.3.1 pypi
pytest-instafail 0.3.0 pypi
pytest-flake8 0.6 pypi
wrapt 1.10.8 pypi
click 6.6 pypi

Changelogs

pytest-cov -> 2.3.1

2.3.1


  • Fixed regression causing spurious errors when xdist was used. See 124 <https://github.com/pytest-dev/pytest-cov/issues/124>_.
  • Fixed DeprecationWarning about incorrect addoption use. Contributed by Florian Bruhin in PR127 <https://github.com/pytest-dev/pytest-cov/pull/127>_.
  • Fixed deprecated use of funcarg fixture API. Contributed by Daniel Hahler in PR125 <https://github.com/pytest-dev/pytest-cov/pull/125>_.

2.3.0


  • Add support for specifying output location for html, xml, and annotate report.
    Contributed by Patrick Lannigan in PR113 <https://github.com/pytest-dev/pytest-cov/pull/113>_.
  • Fix bug hiding test failure when cov-fail-under failed.
  • For coverage >= 4.0, match the default behaviour of coverage report and
    error if coverage fails to find the source instead of just printing a warning.
    Contributed by David Szotten in PR116 <https://github.com/pytest-dev/pytest-cov/pull/116>_.
  • Fixed bug occurred when bare --cov parameter was used with xdist.
    Contributed by Michael Elovskikh in PR120 <https://github.com/pytest-dev/pytest-cov/pull/120>_.
  • Add support for skip_covered and added --cov-report=term-skip-covered command
    line options. Contributed by Saurabh Kumar in PR115 <https://github.com/pytest-dev/pytest-cov/pull/115>_.

2.2.1


  • Fixed incorrect merging of coverage data when xdist was used and coverage was >= 4.0.

2.2.0


  • Added support for changing working directory in tests. Previously changing working
    directory would disable coverage measurements in suprocesses.
  • Fixed broken handling for --cov-report=annotate.

2.1.0


  • Added support for coverage 4.0b2.
  • Added the --cov-append command line options. Contributed by Christian Ledermann
    in PR80 <https://github.com/pytest-dev/pytest-cov/pull/80>_.

2.0.0


  • Added --cov-fail-under, akin to the new fail_under option in coverage-4.0
    (automatically activated if there's a [report] fail_under = ... in .coveragerc).
  • Changed --cov-report=term to automatically upgrade to --cov-report=term-missing
    if there's [run] show_missing = True in .coveragerc.
  • Changed --cov so it can be used with no path argument (in wich case the source
    settings from .coveragerc will be used instead).
  • Fixed .pth installation to work in all cases (install, easy_install, wheels, develop etc).
  • Fixed .pth uninstallation to work for wheel installs.
  • Support for coverage 4.0.
  • Data file suffixing changed to use coverage's data_suffix=True option (instead of the
    custom suffixing).
  • Avoid warning about missing coverage data (just like coverage.control.process_startup).
  • Fixed a race condition when running with xdist (all the workers tried to combine the files).
    It's possible that this issue is not present in pytest-cov 1.8.X.

1.8.2


  • N/A

pytest-watch -> 4.1.0

4.1.0


  • Enhancement: Speed up config collection
  • Bugfix: Handle KeyboardInterrupt during inifile collection (fixes 52)
  • Cleanup

4.0.0


  • Breaking change: Re-order watch arguments
  • Breaking change: Add parameterized --spool option for finer control and remove --no-spool
  • Breaking change: Remove py.test.watch console script
  • Enhancement: Report filesystem events on re-run (fixes 39)
  • Enhancement: Allow --ext=* for watching any file type
  • Enhancement: Run pytest from main thread, send KeyboardInterrupt on filesystem events, and wait for pytest to terminate before running next iteration (fixes 36)
  • Enhancement: Add --pdb option, forwarding to pytest
  • Enhancement: Add --wait option to wait for all tests to complete before re-running on filesystem events (fixes 21)
  • Enhancement: Add --afterrun for running commands after pytest runs, regardless of whether it was interrupted (46 - thanks, blueyed! - and fc471a457ae334e24422f939c04be25587d6d357)
  • Enhancement: Allow multiple --ignore args instead of one comma-separated list and forward them to pytest (fixes 48)
  • Enhancement: Add -V as short version of --version
  • Enhancement: Add --config and include <directory> list in pytest args (fixes 40)
  • Enhancement: Improve config collection debuggability
  • Bugfix: Fix config file collection on Python 2.6 and below (47 - thanks, lukaszb! - and 7f1508d908a61ade36312219d2414445e5b05686)
  • Bugfix: Re-run on directory changes (fixes 44)
  • Update LICENSE year
  • Update README
  • Cleanup

3.10.0


  • Bugfix: Fix Python 2 support.

3.9.0


  • Bugfix: Handle py.test exit code 5 (no tests are run/collected) as pass (42 - thanks, blueyed!)
  • Bugfix: Show config-related errors instead of silently exiting with code 2 (45 - thanks, blueyed!)

3.8.0


  • Enhancement: Read configuration from pytest.ini (30 - thanks, bendtherules!)

3.7.0


  • Enhancement: Add --runner option
  • Cleanup

3.6.0


  • Enhancement: Add --onexit option (28 - thanks, blueyed!)
  • Bugfix: Fix beep on Python 3.x by manually flushing the output buffer (27 - thanks, blueyed!)

3.5.0


3.3.0


  • Enhancement: Add --beforerun CLI argument (25 - thanks, blueyed!)

3.2.0


  • Enhancement: Add pytest-watch to console scripts to match the name.
  • Bugfix: Use shell=True only for MS Windows when executing py.test (18 - thanks, blueyed!)
  • Bugfix: Use the default fg for STYLE_NORMAL (19 - thanks, blueyed!)

3.1.0


  • Enhancement: Add ability to run with python -m pytest_watch.
  • Bugfix: Revert using pytest directly (abfd40209a124e1555e94dcf03eeb8644465ea62) until it can handle running multiple times (15)

3.0.0


  • Enhancement: Add --poll to work with remote file systems (11 - thanks, aldanor!)
  • Enhancement: Add ability to have multiple watch directories (11 - thanks, aldanor!)
  • Enhancement: Show pytest command being run (11 - thanks, aldanor!)
  • Enhancement: Show command and filenames in color (11 - thanks, aldanor!)
  • Enhancement: Add --ignore to ignore directories from being watched (initial attempt) (11 - thanks, aldanor!)
  • Enhancement: Add ability to forward arguments to pytest with -- (11 - thanks, aldanor!)
  • Enhancement: Add spooling for the case where multiple watch events are triggered simultaneously (11 - thanks, aldanor!)
  • Enhancement: Add --verbose and --quiet for controlling the verbosity (11 - thanks, aldanor!)
  • Bugfix: Exit gracefully when KeyboardInterrupt occurs after the first test run (10 - thanks, carsongee!)

2.0.0


  • Enhancement: Show the detected change, unless --clear is given.
  • Enhancement: Beep by default, unless --nobeep is given.
  • Enhancement: Add --ext to override the list of extensions that trigger re-runs.
  • Bugfix: Unpin requirements
  • Cleanup

1.0.0


  • Enhancement: Add ability to run commands on each pass or fail - (4 - thanks, rakjin!)
  • Bugfix: Error when no directory is provided on OSX (3 - thanks, rakjin!)
  • Use MIT license

0.1.1


  • Bugfix: clear command typo (1 - thanks, casio!)

0.1.0


First public preview release.

pytest-xdist -> 1.15.0

1.15.0


  • new worker_id fixture, returns the id of the worker in a test or fixture.
    Thanks Jared Hellman for the PR.
  • display progress during collection only when in a terminal, similar to pytest 1397 issue.
    Thanks Bruno Oliveira for the PR.
  • fix internal error message when --maxfail is used (62, 65).
    Thanks Collin RM Stocks and Bryan A. Jones for reports and Bruno Oliveira for the PR.

1.14


  • new hook: pytest_xdist_node_collection_finished(node, ids), called when
    a worker has finished collection. Thanks Omer Katz for the request and
    Bruno Oliveira for the PR.
  • fix README display on pypi
  • fix 22: xdist now works if the internal tmpdir plugin is disabled.
    Thanks Bruno Oliveira for the PR.
  • fix 32: xdist now works if looponfail or boxed are disabled.
    Thanks Bruno Oliveira for the PR.

1.13.1


  • fix a regression -n 0 now disables xdist again

1.13


  • extended the tox matrix with the supported py.test versions

  • split up the plugin into 3 plugin's
    to prepare the departure of boxed and looponfail.

    looponfail will be a part of core
    and forked boxed will be replaced
    with a more reliable primitive based on xdist

  • conforming with new pytest-2.8 behavior of returning non-zero when all
    tests were skipped or deselected.

  • new "--max-slave-restart" option that can be used to control maximum
    number of times pytest-xdist can restart slaves due to crashes. Thanks to
    Anatoly Bubenkov for the report and Bruno Oliveira for the PR.

  • release as wheel

  • "-n" option now can be set to "auto" for automatic detection of number
    of cpus in the host system. Thanks Suloev Dmitry for the PR.

1.12


  • fix issue594: properly report errors when the test collection
    is random. Thanks Bruno Oliveira.
  • some internal test suite adaptation (to become forward
    compatible with the upcoming pytest-2.8)

1.11


  • fix pytest/xdist issue485 (also depends on py-1.4.22):
    attach stdout/stderr on --boxed processes that die.
  • fix pytest/xdist issue503: make sure that a node has usually
    two items to execute to avoid scoped fixtures to be torn down
    pre-maturely (fixture teardown/setup is "nextitem" sensitive).
    Thanks to Andreas Pelme for bug analysis and failing test.
  • restart crashed nodes by internally refactoring setup handling
    of nodes. Also includes better code documentation.
    Many thanks to Floris Bruynooghe for the complete PR.

1.10


  • add glob support for rsyncignores, add command line option to pass
    additional rsyncignores. Thanks Anatoly Bubenkov.
  • fix pytest issue382 - produce "pytest_runtest_logstart" event again
    in master. Thanks Aron Curzon.
  • fix pytest issue419 by sending/receiving indices into the test
    collection instead of node ids (which are not neccessarily unique
    for functions parametrized with duplicate values)
  • send multiple "to test" indices in one network message to a slave
    and improve heuristics for sending chunks where the chunksize
    depends on the number of remaining tests rather than fixed numbers.
    This reduces the number of master -> node messages (but not the
    reverse direction)

1.9


  • changed LICENSE to MIT
  • fix duplicate reported test ids with --looponfailing
    (thanks Jeremy Thurgood)
  • fix pytest issue41: re-run tests on all file changes, not just
    randomly select ones like .py/.c.
  • fix pytest issue347: slaves running on top of Python3.2
    will set PYTHONDONTWRITEYBTECODE to 1 to avoid import concurrency
    bugs.

1.8


  • fix pytest-issue93 - use the refined pytest-2.2.1 runtestprotocol
    interface to perform eager teardowns for test items.

1.7


  • fix incompatibilities with pytest-2.2.0 (allow multiple
    pytest_runtest_logreport reports for a test item)

1.6


  • terser collection reporting
  • fix issue34 - distributed testing with -p plugin now works correctly
  • fix race condition in looponfail mode where a concurrent file removal
    could cause a crash

1.5


  • adapt to and require pytest-2.0 changes, rsyncdirs and rsyncignore can now
    only be specified in [pytest] sections of ini files, see "py.test -h"
    for details.
  • major internal refactoring to match the pytest-2.0 event refactoring
    • perform test collection always at slave side instead of at the master
    • make python2/python3 bridging work, remove usage of pickling
  • improve initial reporting by using line-rewriting
  • remove all trailing whitespace from source

1.4


  • perform distributed testing related reporting in the plugin
    rather than having dist-related code in the generic py.test
    distribution
  • depend on execnet-1.0.7 which adds "env1:NAME=value" keys to
    gateway specification strings.
  • show detailed gateway setup and platform information only when
    "-v" or "--verbose" is specified.

1.3


  • fix --looponfailing - it would not actually run against the fully changed
    source tree when initial conftest files load application state.
  • adapt for py-1.3.1's new --maxfailure option

1.2


  • fix issue79: sessionfinish/teardown hooks are now called systematically
    on the slave side
  • introduce a new data input/output mechanism to allow the master side
    to send and receive data from a slave.
  • fix race condition in underlying pickling/unpickling handling
  • use and require new register hooks facility of py.test>=1.3.0
  • require improved execnet>=1.0.6 because of various race conditions
    that can arise in xdist testing modes.
  • fix some python3 related pickling related race conditions
  • fix PyPI description

1.1


  • fix an indefinite hang which would wait for events although no events
    are pending - this happened if items arrive very quickly while
    the "reschedule-event" tried unconditionally avoiding a busy-loop
    and not schedule new work.

1.0


  • moved code out of py-1.1.1 into its own plugin
  • use a new, faster and more sensible model to do load-balancing
    of tests - now no magic "MAXITEMSPERHOST" is needed and load-testing
    works effectively even with very few tests.
  • cleaned up termination handling
  • make -x cause hard killing of test nodes to decrease wait time
    until the traceback shows up on first failure

colorama -> 0.3.6

0.3.6

  • Fix issue 81: fix ValueError when a closed stream was used

0.3.5

  • Bumping version to re-upload a wheel distribution

0.3.4

  • Fix issue 47 and 80 - stream redirection now strips ANSI codes on Linux
  • Fix issue 53 - strip readline markers
  • Fix issue 32 - assign orig_stdout and orig_stderr when initialising
  • Fix issue 57 - Fore.RESET did not reset style of LIGHT_EX colors.
    Fixed by Andy Neff
  • Fix issue 51 - add context manager syntax. Thanks to Matt Olsen.
  • Fix issue 48 - colorama didn't work on Windows when environment
    variable 'TERM' was set.
  • Fix issue 54 - fix pylint errors in client code.
  • Changes to readme and other improvements by Marc Abramowitz and Zearin

0.3.3

  • Fix Google Code issue 13 - support changing the console title with OSC
    escape sequence
  • Fix Google Code issue 16 - Add support for Windows xterm emulators
  • Fix Google Code issue 30 - implement \033[nK (clear line)
  • Fix Google Code issue 49 - no need to adjust for scroll when new position
    is already relative (CSI n A\B\C\D)
  • Fix Google Code issue 55 - erase_data fails on Python 3.x
  • Fix Google Code issue 46 - win32.COORD definition missing
  • Implement \033[0J and \033[1J (clear screen options)
  • Fix default ANSI parameters
  • Fix position after \033[2J (clear screen)
  • Add command shortcuts: colorama.Cursor, colorama.ansi.set_title,
    colorama.ansi.clear_line, colorama.ansi.clear_screen
  • Fix issue 22 - Importing fails for python3 on Windows
  • Thanks to John Szakmeister for adding support for light colors
  • Thanks to Charles Merriam for adding documentation to demos

0.3.2

  • Thanks to Marc Schlaich (schlamar) for a setup.py fix for Python2.5
  • Thanks to Jurko for fix on 64-bit Windows CPython2.5 w/o ctypes
    (Google Code issue 56)
  • Thanks to Remi Rampin for:
    • better github integration, incl rendered README and Travis config.
    • fixed forward slashes in README
  • Thanks to Florian Bruhin for fix when stdout or stderr are None
  • Thanks to Simeon Visser for:
    • closing a file handle using 'with'
    • updating classifiers to include Python 3.3 and 3.4
  • Thanks to Thomas Weininger for fix ValueError on Windows
    (Google Code issue 50)

0.3.1

  • Fixed crash on exit with closed stdout, with thanks to Marc Abramowitz.
  • Now uses setuptools if available, and falls back to distutils if not.
  • setup.py no longer imports anything from colorama source.

0.3.0

  • Move repository to Git, https://github.com/tartley/colorama. (My Mercurial
    repo seemed to be corrupted, I couldn't commit nor view patches of old
    commits, even on fresh checkouts.)
  • Fix always-crash on non-Windows platforms, reported by Matt McCormick.
  • Fix Google Code issue 47, incompatible with pyreadline.

0.2.7

  • Fix problem under 64-bit windows due to ctypes HANDLE size.
    Submitted by the rather magnificent Ben Hoyt.
    This fixes Google Code issue 43

0.2.6

  • Add copyright & licensing info to every file, as requested by a large
    downstream project which has problems making sure that all 3rd party
    contributions have appropriate license.

0.2.5

  • Severeral documentation & demo fixes.

0.2.4

  • Fix to work on Windows 7.
  • Python 3 compatibility in docs and demos.
  • Add handling for 'cursor up' and 'get position' ANSI codes.

0.2.3

  • Split changelog out into separate file.

0.2.2

  • Fix bug which caused init() to raise, introduced in 0.2.1.
  • Remove asserts which cause problems in various circumstances. At least
    some users saw asserts fail on 'success' returned from win32 functions,
    even though the win32 functions appear to have worked correctly.

0.2.1

  • Completely broken: I added a bug which caused init() to raise.
  • Added some documentation for cursor positioning and clear screen to README.
  • Add 'reinit' and 'deinit' functions, as suggested by Charles FOL and
    Romanov DA.

0.2

  • Merge in changes from Daniel Griffith: Add ANSI cursor positioning &
    partial support for clear screen. Patch submitted by Oscar Lester, don't
    send RESET_ALL to non-tty.
  • Demos split into separate files and moved into their own directory.
  • Tweak sys.path in demos so they run against local source, not installed
    version of Colorama.

0.1.18

  • Fix README (no such attr as Fore.DEFAULT, etc), kindly reported by nodakai.

0.1.17

  • Prevent printing of garbage ANSI codes upon installing with pip

0.1.16

  • Re-upload to fix previous error. Make clean now removes old MANIFEST.

0.1.15

  • Completely broken. Distribution was empty due to leftover invalid MANIFEST
    file from building on a different platform.
  • Fix python3 incompatibility kindly reported by G |uumlaut| nter Kolousek

0.1.14

  • Fix hard-coded reset to white-on-black colors. Fore.RESET, Back.RESET
    and Style.RESET_ALL now revert to the colors as they were when init()
    was called. Some lessons hopefully learned about testing prior to release.

0.1.13

  • Completely broken: barfed when installed using pip.

0.1.12

  • Completely broken: contained no source code. double oops.

0.1.11

  • Completely broken: fatal import errors on Ubuntu. oops.

0.1.10

  • Stop emulating 'bright' text with bright backgrounds.
  • Display 'normal' text using win32 normal foreground instead of bright.
  • Drop support for 'dim' text.

0.1.9

  • Fix incompatibility with Python 2.5 and earlier.
  • Remove setup.py dependency on setuptools, now uses stdlib distutils.

0.1.8

  • Fix ghastly errors all over the place on Ubuntu.
  • Add init kwargs 'convert' and 'strip', which supercede the old 'wrap'.

0.1.7

  • Python 3 compatible.
  • Fix: Now strips ansi on windows without necessarily converting it to
    win32 calls (eg. if output is not a tty.)
  • Fix: Flaky interaction of interleaved ansi sent to stdout and stderr.
  • Improved demo.sh (hg checkout only.)

0.1.6

  • Fix ansi sequences with no params now default to parmlist of [0].
  • Fix flaky behaviour of autoreset and reset_all atexit.
  • Fix stacking of repeated atexit calls - now just called once.
  • Fix ghastly import problems while running tests.
  • 'demo.py' (hg checkout only) now demonstrates autoreset and reset atexit.
  • Provide colorama.VERSION, used by setup.py.
  • Tests defanged so they no longer actually change terminal color when run.

0.1.5

  • Now works on Ubuntu.

0.1.4

  • Implemented RESET_ALL on application exit

0.1.3

  • Implemented init(wrap=False)

0.1.2

  • Implemented init(autoreset=True)

0.1.1

  • Minor tidy

0.1

  • Works on Windows for foreground color, background color, bright or dim

.. |uumlaut| unicode:: U+00FC .. u with umlaut
:trim:

pytest-instafail -> 0.3.0

0.3.0

^^^^^^^^^^^^^^^^^^^^^^^

  • Added support for Python 3.4
  • Added support for py.test 2.6
  • Fixed failing tests on py.test 2.6

0.2.0

^^^^^^^^^^^^^^^^^^^^^

  • Dropped support for Python 2.5.
  • Fixed stacktrace printed twice when using PDB.
  • Fixed internal error when a test marked as xfailing unexpectedly passes
    (David Szotten).

0.1.1

^^^^^^^^^^^^^^^^^^^^^^^^

  • Made pytest-instafail compatible with pytest-xdist_'s test parallelization
    (Ronny Pfannschmidt).

0.1.0

^^^^^^^^^^^^^^^^^^^^^

  • Initial public release

.. _pytest-xdist: http://pypi.python.org/pypi/pytest-xdist

pytest-flake8 -> 0.6

0.6


  • Update for flake8 3.x

0.5


  • Fix rendering of rST; from Ken Dreyer

0.4


  • Really fix cache usage; had a comparison between tuple and
    list which always failed

0.3


  • Use integrated pytest cache instead of separate pytest-cache
    module (which is now integrated)
  • Use documented hooks for start and end of a test run

0.2


  • Added ability to override maximum line length

0.1


  • initial release

wrapt -> 1.10.8

1.10.8


Bugs Fixed

  • Ensure that inspect.getargspec() is only used with Python 2.6 where
    required, as function has been removed in Python 3.6.

1.10.7


Bugs Fixed

  • The mod operator '%' was being incorrectly proxied in Python variant of
    object proxy to the xor operator '^'.

1.10.6


Bugs Fixed

  • Registration of post import hook would fail with an exception if
    registered after another import hook for the same target module had been
    registered and the target module also imported.

New Features

  • Support for testing with Travis CI added to repository.

1.10.5


Bugs Fixed

  • Post import hook discovery was not working correctly where multiple
    target modules were registered in the same entry point list. Only the
    callback for the last would be called regardless of the target module.
  • If a WeakFunctionProxy wrapper was used around a method of a class
    which was decorated using a wrapt decorator, the decorator wasn't being
    invoked when the method was called via the weakref proxy.

Features Changed

  • The register_post_import_hook() function, modelled after the
    function of the same name in PEP-369 has been extended to allow a string
    name to be supplied for the import hook. This needs to be of the form
    module::function and will result in an import hook proxy being used
    which will only load and call the function of the specified moduled when
    the import hook is required. This avoids needing to load the code needed
    to operate on the target module unless required.

1.10.4


Bugs Fixed

  • Fixup botched package version number from 1.10.3 release.

1.10.3


Bugs Fixed

  • Post import hook discovery from third party modules declared via
    setuptools entry points was failing due to typo in temporary variable
    name. Also added the discover_post_import_hooks() to the public API
    as was missing.

Features Changed

  • To ensure parity between pure Python and C extension variants of the
    ObjectProxy class, allow the __wrapped__ attribute to be set
    in a derived class when the ObjectProxy.__init__() method hasn't
    been called.

1.10.2


Bugs Fixed

  • When creating a derived ObjectProxy, if the base class __init__()
    method wasn't called and the the __wrapped__ attribute was accessed,
    in the pure Python implementation a recursive call of __getattr__()
    would occur and the maximum stack depth would be reached and an exception
    raised.
  • When creating a derived ObjectProxy, if the base class __init__()
    method wasn't called, in the C extension implementation, if that instance
    was then used in a binary arithmetic operation the process would crash.

1.10.1


Bugs Fixed

  • When using FunctionWrapper around a method of an existing instance of
    a class, rather than on the type, then a memory leak could occur in two
    different scenarios.

    The first issue was that wrapping a method on an instance of a class was
    causing an unwanted reference to the class meaning that if the class type
    was transient, such as it is being created inside of a function call, the
    type object would leak.

    The second issue was that wrapping a method on an instance of a class and
    then calling the method was causing an unwanted reference to the instance
    meaning that if the instance was transient, it would leak.

    This was only occuring when the C extension component for the
    wrapt module was being used.

1.10.0


New Features

  • When specifying an adapter for a decorator, it is now possible to pass
    in, in addition to passing in a callable, a tuple of the form which
    is returned by inspect.getargspec(), or a string of the form which
    is returned by inspect.formatargspec(). In these two cases the
    decorator will automatically compile a stub function to use as the
    adapter. This eliminates the need for a caller to generate the stub
    function if generating the signature on the fly.

    ::

    def argspec_factory(wrapped):
    argspec = inspect.getargspec(wrapped)

       args = argspec.args[1:]
       defaults = argspec.defaults and argspec.defaults[-len(argspec.args):]
    
       return inspect.ArgSpec(args, argspec.varargs,
               argspec.keywords, defaults)
    

    def session(wrapped):
    wrapt.decorator(adapter=argspec_factory(wrapped))
    def _session(wrapped, instance, args, kwargs):
    with transaction() as session:
    return wrapped(session, _args, *_kwargs)

       return _session(wrapped)
    

    This mechanism and the original mechanism to pass a function, meant
    that the adapter function had to be created in advance. If the adapter
    needed to be generated on demand for the specific function to be
    wrapped, then it would have been necessary to use a closure around
    the definition of the decorator as above, such that the generator could
    be passed in.

    As a convenience, instead of using such a closure, it is also now
    possible to write:

    ::

    def argspec_factory(wrapped):
    argspec = inspect.getargspec(wrapped)

       args = argspec.args[1:]
       defaults = argspec.defaults and argspec.defaults[-len(argspec.args):]
    
       return inspect.ArgSpec(args, argspec.varargs,
               argspec.keywords, defaults)
    

    wrapt.decorator(adapter=wrapt.adapter_factory(argspec_factory))
    def _session(wrapped, instance, args, kwargs):
    with transaction() as session:
    return wrapped(session, _args, *_kwargs)

    The result of wrapt.adapter_factory() will be recognised as indicating
    that the creation of the adapter is to be deferred until the decorator is
    being applied to a function. The factory function for generating the
    adapter function or specification on demand will be passed the function
    being wrapped by the decorator.

    If wishing to create a library of routines for generating adapter
    functions or specifications dynamically, then you can do so by creating
    classes which derive from wrapt.AdapterFactory as that is the type
    which is recognised as indicating lazy evaluation of the adapter
    function. For example, wrapt.adapter_factory() is itself implemented
    as:

    ::

    class DelegatedAdapterFactory(wrapt.AdapterFactory):
    def init(self, factory):
    super(DelegatedAdapterFactory, self).init()
    self.factory = factory
    def call(self, wrapped):
    return self.factory(wrapped)

    adapter_factory = DelegatedAdapterFactory

Bugs Fixed

  • The inspect.signature() function was only added in Python 3.3.
    Use fallback when doesn't exist and on Python 3.2 or earlier Python 3
    versions.

    Note that testing is only performed for Python 3.3+, so it isn't
    actually known if the wrapt package works on Python 3.2.

1.9.0


Features Changed

  • When using wrapt.wrap_object(), it is now possible to pass an
    arbitrary object in addition to a module object, or a string name
    identifying a module. Similar for underlying wrapt.resolve_path()
    function.

Bugs Fixed

  • It is necessary to proxy the special __weakref__ attribute in the
    pure Python object proxy else using inspect.getmembers() on a
    decorator class will fail.
  • The FunctionWrapper class was not passing through the instance
    correctly to the wrapper function when it was applied to a method of an
    existing instance of a class.
  • The FunctionWrapper was not always working when applied around a
    method of a class type by accessing the method to be wrapped using
    getattr(). Instead it is necessary to access the original unbound
    method from the class __dict__. Updated the FunctionWrapper to
    work better in such situations, but also modify resolve_path() to
    always grab the class method from the class __dict__ when wrapping
    methods using wrapt.wrap_object() so wrapping is more predictable.
    When doing monkey patching wrapt.wrap_object() should always be
    used to ensure correct operation.
  • The AttributeWrapper class used internally to the function
    wrap_object_attribute() had wrongly named the __delete__ method
    for the descriptor as __del__.

1.8.0


Features Changed

  • Previously using wrapt.decorator on a class type didn't really yield
    anything which was practically useful. This is now changed and when
    applied to a class an instance of the class will be automatically
    created to be used as the decorator wrapper function. The requirement
    for this is that the call() method be specified in the style as
    would be done for the decorator wrapper function.

    ::

    wrapt.decorator
    class mydecoratorclass(object):
    def init(self, arg=None):
    self.arg = arg
    def call(self, wrapped, instance, args, kwargs):
    return wrapped(_args, *_kwargs)

    mydecoratorclass
    def function():
    pass

    If the resulting decorator class is to be used with no arguments, the
    init() method of the class must have all default arguments. These
    arguments can be optionally supplied though, by using keyword arguments
    to the resulting decorator when applied to the function to be decorated.

    ::

    mydecoratorclass(arg=1)
    def function():
    pass

1.7.0


New Features

  • Provide wrapt.getcallargs() for determining how arguments mapped to a
    wrapped function. For Python 2.7 this is actually inspect.getcallargs()
    with a local copy being used in the case of Python 2.6.
  • Added wrapt.wrap_object_attribute() as a way of wrapping or otherwise
    modifying the result of trying to access the attribute of an object
    instance. It works by adding a data descriptor with the same name as
    the attribute, to the class type, allowing reading of the attribute
    to be intercepted. It does not affect updates to or deletion of the
    attribute.

Bugs Fixed

  • Need to explicitly proxy special methods bytes(), reversed()
    and round() as they are only looked up on the class type and not
    the instance, so can't rely on getattr() fallback.
  • Raise more appropriate TypeError, with corresponding message, rather
    than IndexError, when a decorated instance or class method is called via
    the class but the required 1st argument of the instance or class is not
    supplied.

1.6.0


Bugs Fixed

  • The ObjectProxy class would return that the call() method existed
    even though the wrapped object didn't have one. Similarly, callable()
    would always return True even if the wrapped object was not callable.

    This resulted due to the existance of the call() method on the
    wrapper, required to support the possibility that the wrapped object
    may be called via the proxy object even if it may not turn out that
    the wrapped object was callable.

    Because checking for the existance of a call() method or using
    callable() can sometimes be used to indirectly infer the type of an
    object, this could cause issues. To ensure that this now doesn't
    occur, the ability to call a wrapped object via the proxy object has
    been removed from ObjectProxy. Instead, a new class CallableObjectProxy
    is now provided, with it being necessary to make a conscious choice as
    to which should be used based on whether the object to be wrapped is
    in fact callable.

    Note that neither before this change, or with the introduction of the
    class CallableObjectProxy, does the object proxy perform binding. If
    binding behaviour is required it still needs to be implemented
    explicitly to match the specific requirements of the use case.
    Alternatively, the FunctionWrapper class should be used which does
    implement binding, but also enforces a wrapper mechanism for
    manipulating what happens at the time of the call.

1.5.1


Bugs Fixed

  • Instance method locking for the synchronized decorator was not correctly
    locking on the instance but the class, if a synchronized class method
    had been called prior to the synchronized instance method.

1.5.0


New Features

  • Enhanced wrapt.transient_function_wrapper so it can be applied to
    instance methods and class methods with the self/cls argument being
    supplied correctly. This allows instance and class methods to be used for
    this type of decorator, with the instance or class type being able to
    be used to hold any state required for the decorator.

Bugs Fixed

  • If the wrong details for a function to be patched was given to the
    decorator wrapt.transient_function_wrapper, the exception indicating
    this was being incorrectly swallowed up and mutating to a different
    more obscure error about local variable being access before being set.

1.4.2


Bugs Fixed

  • A process could crash if the C extension module was used and when using
    the ObjectProxy class a reference count cycle was created that required
    the Python garbage collector to kick in to break the cycle. This was
    occuring as the C extension had not implemented GC support in the
    ObjectProxy class correctly.

1.4.1


Bugs Fixed

  • Overriding wrapped attribute directly on any wrapper more than once
    could cause corruption of memory due to incorrect reference count
    decrement.

1.4.0


New Features

  • Enhanced wrapt.decorator and wrapt.function_wrapper so they can be
    applied to instance methods and class methods with the self/cls argument
    being supplied correctly. This allows instance and class methods to be
    used as decorators, with the instance or class type being able to be used
    to hold any state required for the decorator.

Bugs Fixed

  • Fixed process crash in extension when the wrapped object passed as first
    argument to FunctionWrapper did not have a tp_descr_get callback for the
    type at C code level. Now raised an AttributeError exception in line with
    what Python implementation does.

1.3.1


Bugs Fixed

  • The discover_post_import_hooks() function had not been added to the
    top level wrapt module.

1.3.0


New Features

  • Added a transient_function_wrapper decorator for applying a wrapper
    function around a target function only for the life of a single function
    call. The decorator is useful for performing mocking or pass through
    data validation/modification when doing unit testing of packages.

1.2.1


Bugs Fixed

  • In C implementation, not dealing with unbound method type creation
    properly which would cause later problems when calling instance method
    via the class type in certain circumstances. Introduced problem in 1.2.0.
  • Eliminated compiler warnings due to missing casts in C implementation.

1.2.0


New Features

  • Added an 'enabled' option to decorator and FunctionWrapper which can
    be provided a boolean, or a function returning a boolean to allow the
    work of the decorator to be disabled dynamically. When a boolean, is
    used for decorator, the wrapper will not even be applied if 'enabled'
    is False. If a function, then will be called prior to wrapper being
    called and if returns False, then original wrapped function called
    directly rather than the wrapper being called.
  • Added in an implementation of a post import hook mechanism in line with
    that described in PEP 369.
  • Added in helper functions specifically designed to assist in performing
    monkey patching of existing code.

Features Changed

  • Collapsed functionality of _BoundMethodWrapper into _BoundFunctionWrapper
    and renamed the latter to BoundFunctionWrapper. If deriving from the
    FunctionWrapper class and needing to override the type of the bound
    wrapper, the class attribute __bound_function_wrapper__ should be set
    in the derived FunctionWrapper class to the replacement type.

Bugs Fixed

  • When creating a custom proxy by deriving from ObjectProxy and the custom
    proxy needed to override getattr(), it was not possible to called the
    base class ObjectProxy.getattr() when the C implementation of
    ObjectProxy was being used. The derived class getattr() could also
    get ignored.
  • Using inspect.getargspec() now works correctly on bound methods when an
    adapter function can be provided to decorator.

1.1.3


New Features

  • Added a _self_parent attribute to FunctionWrapper and bound variants.
    For the FunctionWrapper the value will always be None. In the case of the
    bound variants of the function wrapper, the attribute will refer back
    to the unbound FunctionWrapper instance. This can be used to get a back
    reference to the parent to access or cache data against the persistent
    function wrapper, the bound wrappers often being transient and only
    existing for the single call.

Improvements

  • Use interned strings to optimise name comparisons in the setattro()
    method of the C implementation of the object proxy.

Bugs Fixed

  • The pypy interpreter is missing operator.index() so proxying of that
    method in the object proxy would fail. This is a bug in pypy which is
    being addressed. Use operator.index() instead which pypy does provide
    and which also exists for CPython.
  • The pure Python implementation allowed the wrapped attribute to be
    deleted which could cause problems. Now raise a TypeError exception.
  • The C implementation of the object proxy would crash if an attempt was
    made to delete the wrapped attribute from the object proxy. Now raise a
    TypeError exception.

1.1.2


Improvements

  • Reduced performance overhead from previous versions. Most notable in the
    C implementation. Benchmark figures have been updated in documentation.

1.1.1


Bugs Fixed

  • Python object memory leak was occuring due to incorrect increment of
    object reference count in C implementation of object proxy when an
    instance method was called via the class and the instance passed in
    explicitly.
  • In place operators in pure Python object proxy for idiv and
    itruediv were not replacing the wrapped object with the result
    of the operation on the wrapped object.
  • In place operators in C implementation of Python object proxy were
    not replacing the wrapped object with the result of the operation on the
    wrapped object.

1.1.0


New Features

  • Added a synchronized decorator for performing thread mutex locking on
    functions, object instances or classes. This is the same decorator as
    covered as an example in the wrapt documentation.
  • Added a WeakFunctionProxy class which can wrap references to instance
    methods as well as normal functions.
  • Exposed from the C extension the classes _FunctionWrapperBase,
    _BoundFunctionWrapper and _BoundMethodWrapper so that it is possible to
    create new variants of FunctionWrapper in pure Python code.

Bugs Fixed

  • When deriving from ObjectProxy, and the C extension variant
    was being used, if a derived class overrode new() and tried to access
    attributes of the ObjectProxy created using the base class new()
    before init() was called, then an exception would be raised
    indicating that the 'wrapper has not been initialised'.
  • When deriving from ObjectProxy, and the C extension variant
    was being used, if a derived class init() attempted to update
    attributes, even the special 'self' attributed before calling the base
    class init() methid, then an exception would be raised indicating
    that the 'wrapper has not been initialised'.

1.0.0


Initial release.

click -> 6.6

6.5


(bugfix release; not yet released)

  • Fix bug in click.Path where it would crash when passed a -. See 551.

6.4


(bugfix release; released on March 24th 2016)

  • Fix bug in bash completion where click would discard one or more trailing
    arguments. See 471.

6.3


(bugfix release; released on February 22 2016)

  • Fix argument checks for interpreter invoke with -m and -c
    on Windows.
  • Fixed a bug that cased locale detection to error out on Python 3.

6.2


(bugfix release, released on November 27th 2015)

  • Correct fix for hidden progress bars.

6.1


(bugfix release, released on November 27th 2015)

  • Resolved an issue with invisible progress bars no longer rendering.
  • Disable chain commands with subcommands as they were inherently broken.
  • Fix MissingParameter not working without parameters passed.

6.0


(codename "pow pow", released on November 24th 2015)

  • Optimized the progressbar rendering to not render when it did not
    actually change.
  • Explicitly disallow nargs=-1 with a set default.
  • The context is now closed before it's popped from the stack.
  • Added support for short aliases for the false flag on toggles.
  • Click will now attempt to aid you with debugging locale errors
    better by listing with the help of the OS what locales are
    available.
  • Click used to return byte strings on Python 2 in some unit-testing
    situations. This has been fixed to correctly return unicode strings
    now.
  • For Windows users on Python 2, Click will now handle Unicode more
    correctly handle Unicode coming in from the system. This also has
    the disappointing side effect that filenames will now be always
    unicode by default in the Path type which means that this can
    introduce small bugs for code not aware of this.
  • Added a type parameter to Path to force a specific string type
    on the value.
  • For users running Python on Windows the echo) and prompt functions
    now work with full unicode functionality in the Python windows console
    by emulating an output stream. This also applies to getting the
    virtual output and input streams via click.get_text_stream(...).
  • Unittests now always force a certain virtual terminal width.
  • Added support for allowing dashes to indicate standard streams to the
    Path type.
  • Multi commands in chain mode no longer propagate arguments left over
    from parsing to the callbacks. It's also now disallowed through an
    exception when optional arguments are attached to multi commands if chain
    mode is enabled.
  • Relaxed restriction that disallowed chained commands to have other
    chained commands as child commands.
  • Arguments with positive nargs can now have defaults implemented.
    Previously this configuration would often result in slightly unexpected
    values be returned.

5.1


(bugfix release, released on 17th August 2015)

  • Fix a bug in pass_obj that would accidentally pass the context too.

5.0


(codename "tok tok", released on 16th August 2015)

  • Removed various deprecated functionality.
  • Atomic files now only accept the w mode.
  • Change the usage part of help output for very long commands to wrap
    their arguments onto the next line, indented by 4 spaces.
  • Fix a bug where return code and error messages were incorrect when
    using CliRunner.
  • added get_current_context.
  • added a meta dictionary to the context which is shared across the
    linked list of contexts to allow click utilities to place state there.
  • introduced Context.scope.
  • The echo function is now threadsafe: It calls the write method of the
    underlying object only once.
  • prompt(hide_input=True) now prints a newline on ^C.
  • Click will now warn if users are using unicode_literals.
  • Click will now ignore the PAGER environment variable if it is empty or
    contains only whitespace.
  • The click-contrib GitHub organization was created.

4.1


(bugfix release, released on July 14th 2015)

  • Fix a bug where error messages would include a trailing None string.
  • Fix a bug where Click would crash on docstrings with trailing newlines.
  • Support streams with encoding set to None on Python 3 by barfing with
    a better error.
  • Handle ^C in less-pager properly.
  • Handle return value of None from sys.getfilesystemencoding
  • Fix crash when writing to unicode files with click.echo.
  • Fix type inference with multiple options.

4.0


(codename "zoom zoom", released on March 31st 2015)

  • Added color parameters to lots of interfaces that directly or indirectly
    call into echoing. This previously was always autodetection (with the
    exception of the echo_via_pager function). Now you can forcefully
    enable or disable it, overriding the auto detection of Click.
  • Added an UNPROCESSED type which does not perform any type changes which
    simplifies text handling on 2.x / 3.x in some special advanced usecases.
  • Added NoSuchOption and BadOptionUsage exceptions for more generic
    handling of errors.
  • Added support for handling of unprocessed options which can be useful in
    situations where arguments are forwarded to underlying tools.
  • Added max_content_width parameter to the context which can be used to
    change the maximum width of help output. By default Click will not format
    content for more than 80 characters width.
  • Added support for writing prompts to stderr.
  • Fix a bug when showing the default for multiple arguments.
  • Added support for custom subclasses to option and argument.
  • Fix bug in clear() on Windows when colorama is installed.
  • Reject nargs=-1 for options properly. Options cannot be variadic.
  • Fixed an issue with bash completion not working properly for commands with
    non ASCII characters or dashes.
  • Added a way to manually update the progressbar.
  • Changed the formatting of missing arguments. Previously the internal
    argument name was shown in error messages, now the metavar is shown if
    passed. In case an automated metavar is selected, it's stripped of
    extra formatting first.

3.3


(bugfix release, released on September 8th 2014)

  • Fixed an issue with error reporting on Python 3 for invalid forwarding
    of commands.

3.2


(bugfix release, released on August 22nd 2014)

  • Added missing err parameter forwarding to the secho function.
  • Fixed default parameters not being handled properly by the context
    invoke method. This is a backwards incompatible change if the function
    was used improperly. See :ref:upgrade-to-3.2 for more information.
  • Removed the invoked_subcommands attribute largely. It is not possible
    to provide it to work error free due to how the parsing works so this
    API has been deprecated. See :ref:upgrade-to-3.2 for more information.
  • Restored the functionality of invoked_subcommand which was broken as
    a regression in 3.1.

3.1


(bugfix release, released on August 13th 2014)

  • Fixed a regression that caused contexts of subcommands to be
    created before the parent command was invoked which was a
    regression from earlier Click versions.

3.0


(codename "clonk clonk", released on August 12th 2014)

  • formatter now no longer attempts to accomodate for terminals
    smaller than 50 characters. If that happens it just assumes
    a minimal width.
  • added a way to not swallow exceptions in the test system.
  • added better support for colors with pagers and ways to
    override the autodetection.
  • the CLI runner's result object now has a traceback attached.
  • improved automatic short help detection to work better with
    dots that do not terminate sentences.
  • when definining options without actual valid option strings
    now, Click will give an error message instead of silently
    passing. This should catch situations where users wanted to
    created arguments instead of options.
  • Restructured Click internally to support vendoring.
  • Added support for multi command chaining.
  • Added support for defaults on options with multiple and
    options and arguments with nargs != 1.
  • label passed to progressbar is no longer rendered with
    whitespace stripped.
  • added a way to disable the standalone mode of the main
    method on a Click command to be able to handle errors better.
  • added support for returning values from command callbacks.
  • added simplifications for printing to stderr from echo.
  • added result callbacks for groups.
  • entering a context multiple times defers the cleanup until
    the last exit occurs.
  • added open_file.

2.6


(bugfix release, released on August 11th 2014)

  • Fixed an issue where the wrapped streams on Python 3 would be reporting
    incorrect values for seekable.

2.5


(bugfix release, released on July 28th 2014)

  • Fixed a bug with text wrapping on Python 3.

2.4


(bugfix release, released on July 4th 2014)

  • Corrected a bug in the change of the help option in 2.3.

2.3


(bugfix release, released on July 3rd 2014)

  • Fixed an incorrectly formatted help record for count options.'
  • Add support for ansi code stripping on Windows if colorama
    is not available.
  • restored the Click 1.0 handling of the help parameter for certain
    edge cases.

2.2


(bugfix release, released on June 26th 2014)

  • fixed tty detection on PyPy.
  • fixed an issue that progress bars were not rendered when the
    context manager was entered.

2.1


(bugfix release, released on June 14th 2014)

  • fixed the :func:launch function on windows.
  • improved the colorama support on windows to try hard to not
    screw up the console if the application is interrupted.
  • fixed windows terminals incorrectly being reported to be 80
    characters wide instead of 79
  • use colorama win32 bindings if available to get the correct
    dimensions of a windows terminal.
  • fixed an issue with custom function types on Python 3.
  • fixed an issue with unknown options being incorrectly reported
    in error messages.

2.0


(codename "tap tap tap", released on June 6th 2014)

  • added support for opening stdin/stdout on Windows in
    binary mode correctly.
  • added support for atomic writes to files by going through
    a temporary file.
  • introduced :exc:BadParameter which can be used to easily perform
    custom validation with the same error messages as in the type system.
  • added :func:progressbar; a function to show progress bars.
  • added :func:get_app_dir; a function to calculate the home folder
    for configs.
  • Added transparent handling for ANSI codes into the :func:echo
    function through colorama.
  • Added :func:clear function.
  • Breaking change: parameter callbacks now get the parameter object
    passed as second argument. There is legacy support for old callbacks
    which will warn but still execute the script.
  • Added :func:style, :func:unstyle and :func:secho for ANSI
    styles.
  • Added an :func:edit function that invokes the default editor.
  • Added an :func:launch function that launches browsers and applications.
  • nargs of -1 for arguments can now be forced to be a single item through
    the required flag. It defaults to not required.
  • setting a default for arguments now implicitly makes it non required.
  • changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.
  • added basic support for bash completion.
  • added :func:getchar to fetch a single character from the terminal.
  • errors now go to stderr as intended.
  • fixed various issues with more exotic parameter formats like DOS/Windows
    style arguments.
  • added :func:pause which works similar to the Windows pause cmd
    built-in but becomes an automatic noop if the application is not run
    through a terminal.
  • added a bit of extra information about missing choice parameters.
  • changed how the help function is implemented to allow global overriding
    of the help option.
  • added support for token normalization to implement case insensitive handling.
  • added support for providing defaults for context settings.

1.1


(bugfix release, released on May 23rd 2014)

  • fixed a bug that caused text files in Python 2 to not accept
    native strings.

1.0


(no codename, released on May 21st 2014)

  • Initial release.

Once you have closed this pull request, I'll create seperate pull requests for every update as soon as I find them.

That's it for now!

Happy merging! 🤖

@poncki poncki changed the title Initial Update pin Aug 18, 2016
@poncki poncki closed this Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment