* Don't flag attributes as unused if they are used as global variables in
another module.
* Don't consider "True" and "False" variable names.
* Abort with error message when invoked on .pyc files.
This means we can remove the whitelisted globals in run_vulture.py and
the associated xfailing test.
We also needed to adjust run_vulture.py slightly as the file attribute
got renamed to filename.
- 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
flake8 2.6.0
------------
- Switch to pycodestyle as all future pep8 releases will use that
package name
- Allow for Windows users on select versions of Python to use --jobs and
multiprocessing
- Update bounds on McCabe
- Update bounds on PyFlakes and blacklist known broken versions
- Handle new PyFlakes warning with a new error code: F405
flake8-copyright 0.1.1
----------------------
- Set line & column to 1,1 to avoid a flake8 error
- Support multi-year copyright notices
flake8-docstrings 0.2.8
-----------------------
- Try to import pydocstyle (not pycodestyle) as pep257
- Import either pycodestyle or pep8 to use stdin_get_value. This fixes
the problem for newer Flake8’s (2.6.0+) and older ones.
pycodestyle 2.0.0
-----------------
Announcements:
- Repository renamed to `pycodestyle`
- Added joint Code of Conduct as member of PyCQA
Changes:
- Added tox test support for Python 3.5 and pypy3
- Added check E275 for whitespace on `from ... import ...` lines
- Added W503 to the list of codes ignored by default ignore list
- Removed use of project level `.pep8` configuration file
Bugs:
- Fixed bug with treating `~` operator as binary
- Identify binary operators as unary
Other changes
-------------
- Unpin mccabe as the flake8 requirement got updated
- Pin pep8 as an older version gets installed otherwise
- DIsable D403 warning (false-positivies)
- Added ParserElement.split() generator method, similar to re.split().
Includes optional arguments maxsplit (to limit the number of splits),
and includeSeparators (to include the separating matched text in the
returned output, default=False).
- Added a new parse action construction helper tokenMap, which will
apply a function and optional arguments to each element in a
ParseResults. So this parse action:
def lowercase_all(tokens):
return [str(t).lower() for t in tokens]
OneOrMore(Word(alphas)).setParseAction(lowercase_all)
can now be written:
OneOrMore(Word(alphas)).setParseAction(tokenMap(str.lower))
Also simplifies writing conversion parse actions like:
integer = Word(nums).setParseAction(lambda t: int(t[0]))
to just:
integer = Word(nums).setParseAction(tokenMap(int))
If additional arguments are necessary, they can be included in the
call to tokenMap, as in:
hex_integer = Word(hexnums).setParseAction(tokenMap(int, 16))
- Added more expressions to pyparsing_common:
. IPv4 and IPv6 addresses (including long, short, and mixed forms
of IPv6)
. MAC address
. ISO8601 date and date time strings (with named fields for year, month, etc.)
. UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
. hex integer (returned as int)
. fraction (integer '/' integer, returned as float)
. mixed integer (integer '-' fraction, or just fraction, returned as float)
. stripHTMLTags (parse action to remove tags from HTML source)
. parse action helpers convertToDate and convertToDatetime to do custom parse
time conversions of parsed ISO8601 strings
- runTests now returns a two-tuple: success if all tests succeed,
and an output list of each test and its output lines.
- Added failureTests argument (default=False) to runTests, so that
tests can be run that are expected failures, and runTests' success
value will return True only if all tests *fail* as expected. Also,
parseAll now defaults to True.
- New example numerics.py, shows samples of parsing integer and real
numbers using locale-dependent formats:
4.294.967.295,000
4 294 967 295,000
4,294,967,295.000
pylint:
* config files with BOM markers can now be read.
* epylint.py_run does not crash on big files, using .communicate()
instead of .wait()
astroid:
* Fix a crash which occurred when the class of a namedtuple could not be
inferred.
* Functional form of enums support accessing values through __call__.
* Brain tips for the ssl library.
* Setuptools is now required to build CherryPy. Pure distutils installs
are no longer supported. This change allows CherryPy to depend on
other packages and re-use code from them. It's still possible to
install pre-built CherryPy packages (wheels) using pip without
Setuptools.
* Back out changes attempting to fix redirects with Unicode URLs, as it
also had the unintended consequence of causing the 'Location' to be
``bytes`` on Python 3.
* ``cherrypy.expose`` now works on classes.
* ``cherrypy.config`` decorator is now used throughout the code
internally.
* ``@cherrypy.expose`` now will also set the exposed
attribute on a class.
* Rewrote all tutorials and internal usage to prefer
the decorator usage of ``expose`` rather than setting
the attribute explicitly.
* Removed test-specific code from tutorials.
* Fix for filenames with semicolons and quote characters in filenames
found in headers.
* Added decorator for registering tools.
* Use simpler encoding rules for SCRIPT_NAME and PATH_INFO environment
variables in CherryPy Tree allowing non-latin characters to pass even
when ``wsgi.version`` is not ``u.0``.
* Ensure that multipart fields are decoded even when cached in a file.
- From this version onward, pytest-mock is licensed under the MIT
license.
- Now the plugin also adds introspection information on differing call
arguments when calling helper methods such as assert_called_once_with.
The extra introspection information is similar to pytest's and can be
disabled with the mock_traceback_monkeypatch option.
- mocker.stub() now allows passing in the name for the constructed Mock
object instead of having to set it using the internal _mock_name
attribute directly. This is useful for debugging as the name is used
in the mock's repr string as well as related assertion failure
messages.
- Monkey patching mock module for friendlier tracebacks is automatically
disabled with the --tb=native option. The underlying mechanism used to
suppress traceback entries from mock module does not work with that
option anyway plus it generates confusing messages on Python 3.5 due
to exception chaining.
- mock.call is now aliased as mocker.call for convenience.
* skip tests where one parameterize dimension was empty
* Fix Xfail does not work with condition keyword argument.
* Fix win32 path issue when puttinging custom config file with absolute
path in ``pytest.main("-c your_absolute_path")``.
* Fix maximum recursion depth detection when raised error class is not
aware of unicode/encoded bytes.
* Fix ``pytest.mark.skip`` mark when used in strict mode.
* Minor improvements and fixes to the documentation.
* Fix ``--fixtures`` to show all fixture definitions as opposed to just
one per fixture name.
- Do not ignore imports which are present and have been added after the
minimum version
- Ignore imports which became mandatory with the minimum version
- Add two older future imports
- Issue an error when a future import does not exist
- Define which is the oldest Python version to be supported so that
already mandatory features can be ignored and not yet supported
features default to forbidden (ignoring the lower error code).
- Use return code of 1 if errors occurred
While this makes things a little more complicated and means we'll need to use
`-r` to recreate tox environments, it has several advantages:
- Full support from requires.io (including PRs)
- Workaround for https://bitbucket.org/hpk42/tox/issues/332/ so we can update
virtualenv/pip