Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Initial Update #1

Closed
wants to merge 34 commits into from
Closed

Initial Update #1

wants to merge 34 commits into from

Conversation

pyup-bot
Copy link
Collaborator

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.

coverage 4.4.1 » 4.4.2 PyPI | Changelog | Repo
coveralls 1.1 » 1.2.0 PyPI | Changelog | Repo
factory_boy 2.8.1 » 2.9.2 PyPI | Changelog | Repo
py 1.4.34 » 1.5.2 PyPI | Changelog | Repo | Docs
pytest 3.1.1 » 3.3.2 PyPI | Changelog | Repo | Homepage
transifex-client 0.12.4 » 0.13.0 PyPI | Changelog | Homepage
CairoSVG 2.0.3 » 2.1.3 PyPI | Changelog | Homepage
Django 1.11.2 » 2.0.1 PyPI | Changelog | Homepage
Markdown 2.6.8 » 2.6.11 PyPI | Repo
Pillow 4.1.1 » 5.0.0 PyPI | Changelog | Homepage
PyJWT 1.5.0 » 1.5.3 PyPI | Changelog | Repo
Unidecode 0.4.20 » 1.0.22 PyPI | Changelog
amqp 2.1.4 » 2.2.2 PyPI | Changelog | Repo
asana 0.6.5 » 0.6.7 PyPI | Repo
bleach 2.0.0 » 2.1.2 PyPI | Changelog | Repo | Docs
celery 4.0.2 » 4.1.0 PyPI | Changelog | Homepage | Docs
cryptography 1.9 » 2.1.4 PyPI | Changelog | Repo
django-ipware 1.1.6 » 2.0.1 PyPI | Changelog | Repo
django-jinja 2.3.1 » 2.4.1 PyPI | Changelog | Repo
django-picklefield 0.3.2 » 1.0.0 PyPI | Repo
easy-thumbnails 2.4.1 » 2.5 PyPI | Changelog | Repo | Docs
jinja2 2.9.6 » 2.10 PyPI | Homepage
lxml 3.8.0 » 4.1.1 PyPI | Changelog | Homepage | Bugtracker
premailer 3.0.1 » 3.1.1 PyPI | Repo
psycopg2 2.7.1 » 2.7.3.2 PyPI | Changelog | Homepage
pyjwkest 1.3.2 » 1.4.0 PyPI
python-dateutil 2.6.0 » 2.6.1 PyPI | Changelog | Docs
python-magic 0.4.13 » 0.4.15 PyPI | Repo
pytz 2017.2 » 2017.3 PyPI | Homepage | Docs
raven 6.1.0 » 6.5.0 PyPI | Changelog | Repo
redis 2.10.5 » 2.10.6 PyPI | Changelog | Repo
requests 2.17.3 » 2.18.4 PyPI | Changelog | Homepage
serpy 0.1.1 » 0.3.1 PyPI | Changelog | Repo
six 1.10.0 » 1.11.0 PyPI | Changelog | Homepage | Docs

Changelogs

coverage 4.4.1 -> 4.4.2

4.4.2


  • Support for Python 3.7. In some cases, class and module docstrings are no
    longer counted in statement totals, which could slightly change your total
    results.
  • Specifying both --source and --include no longer silently ignores the
    include setting, instead it displays a warning. Thanks, Loïc Dachary. Closes
    issue 265_ and issue 101_.
  • Fixed a race condition when saving data and multiple threads are tracing
    (issue 581_). It could produce a "dictionary changed size during iteration"
    RuntimeError. I believe this mostly but not entirely fixes the race
    condition. A true fix would likely be too expensive. Thanks, Peter Baughman
    for the debugging, and Olivier Grisel for the fix with tests.
  • Configuration values which are file paths will now apply tilde-expansion,
    closing issue 589_.
  • Now secondary config files like tox.ini and setup.cfg can be specified
    explicitly, and prefixed sections like [coverage:run] will be read. Fixes
    issue 588_.
  • Be more flexible about the command name displayed by help, fixing
    issue 600_. Thanks, Ben Finney.

.. _issue 101: https://bitbucket.org/ned/coveragepy/issues/101/settings-under-report-affect-running
.. _issue 581: https://bitbucket.org/ned/coveragepy/issues/581/race-condition-when-saving-data-under
.. _issue 588: https://bitbucket.org/ned/coveragepy/issues/588/using-rcfile-path-to-toxini-uses-run
.. _issue 589: https://bitbucket.org/ned/coveragepy/issues/589/allow-expansion-in-coveragerc
.. _issue 600: https://bitbucket.org/ned/coveragepy/issues/600/get-program-name-from-command-line-when

.. _changes_441:

coveralls 1.1 -> 1.2.0

1.2.0

Features

  • add support for AppVeyor CI (1a62ce27)
  • add support for BuildKite CI (a58d6f9e)
  • add support for branch coverage (e2413e38)
  • add support for parallel builds in Coveralls CI (7ba3a589)

Bug Fixes

  • fix coverage count in cases of partial branch coverage (b9ab7037)
  • fix SNI validation errors in python2 (c5541263)
  • warn when PyYAML is missing (711e9e4c)

<a name="1.1"></a>

factory_boy 2.8.1 -> 2.9.2

2.9.2


Bugfix:

  • Fix declaration corruption bug when a factory defined foo__bar__baz=1 and a caller
    provided a foo__bar=x parameter at call time: this got merged into the factory's base
    declarations.

2.9.1


Bugfix:

2.9.0


This version brings massive changes to the core engine, thus reducing the number of
corner cases and weird behaviourrs.

New:

  • :issue:275: factory.fuzzy and factory.faker now use the same random seed.
  • Add :class:factory.Maybe, which chooses among two possible declarations based
    on another field's value (powers the :class:~factory.Trait feature).
  • :class:~factory.PostGenerationMethodCall only allows to pass one positional argument; use keyword arguments for
    extra parameters.

Deprecation:

  • factory.fuzzy.get_random_state is deprecated, factory.random.get_random_state should be used instead.
  • factory.fuzzy.set_random_state is deprecated, factory.random.set_random_state should be used instead.
  • factory.fuzzy.reseed_random is deprecated, factory.random.reseed_random should be used instead.

py 1.4.34 -> 1.5.2

1.5.2

=====

  • fix 169, 170: error importing py.log on Windows: no module named syslog.

1.5.1

=====

  • fix 167 - prevent pip from installing py in unsupported Python versions.

1.5.0

=====

NOTE: this release has been removed from PyPI due to missing package
metadata which caused a number of problems to py26 and py33 users.
This issue was fixed in the 1.5.1 release.

  • python 2.6 and 3.3 are no longer supported
  • deprecate py.std and remove all internal uses
  • fix 73 turn py.error into an actual module
  • path join to / no longer produces leading double slashes
  • fix 82 - remove unsupportable aliases
  • fix python37 compatibility of path.sysfind on windows by correctly replacing vars
  • turn iniconfig and apipkg into vendored packages and ease de-vendoring for distributions
  • fix 68 remove invalid py.test.ensuretemp references
  • fix 25 - deprecate path.listdir(sort=callable)
  • add TerminalWriter.chars_on_current_line read-only property that tracks how many characters
    have been written to the current line.

pytest 3.1.1 -> 3.3.2

3.3.2

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

Bug Fixes

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

Improved Documentation

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

Trivial/Internal Changes

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

3.3.1

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

Bug Fixes

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

Improved Documentation

  • Fix broken link to plugin pytest-localserver. (2963 &lt;https://github.com/pytest-dev/pytest/issues/2963&gt;_)

Trivial/Internal Changes

  • Update github "bugs" link in CONTRIBUTING.rst (2949 &lt;https://github.com/pytest-dev/pytest/issues/2949&gt;_)

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 &lt;3.3. (2812 &lt;https://github.com/pytest-dev/pytest/issues/2812&gt;_)
  • Remove internal _preloadplugins() function. This removal is part of the
    pytest_namespace() hook deprecation. (2636 &lt;https://github.com/pytest-dev/pytest/issues/2636&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2672&gt;_)
  • Remove ParameterSet.deprecated_arg_dict - its not a public api and the lack
    of the underscore was a naming error. (2675 &lt;https://github.com/pytest-dev/pytest/issues/2675&gt;_)
  • Remove the internal multi-typed attribute Node._evalskip and replace it
    with the boolean Node._skipped_by_mark. (2767 &lt;https://github.com/pytest-dev/pytest/issues/2767&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2959&gt;_
    for details and a recommended workaround.

Features

  • pytest_fixture_post_finalizer hook can now receive a request
    argument. (2124 &lt;https://github.com/pytest-dev/pytest/issues/2124&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2267&gt;_)
  • Report tests with global pytestmark variable only once. (2549 &lt;https://github.com/pytest-dev/pytest/issues/2549&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2657&gt;_)
  • Match warns signature to raises by adding match keyword. (2708 &lt;https://github.com/pytest-dev/pytest/issues/2708&gt;_)
  • 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 &lt;https://docs.pytest.org/en/latest/logging.html&gt;. This feature was
    introduced by merging the popular pytest-catchlog &lt;https://pypi.org/project/pytest-catchlog/&gt;
    plugin, thanks to Thomas Hisch &lt;https://github.com/thisch&gt;. Be advised that during the merging the
    backward compatibility interface with the defunct pytest-capturelog has
    been dropped. (2794 &lt;https://github.com/pytest-dev/pytest/issues/2794&gt;
    )
  • Add allow_module_level kwarg to pytest.skip(), enabling to skip the
    whole module. (2808 &lt;https://github.com/pytest-dev/pytest/issues/2808&gt;_)
  • Allow setting file_or_dir, -c, and -o in PYTEST_ADDOPTS. (2824 &lt;https://github.com/pytest-dev/pytest/issues/2824&gt;_)
  • Return stdout/stderr capture results as a namedtuple, so out and
    err can be accessed by attribute. (2879 &lt;https://github.com/pytest-dev/pytest/issues/2879&gt;_)
  • Add capfdbinary, a version of capfd which returns bytes from
    readouterr(). (2923 &lt;https://github.com/pytest-dev/pytest/issues/2923&gt;_)
  • Add capsysbinary a version of capsys which returns bytes from
    readouterr(). (2934 &lt;https://github.com/pytest-dev/pytest/issues/2934&gt;_)
  • Implement feature to skip setup.py files when run with
    --doctest-modules. (502 &lt;https://github.com/pytest-dev/pytest/issues/502&gt;_)

Bug Fixes

  • Resume output capturing after capsys/capfd.disabled() context manager.
    (1993 &lt;https://github.com/pytest-dev/pytest/issues/1993&gt;_)
  • pytest_fixture_setup and pytest_fixture_post_finalizer hooks are now
    called for all conftest.py files. (2124 &lt;https://github.com/pytest-dev/pytest/issues/2124&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2491&gt;_)
  • capsys and capfd can now be used by other fixtures. (2709 &lt;https://github.com/pytest-dev/pytest/issues/2709&gt;_)
  • Internal pytester plugin properly encodes bytes arguments to
    utf-8. (2738 &lt;https://github.com/pytest-dev/pytest/issues/2738&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2751&gt;_)
  • 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 &lt;https://github.com/pytest-dev/pytest/issues/2809&gt;_)
  • Change return value of pytest command when --maxfail is reached from
    2 (interrupted) to 1 (failed). (2845 &lt;https://github.com/pytest-dev/pytest/issues/2845&gt;_)
  • Fix issue in assertion rewriting which could lead it to rewrite modules which
    should not be rewritten. (2939 &lt;https://github.com/pytest-dev/pytest/issues/2939&gt;_)
  • Handle marks without description in pytest.ini. (2942 &lt;https://github.com/pytest-dev/pytest/issues/2942&gt;_)

Trivial/Internal Changes

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

3.2.5

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

Bug Fixes

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

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 &lt;https://github.com/pytest-dev/pytest/issues/2775&gt;_)
  • Fix issue with pytest.parametrize if argnames was specified as keyword arguments.
    (2819 &lt;https://github.com/pytest-dev/pytest/issues/2819&gt;_)
  • Strip whitespace from marker names when reading them from INI config. (2856 &lt;https://github.com/pytest-dev/pytest/issues/2856&gt;_)
  • 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 &lt;https://github.com/pytest- dev/pytest/issues/920&gt;_)

Improved Documentation

  • Clarify pytest_configure hook call order. (2539 &lt;https://github.com/pytest-dev/pytest/issues/2539&gt;_)
  • Extend documentation for testing plugin code with the pytester plugin.
    (971 &lt;https://github.com/pytest-dev/pytest/issues/971&gt;_)

Trivial/Internal Changes

  • Update help message for --strict to make it clear it only deals with
    unregistered markers, not warnings. (2444 &lt;https://github.com/pytest- dev/pytest/issues/2444&gt;_)
  • Internal code move: move code for pytest.approx/pytest.raises to own files in
    order to cut down the size of python.py (2489 &lt;https://github.com/pytest- dev/pytest/issues/2489&gt;_)
  • Renamed the utility function _pytest.compat._escape_strings to
    _ascii_escaped to better communicate the function's purpose. (2533 &lt;https://github.com/pytest-dev/pytest/issues/2533&gt;_)
  • Improve error message for CollectError with skip/skipif. (2546 &lt;https://github.com/pytest-dev/pytest/issues/2546&gt;_)
  • Emit warning about yield tests being deprecated only once per generator.
    (2562 &lt;https://github.com/pytest-dev/pytest/issues/2562&gt;_)
  • Ensure final collected line doesn't include artifacts of previous write.
    (2571 &lt;https://github.com/pytest-dev/pytest/issues/2571&gt;_)
  • Fixed all flake8 errors and warnings. (2581 &lt;https://github.com/pytest- dev/pytest/issues/2581&gt;_)
  • Added fix-lint tox environment to run automatic pep8 fixes on the code.
    (2582 &lt;https://github.com/pytest-dev/pytest/issues/2582&gt;_)
  • Turn warnings into errors in pytest's own test suite in order to catch
    regressions due to deprecations more promptly. (2588 &lt;https://github.com/pytest-dev/pytest/issues/2588&gt;_)
  • Show multiple issue links in CHANGELOG entries. (2620 &lt;https://github.com/pytest-dev/pytest/issues/2620&gt;_)

3.1.3

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

Bug Fixes

  • Fix decode error in Python 2 for doctests in docstrings. (2434 &lt;https://github.com/pytest-dev/pytest/issues/2434&gt;_)
  • Exceptions raised during teardown by finalizers are now suppressed until all
    finalizers are called, with the initial exception reraised. (2440 &lt;https://github.com/pytest-dev/pytest/issues/2440&gt;_)
  • Fix incorrect "collected items" report when specifying tests on the command-
    line. (2464 &lt;https://github.com/pytest-dev/pytest/issues/2464&gt;_)
  • deprecated_call in context-manager form now captures deprecation warnings
    even if the same warning has already been raised. Also, deprecated_call
    will always produce the same error message (previously it would produce
    different messages in context-manager vs. function-call mode). (2469 &lt;https://github.com/pytest-dev/pytest/issues/2469&gt;_)
  • Fix issue where paths collected by pytest could have triple leading /
    characters. (2475 &lt;https://github.com/pytest-dev/pytest/issues/2475&gt;_)
  • Fix internal error when trying to detect the start of a recursive traceback.
    (2486 &lt;https://github.com/pytest-dev/pytest/issues/2486&gt;_)

Improved Documentation

  • Explicitly state for which hooks the calls stop after the first non-None
    result. (2493 &lt;https://github.com/pytest-dev/pytest/issues/2493&gt;_)

Trivial/Internal Changes

  • Create invoke tasks for updating the vendored packages. (2474 &lt;https://github.com/pytest-dev/pytest/issues/2474&gt;_)
  • Update copyright dates in LICENSE, README.rst and in the documentation.
    (2499 &lt;https://github.com/pytest-dev/pytest/issues/2499&gt;_)

3.1.2

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

Bug Fixes

  • Required options added via pytest_addoption will no longer prevent using
    --help without passing them. (1999)
  • Respect python_files in assertion rewriting. (2121)
  • Fix recursion error detection when frames in the traceback contain objects
    that can't be compared (like numpy arrays). (2459)
  • UnicodeWarning is issued from the internal pytest warnings plugin only
    when the message contains non-ascii unicode (Python 2 only). (2463)
  • Added a workaround for Python 3.6 WindowsConsoleIO breaking due to Pytests's
    FDCapture. Other code using console handles might still be affected by the
    very same issue and might require further workarounds/fixes, i.e. colorama.
    (2467)

Improved Documentation

  • Fix internal API links to pluggy objects. (2331)
  • Make it clear that pytest.xfail stops test execution at the calling point
    and improve overall flow of the skipping docs. (810)

transifex-client 0.12.4 -> 0.13.0

0.12.5

Changelog

  • Support for Basic Authentication when using the client behind a proxy
  • Support for sourceastranslation and onlyreviewed modes when pulling files
  • Return non-zero exit codes on errors
  • $ tx --version now includes information about the Python version and architecture you’re running
  • Some updates and minor fixes in logging/error messages

CairoSVG 2.0.3 -> 2.1.3

2.1.3

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

  • Fix T commands following q or t in paths

2.1.2

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

  • Fix font-size

2.1.1

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

2.1.0

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

  • Use cssselect2 and tinycss2 instead of cssselect and tinycss
  • Don't require lxml anymore
  • Rely on defusedxml to detect unsafe SVG files

Django 1.11.2 -> 2.0.1

2.0.1

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

January 1, 2018

Django 2.0.1 fixes several bugs in 2.0.

Bugfixes

  • Fixed a regression in Django 1.11 that added newlines between MultiWidget's
    subwidgets (:ticket:28890).
  • Fixed incorrect class-based model index name generation for models with
    quoted db_table (:ticket:28876).
  • Fixed incorrect foreign key constraint name for models with quoted
    db_table (:ticket:28876).
  • Fixed a regression in caching of a GenericForeignKey when the referenced
    model instance uses more than one level of multi-table inheritance
    (:ticket:28856).
  • Reallowed filtering a queryset with GeometryField=None (:ticket:28896).
  • Corrected admin check to allow a OneToOneField in
    ModelAdmin.autocomplete_fields (:ticket:28898).
  • Fixed a regression on SQLite where DecimalField returned a result with
    trailing zeros in the fractional part truncated (:ticket:28915).
  • Fixed crash in the testserver command startup (:ticket:28941).
  • Fixed crash when coercing a translatable URL pattern to str
    (:ticket:28947).
  • Fixed crash on SQLite when renaming a field in a model referenced by a
    ManyToManyField (:ticket:28884).
  • Fixed a crash when chaining values() or values_list() after
    QuerySet.select_for_update(of=(...)) (:ticket:28944).
  • Fixed admin changelist crash when using a query expression in the page's
    ordering (:ticket:28958).

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

2.0

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

December 2, 2017

Welcome to Django 2.0!

These release notes cover the :ref:new features &lt;whats-new-2.0&gt;, as well as
some :ref:backwards incompatible changes &lt;backwards-incompatible-2.0&gt; you'll
want to be aware of when upgrading from Django 1.11 or earlier. We've
:ref:dropped some features&lt;removed-features-2.0&gt; that have reached the end of
their deprecation cycle, and we've :ref:begun the deprecation process for some features &lt;deprecated-features-2.0&gt;.

This release starts Django's use of a :ref:loose form of semantic versioning &lt;internal-release-cadence&gt;, but there aren't any major backwards incompatible
changes that might be expected of a 2.0 release. Upgrading should be a similar
amount of effort as past feature releases.

See the :doc:/howto/upgrade-version guide if you're updating an existing
project.

Python compatibility

Django 2.0 supports Python 3.4, 3.5, and 3.6. We highly recommend and only
officially support the latest release of each series.

The Django 1.11.x series is the last to support Python 2.7.

Django 2.0 will be the last release series to support Python 3.4. If you plan
a deployment of Python 3.4 beyond the end-of-life for Django 2.0 (April 2019),
stick with Django 1.11 LTS (supported until April 2020) instead. Note, however,
that the end-of-life for Python 3.4 is March 2019.

Third-party library support for older version of Django

Following the release of Django 2.0, we suggest that third-party app authors
drop support for all versions of Django prior to 1.11. At that time, you should
be able to run your package's tests using python -Wd so that deprecation
warnings do appear. After making the deprecation warning fixes, your app should
be compatible with Django 2.0.

.. _whats-new-2.0:

What's new in Django 2.0

Simplified URL routing syntax

The new :func:django.urls.path() function allows a simpler, more readable URL
routing syntax. For example, this example from previous Django releases::

url(r'^articles/(?P<year>[0-9]{4})/$', views.year_archive),

could be written as::

path('articles/<int:year>/', views.year_archive),

The new syntax supports type coercion of URL parameters. In the example, the
view will receive the year keyword argument as an integer rather than as
a string. Also, the URLs that will match are slightly less constrained in the
rewritten example. For example, the year 10000 will now match since the year
integers aren't constrained to be exactly four digits long as they are in the
regular expression.

The django.conf.urls.url() function from previous versions is now available
as :func:django.urls.re_path. The old location remains for backwards
compatibility, without an imminent deprecation. The old
django.conf.urls.include() function is now importable from django.urls
so you can use from django.urls import include, path, re_path in your
URLconfs.

The :doc:/topics/http/urls document is rewritten to feature the new syntax
and provide more details.

Mobile-friendly contrib.admin

The admin is now responsive and supports all major mobile devices. Older
browsers may experience varying levels of graceful degradation.

Window expressions

The new :class:~django.db.models.expressions.Window expression allows
adding an OVER clause to querysets. You can use :ref:window functions &lt;window-functions&gt; and :ref:aggregate functions &lt;aggregation-functions&gt; in
the expression.

Minor features

:mod:django.contrib.admin

  • The new :attr:.ModelAdmin.autocomplete_fields attribute and
    :meth:.ModelAdmin.get_autocomplete_fields method allow using an
    Select2 &lt;https://select2.org&gt;_ search widget for ForeignKey and
    ManyToManyField.

:mod:django.contrib.auth

  • The default iteration count for the PBKDF2 password hasher is increased from
    36,000 to 100,000.

:mod:django.contrib.gis

  • Added MySQL support for the
    :class:~django.contrib.gis.db.models.functions.AsGeoJSON function,
    :class:~django.contrib.gis.db.models.functions.GeoHash function,
    :class:~django.contrib.gis.db.models.functions.IsValid function,
    :lookup:isvalid lookup, and :ref:distance lookups &lt;distance-lookups&gt;.
  • Added the :class:~django.contrib.gis.db.models.functions.Azimuth and
    :class:~django.contrib.gis.db.models.functions.LineLocatePoint functions,
    supported on PostGIS and SpatiaLite.
  • Any :class:~django.contrib.gis.geos.GEOSGeometry imported from GeoJSON now
    has its SRID set.
  • Added the :attr:.OSMWidget.default_zoom attribute to customize the map's
    default zoom level.
  • Made metadata readable and editable on rasters through the
    :attr:~django.contrib.gis.gdal.GDALRaster.metadata,
    :attr:~django.contrib.gis.gdal.GDALRaster.info, and
    :attr:~django.contrib.gis.gdal.GDALBand.metadata attributes.
  • Allowed passing driver-specific creation options to
    :class:~django.contrib.gis.gdal.GDALRaster objects using papsz_options.
  • Allowed creating :class:~django.contrib.gis.gdal.GDALRaster objects in
    GDAL's internal virtual filesystem. Rasters can now be :ref:created from and converted to binary data &lt;gdal-raster-vsimem&gt; in-memory.
  • The new :meth:GDALBand.color_interp() &lt;django.contrib.gis.gdal.GDALBand.color_interp&gt; method returns the color
    interpretation for the band.

:mod:django.contrib.postgres

  • The new distinct argument for
    :class:~django.contrib.postgres.aggregates.ArrayAgg determines if
    concatenated values will be distinct.
  • The new :class:~django.contrib.postgres.functions.RandomUUID database
    function returns a version 4 UUID. It requires use of PostgreSQL's
    pgcrypto extension which can be activated using the new
    :class:~django.contrib.postgres.operations.CryptoExtension migration
    operation.
  • :class:django.contrib.postgres.indexes.GinIndex now supports the
    fastupdate and gin_pending_list_limit parameters.
  • The new :class:~django.contrib.postgres.indexes.GistIndex class allows
    creating GiST indexes in the database. The new
    :class:~django.contrib.postgres.operations.BtreeGistExtension migration
    operation installs the btree_gist extension to add support for operator
    classes that aren't built-in.
  • :djadmin:inspectdb can now introspect JSONField and various
    RangeField\s (django.contrib.postgres must be in INSTALLED_APPS).

:mod:django.contrib.sitemaps

  • Added the protocol keyword argument to the
    :class:~django.contrib.sitemaps.GenericSitemap constructor.

Cache

  • cache.set_many() now returns a list of keys that failed to be inserted.
    For the built-in backends, failed inserts can only happen on memcached.

File Storage

  • :meth:File.open() &lt;django.core.files.File.open&gt; can be used as a context
    manager, e.g. with file.open() as f:.

Forms

  • The new date_attrs and time_attrs arguments for
    :class:~django.forms.SplitDateTimeWidget and
    :class:~django.forms.SplitHiddenDateTimeWidget allow specifying different
    HTML attributes for the DateInput and TimeInput (or hidden)
    subwidgets.
  • The new :meth:Form.errors.get_json_data() &lt;django.forms.Form.errors.get_json_data&gt; method returns form errors as
    a dictionary suitable for including in a JSON response.

Generic Views

  • The new :attr:.ContextMixin.extra_context attribute allows adding context
    in View.as_view().

Management Commands

  • :djadmin:inspectdb now translates MySQL's unsigned integer columns to
    PositiveIntegerField or PositiveSmallIntegerField.
  • The new :option:makemessages --add-location option controls the comment
    format in PO files.
  • :djadmin:loaddata can now :ref:read from stdin &lt;loading-fixtures-stdin&gt;.
  • The new :option:diffsettings --output option allows formatting the output
    in a unified diff format.
  • On Oracle, :djadmin:inspectdb can now introspect AutoField if the
    column is created as an identity column.
  • On MySQL, :djadmin:dbshell now supports client-side TLS certificates.

Migrations

  • The new :option:squashmigrations --squashed-name option allows naming the
    squashed migration.

Models

  • The new :class:~django.db.models.functions.StrIndex database function
    finds the starting index of a string inside another string.
  • On Oracle, AutoField and BigAutoField are now created as identity columns_.

.. _identity columns: https://docs.oracle.com/database/121/DRDAA/migr_tools_feat.htmDRDAA109

  • The new chunk_size parameter of :meth:.QuerySet.iterator controls the
    number of rows fetched by the Python database client when streaming results
    from the database. For databases that don't support server-side cursors, it
    controls the number of results Django fetches from the database adapter.
  • :meth:.QuerySet.earliest, :meth:.QuerySet.latest, and
    :attr:Meta.get_latest_by &lt;django.db.models.Options.get_latest_by&gt; now
    allow ordering by several fields.
  • Added the :class:~django.db.models.functions.ExtractQuarter function to
    extract the quarter from :class:~django.db.models.DateField and
    :class:~django.db.models.DateTimeField, and exposed it through the
    :lookup:quarter lookup.
  • Added the :class:~django.db.models.functions.TruncQuarter function to
    truncate :class:~django.db.models.DateField and
    :class:~django.db.models.DateTimeField to the first day of a quarter.
  • Added the :attr:~django.db.models.Index.db_tablespace parameter to
    class-based indexes.
  • If the database supports a native duration field (Oracle and PostgreSQL),
    :class:~django.db.models.functions.Extract now works with
    :class:~django.db.models.DurationField.
  • Added the of argument to :meth:.QuerySet.select_for_update(), supported
    on PostgreSQL and Oracle, to lock only rows from specific tables rather than
    all selected tables. It may be helpful particularly when
    :meth:~.QuerySet.select_for_update() is used in conjunction with
    :meth:~.QuerySet.select_related().
  • The new field_name parameter of :meth:.QuerySet.in_bulk allows fetching
    results based on any unique model field.
  • :meth:.CursorWrapper.callproc() now takes an optional dictionary of keyword
    parameters, if the backend supports this feature. Of Django's built-in
    backends, only Oracle supports it.
  • The new :meth:connection.execute_wrapper() &lt;django.db.backends.base.DatabaseWrapper.execute_wrapper&gt; method allows
    :doc:installing wrappers around execution of database queries &lt;/topics/db/instrumentation&gt;.
  • The new filter argument for built-in aggregates allows :ref:adding different conditionals &lt;conditional-aggregation&gt; to multiple aggregations
    over the same fields or relations.
  • Added support for expressions in :attr:Meta.ordering &lt;django.db.models.Options.ordering&gt;.
  • The new named parameter of :meth:.QuerySet.values_list allows fetching
    results as named tuples.
  • The new :class:.FilteredRelation class allows adding an ON clause to
    querysets.

Pagination

  • Added :meth:Paginator.get_page() &lt;django.core.paginator.Paginator.get_page&gt;
    to provide the documented pattern of handling invalid page numbers.

Requests and Responses

  • The :djadmin:runserver Web server supports HTTP 1.1.

Templates

  • To increase the usefulness of :meth:.Engine.get_default in third-party
    apps, it now returns the first engine if multiple DjangoTemplates engines
    are configured in TEMPLATES rather than raising ImproperlyConfigured.
  • Custom template tags may now accept keyword-only arguments.

Tests

  • Added threading support to :class:~django.test.LiveServerTestCase.
  • Added settings that allow customizing the test tablespace parameters for
    Oracle: :setting:DATAFILE_SIZE, :setting:DATAFILE_TMP_SIZE,
    :setting:DATAFILE_EXTSIZE, and :setting:DATAFILE_TMP_EXTSIZE.

Validators

  • The new :class:.ProhibitNullCharactersValidator disallows the null
    character in the input of the :class:~django.forms.CharField form field
    and its subclasses. Null character input was observed from vulnerability
    scanning tools. Most databases silently discard null characters, but
    psycopg2 2.7+ raises an exception when trying to save a null character to
    a char/text field with PostgreSQL.

.. _backwards-incompatible-2.0:

Backwards incompatible changes in 2.0

Removed support for bytestrings in some places

To support native Python 2 strings, older Django versions had to accept both
bytestrings and unicode strings. Now that Python 2 support is dropped,
bytestrings should only be encountered around input/output boundaries (handling
of binary fields or HTTP streams, for example). You might have to update your
code to limit bytestring usage to a minimum, as Django no longer accepts
bytestrings in certain code paths.

For example, reverse() now uses str() instead of force_text() to
coerce the args and kwargs it receives, prior to their placement in
the URL. For bytestrings, this creates a string with an undesired b prefix
as well as additional quotes (str(b&#39;foo&#39;) is &quot;b&#39;foo&#39;&quot;). To adapt, call
decode() on the bytestring before passing it to reverse().

Database backend API

This section describes changes that may be needed in third-party database
backends.

  • The DatabaseOperations.datetime_cast_date_sql(),
    datetime_cast_time_sql(), datetime_trunc_sql(),
    datetime_extract_sql(), and date_interval_sql() methods now return
    only the SQL to perform the operation instead of SQL and a list of
    parameters.
  • Third-party database backends should add a DatabaseWrapper.display_name
    attribute with the name of the database that your backend works with. Django
    may use it in various messages, such as in system checks.
  • The first argument of SchemaEditor._alter_column_type_sql() is now
    model rather than table.
  • The first argument of SchemaEditor._create_index_name() is now
    table_name rather than model.
  • To enable FOR UPDATE OF support, set
    DatabaseFeatures.has_select_for_update_of = True. If the database
    requires that the arguments to OF be columns rather than tables, set
    DatabaseFeatures.select_for_update_of_column = True.
  • To enable support for :class:~django.db.models.expressions.Window
    expressions, set DatabaseFeatures.supports_over_clause to True. You
    may need to customize the DatabaseOperations.window_start_rows_start_end()
    and/or window_start_range_start_end() methods.
  • Third-party database backends should add a
    DatabaseOperations.cast_char_field_without_max_length attribute with the
    database data type that will be used in the
    :class:~django.db.models.functions.Cast function for a CharField if the
    max_length argument isn't provided.
  • The first argument of DatabaseCreation._clone_test_db() and
    get_test_db_clone_settings() is now suffix rather
    than number (in case you want to rename the signatures in your backend
    for consistency). django.test also now passes those values as strings
    rather than as integers.
  • Third-party database backends should add a
    DatabaseIntrospection.get_sequences() method based on the stub in
    BaseDatabaseIntrospection.

Dropped support for Oracle 11.2

The end of upstream support for Oracle 11.2 is Dec. 2020. Django 1.11 will be
supported until April 2020 which almost reaches this date. Django 2.0
officially supports Oracle 12.1+.

Default MySQL isolation level is read committed

MySQL's default isolation level, repeatable read, may cause data loss in
typical Django usage. To prevent that and for consistency with other databases,
the default isolation level is now read committed. You can use the
:setting:DATABASES setting to :ref:use a different isolation level &lt;mysql-isolation-level&gt;, if needed.

:attr:AbstractUser.last_name &lt;django.contrib.auth.models.User.last_name&gt; max_length increased to 150

A migration for :attr:django.contrib.auth.models.User.last_name is included.
If you have a custom user model inheriting from AbstractUser, you'll need
to generate and apply a database migration for your user model.

If you want to preserve the 30 character limit for last names, use a custom
form::

from django.contrib.auth.forms import UserChangeForm

class MyUserChangeForm(UserChangeForm):
last_name = forms.CharField(max_length=30, required=False)

If you wish to keep this restriction in the admin when editing users, set
UserAdmin.form to

@tnir tnir self-assigned this Jan 23, 2018
@tnir tnir self-requested a review January 27, 2018 00:51
@tnir tnir closed this May 29, 2021
@tnir tnir deleted the pyup-initial-update branch May 29, 2021 13:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants