Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Initial Update #4

Closed
wants to merge 11 commits into from
Closed

Initial Update #4

wants to merge 11 commits into from

Conversation

pyup-bot
Copy link
Contributor

@pyup-bot pyup-bot commented May 8, 2017

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.

bumpversion 0.5.3 » 0.5.3 PyPI | Repo
pydocstyle 2.0.0 » 2.0.0 PyPI | Changelog | Repo
docutils 0.13.1 » 0.13.1 PyPI | Homepage
readme-renderer 17.2 » 17.2 PyPI | Changelog | Repo
check-manifest 0.35 » 0.35 PyPI | Changelog | Repo
pytest-cov 2.4.0 » 2.4.0 PyPI | Changelog | Repo
codecov 2.0.9 » 2.0.9 PyPI | Changelog | Repo
django 1.10.7 » 1.11.1 PyPI | Changelog | Homepage
django 1.8.18 » 1.11.1 PyPI | Changelog | Homepage
django 1.9.13 » 1.11.1 PyPI | Changelog | Homepage
pytest-django 3.1.2 » 3.1.2 PyPI | Changelog | Docs

Changelogs

pydocstyle -> 2.0.0

2.0.0

Major Updates

Support for numpy conventions verification has been added (129, 226).
Support for Python 2.6 has been dropped (206, 217).
Support for PyPy3 has been temporarily dropped, until it will be equivalent to CPython 3.3+ and supported by pip (223).
Support for the pep257 console script has been dropped. Only the pydocstyle console script should be used (216, 218).
Errors are now printed to stdout instead of stderr (201, 210).

New Features

Decorator-based skipping via --ignore-decorators has been added (204).
Support for using pycodestyle style wildcards has been added (72, 209).
Superfluous opening quotes are now reported as part of D300 (166, 225).
Fixed a false-positive recognition of D410 and added D412 (230, 233).
Added --config=<path> flag to override the normal config file discovery and choose a specific config file (117, 247).
Support for specifying error codes with partial prefix has been added, e.g., --select=D101,D2 (72, 209).
All configuration file can now have the .ini extension (237).
Added better imperative mood checks using third party stemmer (235, 68).

Bug Fixes

Made parser more robust to bad source files (168, 214)
Modules are now considered private if their name starts with a single underscore. This is a bugfix where “public module” (D100) was reported regardless of module name (199, 222).
Removed error when all is a list (62, 227).
Fixed a bug where the sign was used as a matrix multiplication operator in Python 3.5, but was considered a decorator by the parser (246, 191).

1.1.1

Bug Fixes

  • Fixed an issue where the flake8-docstrings failed when accessing some public API from pydocstyle.

1.1.0

Major Updates

  • pydocstyle is no longer a single file. This might make it difficult for some users to just add it to their project, but the project has reached certain complexity where splitting it into modules was necessary (200).

New Features

  • Added the optional error codes D212 and D213, for checking whether the summary of a multi-line docstring starts at the first line, respectively at the second line (174).
  • Added D404 - First word of the docstring should not be “This”. It is turned off by default (183).
  • Added the ability to ignore specific function and method docstrings with inline comments:
    “ noqa” skips all checks.
    “ noqa: D102,D203” can be used to skip specific checks.

Bug Fixes

  • Fixed an issue where file paths were printed in lower case (179, 181).
  • The error code D300 is now also being reported if a docstring has uppercase literals (R or U) as prefix (176).
  • Fixed a bug where an all error was reported when all was imported from another module with a different name (182, 187).
  • Fixed a bug where raise X from Y syntax caused pydocstyle to crash (196, 200).

1.0.0

0.7.0

New Features

  • Added the D104 error code - "Missing docstring in public package". This new
    error is turned on by default. Missing docstring in __init__.py files which
    previously resulted in D100 errors ("Missing docstring in public module")
    will now result in D104 (105, 127).
  • Added the D105 error code - "Missing docstring in magic method'. This new
    error is turned on by default. Missing docstrings in magic method which
    previously resulted in D102 error ("Missing docstring in public method")
    will now result in D105. Note that exceptions to this rule are variadic
    magic methods - specifically __init__, __call__ and __new__, which
    will be considered non-magic and missing docstrings in them will result
    in D102 (60, 139).
  • Support the option to exclude all error codes. Running pep257 with
    --select= (or select= in the configuration file) will exclude all errors
    which could then be added one by one using add-select. Useful for projects
    new to pep257 (132, 135).
  • Added check D211: No blank lines allowed before class docstring. This change
    is a result of a change to the official PEP257 convention. Therefore, D211
    will now be checked by default instead of D203, which required a single
    blank line before a class docstring (137).
  • Configuration files are now handled correctly. The closer a configuration file
    is to a checked file the more it matters.
    Configuration files no longer support explain, source, debug,
    verbose or count (133).

Bug Fixes

  • On Python 2.x, D302 ("Use u""" for Unicode docstrings") is not reported
    if unicode_literals is imported from __future__ (113, 134).
  • Fixed a bug where there was no executable for pep257 on Windows (73,
    136).

0.6.0

New Features

  • Added support for more flexible error selections using --ignore,
    --select, --convention, --add-ignore and --add-select
    (96, 123).

Bug Fixes

  • Property setter and deleter methods are now treated as private and do not
    require docstrings separate from the main property method (69, 107).
  • Fixed an issue where pep257 did not accept docstrings that are both
    unicode and raw in Python 2.x (116, 119).
  • Fixed an issue where Python 3.x files with Unicode encodings were
    not read correctly (118).

readme-renderer -> 17.2

17.2


  • Fix an issue cleaning plaintext values.

17.1


  • Fix an issue attempting to clean data that had &lt;a&gt; tags without a href.

17.0


  • Fix issue with bleach >= 2.0.

16.0


  • Fix issue with docutils >= 0.13.1.

0.7.0


  • Added PyPA Code of Conduct_.
  • Allow <sub> and <sup> tags when cleaning rST HTML output.
  • Dropped support for Python 2.6.

.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/

check-manifest -> 0.35

0.35


  • Python 3.6 support.

0.34


  • Fix WindowsError due to presence of read-only files
    (74 &lt;https://github.com/mgedmin/check-manifest/issues/74&gt;__).

0.33


  • Fix WindowsError due to git submodules in subdirectories
    (73 &lt;https://github.com/mgedmin/check-manifest/pull/73&gt;__).
    Contributed by Loren Gordon.

0.32


  • New config/command line option to ignore bad ideas (ignore-bad-ideas)
    (issue 67 &lt;https://github.com/mgedmin/check-manifest/issues/67&gt;__).
    Contributed by Brecht Machiels.
  • Files named .hgsigs are ignored by default. Contributed by Jakub Wilk.

0.31


  • Drop Python 3.2 support.
  • Ignore commented-out lines in MANIFEST.in
    (issue 66 &lt;https://github.com/mgedmin/check-manifest/issues/66&gt;__).

0.30


  • Support git submodules
    (issue 61 &lt;https://github.com/mgedmin/check-manifest/issues/61&gt;__).
  • Revert the zc.buildout support hack from 0.26 because it causes breakage
    (issue 56 &lt;https://github.com/mgedmin/check-manifest/issues/56&gt;__).
  • Improve non-ASCII filename handling with Bazaar on Windows.

0.29


  • Fix --python with just a command name, to be found in path (issue 57 &lt;https://github.com/mgedmin/check-manifest/issues/57&gt;__).

0.28


  • Fix detection of git repositories when .git is a file and not a directory (53 &lt;https://github.com/mgedmin/check-manifest/pull/53&gt;__). One situation
    where this occurs is when the project is checked out as a git submodule.
  • Apply ignore patterns in subdirectories too (54 &lt;https://github.com/mgedmin/check-manifest/issues/54&gt;__).

0.27


  • Fix utter breakage on Windows, introduced in 0.26 (issue 52 &lt;https://github.com/mgedmin/check-manifest/issues/52&gt;__).
    (The bug -- clearing the environment unnecessarily -- could probably
    also cause locale-related problems on other OSes.)

0.26


  • Do not complain about missing .gitattributes file (PR 50 &lt;https://github.com/mgedmin/check-manifest/pull/50&gt;__).
  • Normalize unicode representation and case of filenames. (issue 47 &lt;https://github.com/mgedmin/check-manifest/issues/47&gt;__).
  • Support installation via zc.buildout better (issue 35 &lt;https://github.com/mgedmin/check-manifest/issues/35&gt;__).
  • Drop Python 2.6 support because one of our test dependencies (mock) dropped
    it. This also means we no longer use environment markers.

0.25


  • Stop dynamic computation of install_requires in setup.py: this doesn't work
    well in the presence of the pip 7 wheel cache. Use PEP-426 environment
    markers instead (this means we now require setuptools >= 0.7, and pip >= 6.0,
    and wheel >= 0.24).

0.24


  • Make sure setup.py not being added to the VCS doesn't cause
    hard-to-understand errors (issue 46 &lt;https://github.com/mgedmin/check-manifest/issues/46&gt;__).

0.23


  • More reliable svn status parsing; now handles svn externals (issue 45 &lt;https://github.com/mgedmin/check-manifest/issues/45&gt;__).
  • The test suite now skips tests for version control systems that aren't
    installed (issue 42 &lt;https://github.com/mgedmin/check-manifest/issues/42&gt;__).

0.22


  • More terse output by default; use the new -v (--verbose) flag
    to see all the details.
  • Warn the user if MANIFEST.in is missing (issue 31 &lt;https://github.com/mgedmin/check-manifest/issues/31&gt;__).
  • Fix IOError when files listed under version control are missing (issue 32 &lt;https://github.com/mgedmin/check-manifest/issues/32&gt;__).
  • Improved wording of the match/do not match messages (issue 34 &lt;https://github.com/mgedmin/check-manifest/issues/34&gt;__).
  • Handle a relative --python path (issue 36 &lt;https://github.com/mgedmin/check-manifest/issues/36&gt;__).
  • Warn about leading and trailing slashes in MANIFEST.in (issue 37 &lt;https://github.com/mgedmin/check-manifest/issues/37&gt;__).
  • Ignore .travis.yml by default (issue 39 &lt;https://github.com/mgedmin/check-manifest/issues/39&gt;__).
  • Suggest a rule for Makefile found deeper in the source tree.

0.21


  • Don't drop setup.cfg when copying version-controlled files into a clean
    temporary directory (issue 29 &lt;https://github.com/mgedmin/check-manifest/issues/29&gt;__).

0.20


  • Restore warning about files included in the sdist but not added to the
    version control system (issue 27 &lt;https://github.com/mgedmin/check-manifest/issues/27&gt;__).
  • Fix check-manifest relative/pathname (issue 28 &lt;https://github.com/mgedmin/check-manifest/issues/28&gt;__).

0.19


  • More correct MANIFEST.in parsing for exclusion rules.
  • Some effort was expended towards Windows compatibility.
  • Handles non-ASCII filenames, as long as they're valid in your locale
    (issue 23 &lt;https://github.com/mgedmin/check-manifest/issues/23&gt;,
    25 &lt;https://github.com/mgedmin/check-manifest/issues/23&gt;
    ).

0.18


  • Friendlier error message when an external command cannot be found
    (issue 21 &lt;https://github.com/mgedmin/check-manifest/issues/21&gt;__).
  • Add suggestion pattern for .coveragerc.
  • Python 2.6 support
    (issue 22 &lt;https://github.com/mgedmin/check-manifest/issues/22&gt;__).

0.17


  • Read the existing MANIFEST.in file for files to ignore
    (issue 19 &lt;https://github.com/mgedmin/check-manifest/issues/19&gt;__).

0.16


  • Fix Subversion status parsing in the presence of svn usernames longer than 12
    characters (issue 18 &lt;https://github.com/mgedmin/check-manifest/issues/18&gt;__).

0.15


  • Normalize the paths of all files, avoiding some duplicate misses of
    directories. (issue 16 &lt;https://github.com/mgedmin/check-manifest/issues/16&gt;__).
    [maurits]

0.14


  • Supports packages that do not live in the root of a version control
    repository (issue 15 &lt;https://github.com/mgedmin/check-manifest/issues/15&gt;__).
  • More reliable svn support: detect files that have been added but not
    committed (or committed but not updated).
  • Licence changed from GPL (v2 or later) to MIT
    (issue 12 &lt;https://github.com/mgedmin/check-manifest/issues/12&gt;__).

0.13


  • New command line option: --ignore
    (issue 11 &lt;https://github.com/mgedmin/check-manifest/issues/11&gt;__).
    Contributed by Steven Myint.
  • New command line option: -p, --python. Defaults to the Python you used to
    run check-manifest. Fixes issues with packages that require Python 3 to run
    setup.py (issue 13 &lt;https://github.com/mgedmin/check-manifest/issues/13&gt;__).

0.12


  • Add suggestion pattern for Makefile.
  • More generic suggestion patterns, should cover almost anything.
  • zest.releaser_ integration: skip check-release for non-Python packages
    (issue 9 &lt;https://github.com/mgedmin/check-manifest/issues/9&gt;__).

0.11


  • Make sure MANIFEST.in is not ignored even if it hasn't been added to the
    VCS yet (issue 7 &lt;https://github.com/mgedmin/check-manifest/issues/7&gt;__).

0.10


  • check-manifest --version now prints the version number.
  • Don't apologize for not adding rules for directories (especially after adding
    rules that include files inside that directory).
  • Python 3 support contributed by Steven Myint.
  • Default ignore patterns can be configured in setup.cfg
    (issue 3 &lt;https://github.com/mgedmin/check-manifest/issues/3&gt;_).

0.9


  • Add suggestion pattern for .travis.yml.
  • When check-manifest -u (or -c) doesn't know how to write a rule matching a
    particular file, it now apologizes explicitly.
  • Copy the source tree to a temporary directory before running python setup.py
    sdist to avoid side effects from setuptools plugins or stale
    *.egg-info/SOURCES.txt files
    (issue 1 &lt;https://github.com/mgedmin/check-manifest/issues/1&gt;_).
  • Warn if *.egg-info or *.mo is actually checked into the VCS.
  • Don't complain if *.mo files are present in the sdist but not in the VCS
    (issue 2 &lt;https://github.com/mgedmin/check-manifest/issues/2&gt;_).

0.8


  • Entry point for zest.releaser_. If you install both zest.releaser and
    check-manifest, you will be asked if you want to check your manifest during
    fullrelease.

.. _zest.releaser: https://pypi.python.org/pypi/zest.releaser

0.7


  • First release available from the Python Package Index.
  • Added README.rst, CHANGES.rst, setup.py, tox.ini (but no real tests yet),
    MANIFEST.in, and a Makefile.
  • Fixed a bug in error reporting (when setup.py failed, the user would get
    TypeError: descriptor &#39;__init__&#39; requires an &#39;exceptions.Exception&#39; object but received a &#39;str&#39;).

pytest-cov -> 2.4.0

2.4.0


  • Added a "disarm" option: --no-cov. It will disable coverage measurements. Contributed by Zoltan Kozma in
    PR135 &lt;https://github.com/pytest-dev/pytest-cov/pull/135&gt;_.

WARNING: Do not put this in your configuration files, it's meant to be an one-off for situations where you want to
disable coverage from command line.

  • Fixed broken exception handling on .pth file. See 136 &lt;https://github.com/pytest-dev/pytest-cov/issues/136&gt;_.

2.3.1


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

2.3.0


  • Add support for specifying output location for html, xml, and annotate report.
    Contributed by Patrick Lannigan in PR113 &lt;https://github.com/pytest-dev/pytest-cov/pull/113&gt;_.
  • 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 &lt;https://github.com/pytest-dev/pytest-cov/pull/116&gt;_.
  • Fixed bug occurred when bare --cov parameter was used with xdist.
    Contributed by Michael Elovskikh in PR120 &lt;https://github.com/pytest-dev/pytest-cov/pull/120&gt;_.
  • Add support for skip_covered and added --cov-report=term-skip-covered command
    line options. Contributed by Saurabh Kumar in PR115 &lt;https://github.com/pytest-dev/pytest-cov/pull/115&gt;_.

2.2.1


  • Fixed incorrect merging of coverage data when xdist was used and coverage was &gt;= 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 &lt;https://github.com/pytest-dev/pytest-cov/pull/80&gt;_.

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

codecov -> 2.0.9

2.0.7

  • Add --name/-n to cli
  • Add support for Jenkins Blue
  • Fix environment variable joining
  • Add Greenhouse CI detection
  • Fix GitLab detection
  • Add default VCS_* environment
  • Auto-merge py-coverage
  • Remove Xcode processing support, please use bash uploader.
  • Support yaml:token and yaml:slug

2.0.5

2.0.4

  • fix detecting merge commits on all CI, not just Travis

2.0.3

  • add -F to flagging uploads [new feature]
  • fixed some reports ascii chars
  • added --pr flag for manually specifing pulls
  • added --tag flag for manually git tags
  • added env detection for Travis
  • added buildkite detection
  • added teamcity detection
  • added more snapci detection
  • detect codecov.yml file detection
  • depreciating xcode support, use bash uploader
  • hide token from stdout

1.6.4

  • fix gitlab project directory
  • fallback on git branch/commit
  • fix using gcov_exec

1.6.0

  • depreciate --no-fail now a default
  • add --required to fail the build if Codecov fails
  • added --cacerts for enterprise customers
  • added fix reports http://bit.ly/1O4eBpt

1.5.0

  • fix retreiving mercurial commit
  • add support for swift/xcode7 profdata
  • now uploading direct-to-s3 to improve product performance
  • not require branch, will default to master (the default branch)
  • fix drone.io commit number, which is not a full 40 sha.

1.4.1

  • added --no-fail to prevent failing builds when missing configuration or Codecov errors

1.4.0

  • Ignore other known bad files/paths
  • Added test suite to test against example repositories
  • Using coverage xml -i to ignore No source for code errors
  • Cleaned up command output with help and colors
  • Added gcov processing, see codecov --help for more info.

1.3.1

  • Ignore other known bad files/paths
  • Fix issue with decoding files in py3+

1.3.0

  • Refactor project to be a global uploader for more reports

1.2.3

  • Remove test-results.xml, not a coverage file
  • Add CircleCI container numbers

1.2.2

  • bring back client-side pre-processing for jacoco (they can crush)

1.2.1

  • accept any file ending in coverge.xml

1.2.0

  • accept nosetests.xml and test-results.xml files
  • no longer do client side pre-processing, upload raw
  • capture SEMAPHORE_CURRENT_THREAD

1.1.13

  • added --build arg for advanced usage

1.1.10

  • fix package for 2.6 on windows
  • fix showing --help when called in non-git backed repo
  • fix AppVeyor public repos

1.1.8

  • support GitLab CI Runner
  • added rollbar to help bugs if presented
  • added more filepath matching
  • pep8 cleanup
  • added Shippable ci

1.1.7

  • support for D lang added, special thanks to ColdenCullen
  • Wercker CI supported by Robpol86
  • fixed Drone build number

1.1.6

  • fix semaphore commit revision number
  • preprocess reports from xml

1.1.5

  • search for all lcov|gcov files
  • depreciate --min-coverage, use Github Status Update feature
  • pre-process xml => json

1.1.4

  • added support for pyhton 2.6 by Robpol86
  • added AppVeyor support by Robpol86

1.1.3

  • added more ignore paths

1.1.2

  • search for lcov.info files
  • pause for .1 before checking for min-coverage
  • accept --env variables which are stored in front-end for build specs

1.1.1

  • build python coverage xml only when no reports found to fix overriding reports
  • now defaulting output to plain text. Use --json to return json results
  • added jacocoTestReport.xml to search list
  • changed --min-coverage waiting methods to, 5 tries 15s each
  • added Sites/www/bower and node_modules to ignored table of contents

django -> 1.11.1

1.11.1

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

May 6, 2017

Django 1.11.1 adds a minor feature and fixes several bugs in 1.11.

Allowed disabling server-side cursors on PostgreSQL

The change in Django 1.11 to make :meth:.QuerySet.iterator() use server-side
cursors on PostgreSQL prevents running Django with pgBouncer in transaction
pooling mode. To reallow that, use the :setting:DISABLE_SERVER_SIDE_CURSORS &lt;DATABASE-DISABLE_SERVER_SIDE_CURSORS&gt; setting in :setting:DATABASES.

See :ref:transaction-pooling-server-side-cursors for more discussion.

Bugfixes

  • Made migrations respect Index’s name argument. If you created a
    named index with Django 1.11, makemigrations will create a migration to
    recreate the index with the correct name (:ticket:28051).
  • Fixed a crash when using a __icontains lookup on a ArrayField
    (:ticket:28038).
  • Fixed a crash when using a two-tuple in EmailMessage’s attachments
    argument (:ticket:28042).
  • Fixed QuerySet.filter() crash when it references the name of a
    OneToOneField primary key (:ticket:28047).
  • Fixed empty POST data table appearing instead of "No POST data" in HTML debug
    page (:ticket:28079).
  • Restored BoundField\s without any choices evaluating to True
    (:ticket:28058).
  • Prevented SessionBase.cycle_key() from losing session data if
    _session_cache isn't populated (:ticket:28066).
  • Fixed layout of ReadOnlyPasswordHashWidget (used in the admin's user
    change page) (:ticket:28097).
  • Allowed prefetch calls on managers with custom ModelIterable subclasses
    (:ticket:28096).
  • Fixed change password link in the contrib.auth admin for el,
    es_MX, and pt translations (:ticket:28100).
  • Restored the output of the class attribute in the &lt;ul&gt; of widgets
    that use the multiple_input.html template. This fixes
    ModelAdmin.radio_fields with admin.HORIZONTAL (:ticket:28059).
  • Fixed crash in BaseGeometryWidget.subwidgets() (:ticket:28039).
  • Fixed exception reraising in ORM query execution when cursor.execute()
    fails and the subsequent cursor.close() also fails (:ticket:28091).
  • Fixed a regression where CheckboxSelectMultiple, NullBooleanSelect,
    RadioSelect, SelectMultiple, and Select localized option values
    (:ticket:28075).
  • Corrected the stack level of unordered queryset pagination warnings
    (:ticket:28109).
  • Fixed a regression causing incorrect queries for __in subquery lookups
    when models use ForeignKey.to_field (:ticket:28101).
  • Fixed crash when overriding the template of
    django.views.static.directory_index() (:ticket:28122).
  • Fixed a regression in formset min_num validation with unchanged forms
    that have initial data (:ticket:28130).
  • Prepared for cx_Oracle 6.0 support (:ticket:28138).
  • Updated the contrib.postgres SplitArrayWidget to use template-based
    widget rendering (:ticket:28040).
  • Fixed crash in BaseGeometryWidget.get_context() when overriding existing
    attrs (:ticket:28105).
  • Prevented AddIndex and RemoveIndex from mutating model state
    (:ticket:28043).
  • Prevented migrations from dropping database indexes from Meta.indexes
    when changing Field.db_index to False (:ticket:28052).
  • Fixed a regression in choice ordering in form fields with grouped and
    non-grouped options (:ticket:28157).
  • Fixed crash in BaseInlineFormSet._construct_form() when using
    save_as_new (:ticket:28159).
  • Fixed a regression where Model._state.db wasn't set correctly on
    multi-table inheritance parent models after saving a child model
    (:ticket:28166).
  • Corrected the return type of ArrayField(CITextField()) values retrieved
    from the database (:ticket:28161).
  • Fixed QuerySet.prefetch_related() crash when fetching relations in nested
    Prefetch objects (:ticket:27554).
  • Prevented hiding GDAL errors if it's not installed when using contrib.gis
    (:ticket:28160). (It's a required dependency as of Django 1.11.)
  • Fixed a regression causing __in lookups on a foreign key to fail when
    using the foreign key's parent model as the lookup value (:ticket:28175).

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

1.11

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

April 4, 2017

Welcome to Django 1.11!

These release notes cover the :ref:new features &lt;whats-new-1.11&gt;, as well as
some :ref:backwards incompatible changes &lt;backwards-incompatible-1.11&gt; you'll
want to be aware of when upgrading from Django 1.10 or older versions. We've
:ref:begun the deprecation process for some features &lt;deprecated-features-1.11&gt;.

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

Django 1.11 is designated as a :term:long-term support release. It will
receive security updates for at least three years after its release. Support
for the previous LTS, Django 1.8, will end in April 2018.

Python compatibility

Django 1.11 requires Python 2.7, 3.4, 3.5, or 3.6. Django 1.11 is the first
release to support Python 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. The next major
release, Django 2.0, will only support Python 3.5+.

Deprecating warnings are no longer loud by default

Unlike older versions of Django, Django's own deprecation warnings are no
longer displayed by default. This is consistent with Python's default behavior.

This change allows third-party apps to support both Django 1.11 LTS and Django
1.8 LTS without having to add code to avoid deprecation warnings.

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 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-1.11:

What's new in Django 1.11

Class-based model indexes

The new :mod:django.db.models.indexes module contains classes which ease
creating database indexes. Indexes are added to models using the
:attr:Meta.indexes &lt;django.db.models.Options.indexes&gt; option.

The :class:~django.db.models.Index class creates a b-tree index, as if you
used :attr:~django.db.models.Field.db_index on the model field or
:attr:~django.db.models.Options.index_together on the model Meta class.
It can be subclassed to support different index types, such as
:class:~django.contrib.postgres.indexes.GinIndex. It also allows defining the
order (ASC/DESC) for the columns of the index.

Template-based widget rendering

To ease customizing widgets, form widget rendering is now done using the
template system rather than in Python. See :doc:/ref/forms/renderers.

You may need to adjust any custom widgets that you've written for a few
:ref:backwards incompatible changes &lt;template-widget-incompatibilities-1-11&gt;.

Subquery expressions

The new :class:~django.db.models.Subquery and
:class:~django.db.models.Exists database expressions allow creating
explicit subqueries. Subqueries may refer to fields from the outer queryset
using the :class:~django.db.models.OuterRef class.

Minor features

:mod:django.contrib.admin

  • :attr:.ModelAdmin.date_hierarchy can now reference fields across relations.
  • The new :meth:ModelAdmin.get_exclude() &lt;django.contrib.admin.ModelAdmin.get_exclude&gt; hook allows specifying the
    exclude fields based on the request or model instance.
  • The popup_response.html template can now be overridden per app, per
    model, or by setting the :attr:.ModelAdmin.popup_response_template
    attribute.

:mod:django.contrib.auth

  • The default iteration count for the PBKDF2 password hasher is increased by
    20%.
  • The :class:~django.contrib.auth.views.LoginView and
    :class:~django.contrib.auth.views.LogoutView class-based views supersede the
    deprecated login() and logout() function-based views.
  • The :class:~django.contrib.auth.views.PasswordChangeView,
    :class:~django.contrib.auth.views.PasswordChangeDoneView,
    :class:~django.contrib.auth.views.PasswordResetView,
    :class:~django.contrib.auth.views.PasswordResetDoneView,
    :class:~django.contrib.auth.views.PasswordResetConfirmView, and
    :class:~django.contrib.auth.views.PasswordResetCompleteView class-based
    views supersede the deprecated password_change(),
    password_change_done(), password_reset(), password_reset_done(),
    password_reset_confirm(), and password_reset_complete() function-based
    views.
  • The new post_reset_login attribute for
    :class:~django.contrib.auth.views.PasswordResetConfirmView allows
    automatically logging in a user after a successful password reset.
    If you have multiple AUTHENTICATION_BACKENDS configured, use the
    post_reset_login_backend attribute to choose which one to use.
  • To avoid the possibility of leaking a password reset token via the HTTP
    Referer header (for example, if the reset page includes a reference to CSS or
    JavaScript hosted on another domain), the
    :class:~django.contrib.auth.views.PasswordResetConfirmView (but not the
    deprecated password_reset_confirm() function-based view) stores the token
    in a session and redirects to itself to present the password change form to
    the user without the token in the URL.
  • :func:~django.contrib.auth.update_session_auth_hash now rotates the session
    key to allow a password change to invalidate stolen session cookies.
  • The new success_url_allowed_hosts attribute for
    :class:~django.contrib.auth.views.LoginView and
    :class:~django.contrib.auth.views.LogoutView allows specifying a set of
    hosts that are safe for redirecting after login and logout.
  • Added password validators help_text to
    :class:~django.contrib.auth.forms.UserCreationForm.
  • The HttpRequest is now passed to :func:~django.contrib.auth.authenticate
    which in turn passes it to the authentication backend if it accepts a
    request argument.
  • The :func:~django.contrib.auth.signals.user_login_failed signal now
    receives a request argument.
  • :class:~django.contrib.auth.forms.PasswordResetForm supports custom user
    models that use an email field named something other than &#39;email&#39;.
    Set :attr:CustomUser.EMAIL_FIELD &lt;django.contrib.auth.models.CustomUser.EMAIL_FIELD&gt; to the name of the field.
  • :func:~django.contrib.auth.get_user_model can now be called at import time,
    even in modules that define models.

:mod:django.contrib.contenttypes

  • When stale content types are detected in the
    :djadmin:remove_stale_contenttypes command, there's now a list of related
    objects such as auth.Permission\s that will also be deleted. Previously,
    only the content types were listed (and this prompt was after migrate
    rather than in a separate command).

:mod:django.contrib.gis

  • The new :meth:.GEOSGeometry.from_gml and :meth:.OGRGeometry.from_gml
    methods allow creating geometries from GML.
  • Added support for the :lookup:dwithin lookup on SpatiaLite.
  • The :class:~django.contrib.gis.db.models.functions.Area function,
    :class:~django.contrib.gis.db.models.functions.Distance function, and
    distance lookups now work with geodetic coordinates on SpatiaLite.
  • The OpenLayers-based form widgets now use OpenLayers.js from
    https://cdnjs.cloudflare.com which is more suitable for production use
    than the the old http://openlayers.org source. They are also updated to
    use OpenLayers 3.
  • PostGIS migrations can now change field dimensions.
  • Added the ability to pass the size, shape, and offset parameter when
    creating :class:~django.contrib.gis.gdal.GDALRaster objects.
  • Added SpatiaLite support for the
    :class:~django.contrib.gis.db.models.functions.IsValid function,
    :class:~django.contrib.gis.db.models.functions.MakeValid function, and
    :lookup:isvalid lookup.
  • Added Oracle support for the
    :class:~django.contrib.gis.db.models.functions.AsGML function,
    :class:~django.contrib.gis.db.models.functions.BoundingCircle function,
    :class:~django.contrib.gis.db.models.functions.IsValid function, and
    :lookup:isvalid lookup.

:mod:django.contrib.postgres

  • The new distinct argument for
    :class:~django.contrib.postgres.aggregates.StringAgg determines if
    concatenated values will be distinct.
  • The new :class:~django.contrib.postgres.indexes.GinIndex and
    :class:~django.contrib.postgres.indexes.BrinIndex classes allow
    creating GIN and BRIN indexes in the database.
  • :class:~django.contrib.postgres.fields.JSONField accepts a new encoder
    parameter to specify a custom class to encode data types not supported by the
    standard encoder.
  • The new :class:~django.contrib.postgres.fields.CIText mixin and
    :class:~django.contrib.postgres.operations.CITextExtension migration
    operation allow using PostgreSQL's citext extension for case-insensitive
    lookups. Three fields are provided: :class:.CICharField,
    :class:.CIEmailField, and :class:.CITextField.
  • The new :class:~django.contrib.postgres.aggregates.JSONBAgg allows
    aggregating values as a JSON array.
  • The :class:~django.contrib.postgres.fields.HStoreField (model field) and
    :class:~django.contrib.postgres.forms.HStoreField (form field) allow
    storing null values.

Cache

  • Memcached backends now pass the contents of :setting:OPTIONS &lt;CACHES-OPTIONS&gt;
    as keyword arguments to the client constructors, allowing for more advanced
    control of client behavior. See the :ref:cache arguments &lt;cache_arguments&gt;
    documentation for examples.
  • Memcached backends now allow defining multiple servers as a comma-delimited
    string in :setting:LOCATION &lt;CACHES-LOCATION&gt;, for convenience with
    third-party services that use such strings in environment variables.

CSRF

  • Added the :setting:CSRF_USE_SESSIONS setting to allow storing the CSRF
    token in the user's session rather than in a cookie.

Database backends

  • Added the skip_locked argument to :meth:.QuerySet.select_for_update()
    on PostgreSQL 9.5+ and Oracle to execute queries with
    FOR UPDATE SKIP LOCKED.
  • Added the :setting:TEST[&#39;TEMPLATE&#39;] &lt;TEST_TEMPLATE&gt; setting to let
    PostgreSQL users specify a template for creating the test database.
  • :meth:.QuerySet.iterator() now uses :ref:server-side cursors &lt;psycopg2:server-side-cursors&gt; on PostgreSQL. This feature transfers some of
    the worker memory load (used to hold query results) to the database and might
    increase database memory usage.
  • Added MySQL support for the &#39;isolation_level&#39; option in
    :setting:OPTIONS to allow specifying the :ref:transaction isolation level &lt;mysql-isolation-level&gt;. To avoid possible data loss, it's recommended to
    switch from MySQL's default level, repeatable read, to read committed.
  • Added support for cx_Oracle 5.3.

Email

  • Added the :setting:EMAIL_USE_LOCALTIME setting to allow sending SMTP date
    headers in the local time zone rather than in UTC.
  • EmailMessage.attach() and attach_file() now fall back to MIME type
    application/octet-stream when binary content that can't be decoded as
    UTF-8 is specified for a text/* attachment.

File Storage

  • To make it wrappable by :class:io.TextIOWrapper,
    :class:~django.core.files.File now has the readable(), writable(),
    and seekable() methods.

Forms

  • The new :attr:CharField.empty_value &lt;django.forms.CharField.empty_value&gt;
    attribute allows specifying the Python value to use to represent "empty".
  • The new :meth:Form.get_initial_for_field() &lt;django.forms.Form.get_initial_for_field&gt; method returns initial data for a
    form field.

Internationalization

  • Number formatting and the :setting:NUMBER_GROUPING setting support
    non-uniform digit grouping.

Management Commands

  • The new :option:loaddata --exclude option allows excluding models and apps
    while loading data from fixtures.
  • The new :option:diffsettings --default option allows specifying a settings
    module other than Django's default settings to compare against.
  • app_label\s arguments now limit the :option:showmigrations --plan
    output.

Migrations

  • Added support for serialization of uuid.UUID objects.

Models

  • Added support for callable values in the defaults argument of
    :meth:QuerySet.update_or_create() &lt;django.db.models.query.QuerySet.update_or_create&gt; and
    :meth:~django.db.models.query.QuerySet.get_or_create.
  • :class:~django.db.models.ImageField now has a default
    :data:~django.core.validators.validate_image_file_extension validator.
  • Added support for time truncation to
    :class:~django.db.models.functions.datetime.Trunc functions.
  • Added the :class:~django.db.models.functions.datetime.ExtractWeek function
    to extract the week from :class:~django.db.models.DateField and
    :class:~django.db.models.DateTimeField and exposed it through the
    :lookup:week lookup.
  • Added the :class:~django.db.models.functions.datetime.TruncTime function
    to truncate :class:~django.db.models.DateTimeField to its time component
    and exposed it through the :lookup:time lookup.
  • Added support for expressions in :meth:.QuerySet.values and
    :meth:~.QuerySet.values_list.
  • Added support for query expressions on lookups that take multiple arguments,
    such as range.
  • You can now use the unique=True option with
    :class:~django.db.models.FileField.
  • Added the nulls_first and nulls_last parameters to
    :class:Expression.asc() &lt;django.db.models.Expression.asc&gt; and
    :meth:~django.db.models.Expression.desc to control
    the ordering of null values.
  • The new F expression bitleftshift() and bitrightshift() methods
    allow :ref:bitwise shift operations &lt;using-f-expressions-in-filters&gt;.
  • Added :meth:.QuerySet.union, :meth:~.QuerySet.intersection, and
    :meth:~.QuerySet.difference.

Requests and Responses

  • Added :meth:QueryDict.fromkeys() &lt;django.http.QueryDict.fromkeys&gt;.
  • :class:~django.middleware.common.CommonMiddleware now sets the
    Content-Length response header for non-streaming responses.
  • Added the :setting:SECURE_HSTS_PRELOAD setting to allow appending the
    preload directive to the Strict-Transport-Security header.
  • :class:~django.middleware.http.ConditionalGetMiddleware now adds the
    ETag header to responses.

Serialization

  • The new django.core.serializers.base.Serializer.stream_class attribute
    allows subclasses to customize the default stream.
  • The encoder used by the :ref:JSON serializer &lt;serialization-formats-json&gt;
    can now be customized by passing a cls keyword argument to the
    serializers.serialize() function.
  • :class:~django.core.serializers.json.DjangoJSONEncoder now serializes
    :class:~datetime.timedelta objects (used by
    :class:~django.db.models.DurationField).

Templates

  • :meth:~django.utils.safestring.mark_safe can now be used as a decorator.
  • The :class:~django.template.backends.jinja2.Jinja2 template backend now
    supports context processors by setting the &#39;context_processors&#39; option in
    :setting:OPTIONS &lt;TEMPLATES-OPTIONS&gt;.
  • The :ttag:regroup tag now returns namedtuple\s instead of dictionaries
    so you can unpack the group object directly in a loop, e.g.
    {% for grouper, list in regrouped %}.
  • Added a :ttag:resetcycle template tag to allow resetting the sequence of
    the :ttag:cycle template tag.
  • You can now specify specific directories for a particular
    :class:filesystem.Loader &lt;django.template.loaders.filesystem.Loader&gt;.

Tests

  • Added :meth:.DiscoverRunner.get_test_runner_kwargs to allow customizing the
    keyword arguments passed to the test runner.
  • Added the :option:test --debug-mode option to help troubleshoot test
    failures by setting the :setting:DEBUG setting to True.
  • The new :func:django.test.utils.setup_databases (moved from
    django.test.runner) and :func:~django.test.utils.teardown_databases
    functions make it easier to build custom test runners.
  • Added support for :meth:python:unittest.TestCase.subTest’s when using the
    :option:test --parallel option.
  • DiscoverRunner now runs the system checks at the start of a test run.
    Override the :meth:.DiscoverRunner.run_checks method if you want to disable
    that.

Validators

  • Added :class:~django.core.validators.FileExtensionValidator to validate
    file extensions and
    :data:~django.core.validators.validate_image_file_extension to validate
    image files.

.. _backwards-incompatible-1.11:

Backwards incompatible changes in 1.11

:mod:django.contrib.gis

  • To simplify the codebase and because it's easier to install than when
    contrib.gis was first released, :ref:gdalbuild is now a required
    dependency for GeoDjango. In older versions, it's only required for SQLite.
  • contrib.gis.maps is removed as it interfaces with a retired version of
    the Google Maps API and seems to be unmaintained. If you're using it, let us know &lt;https://code.djangoproject.com/ticket/14284&gt;_.
  • The GEOSGeometry equality operator now also compares SRID.
  • The OpenLayers-based form widgets now use OpenLayers 3, and the
    gis/openlayers.html and gis/openlayers-osm.html templates have been
    updated. Check your project if you subclass these widgets or extend the
    templates. Also, the new widgets work a bit differently than the old ones.
    Instead of using a toolbar in the widget, you click to draw, click and drag
    to move the map, and click and drag a point/vertex/corner to move it.
  • Support for SpatiaLite < 4.0 is dropped.
  • Support for GDAL 1.7 and 1.8 is dropped.
  • The widgets in contrib.gis.forms.widgets and the admin's
    OpenLayersWidget use the :doc:form rendering API &lt;/ref/forms/renderers&gt;
    rather than loader.render_to_string(). If you're using a custom widget
    template, you'll need to be sure your form renderer can locate it. For
    example, you could use the :class:~django.forms.renderers.TemplatesSetting
    renderer.

:mod:django.contrib.staticfiles

  • collectstatic may now fail during post-processing when using a hashed
    static files storage if a reference loop exists (e.g. &#39;foo.css&#39;
    references &#39;bar.css&#39; which itself references &#39;foo.css&#39;) or if the
    chain of files referencing other files is too deep to resolve in several
    passes. In the latter case, increase the number of passes using
    :attr:.ManifestStaticFilesStorage.max_post_process_passes.
  • When using ManifestStaticFilesStorage, static files not found in the
    manifest at runtime now raise a ValueError instead of returning an
    unchanged path. You can revert to the old behavior by setting
    :attr:.ManifestStaticFilesStorage.manifest_strict to False.

Database backend API

  • The DatabaseOperations.time_trunc_sql() method is added to support
    TimeField truncation. It accepts a lookup_type and field_name
    arguments and returns the appropriate SQL to truncate the given time field
    field_name to a time object with only the given specificity. The
    lookup_type argument can be either &#39;hour&#39;, &#39;minute&#39;, or
    &#39;second&#39;.
  • The DatabaseOperations.datetime_cast_time_sql() method is added to
    support the :lookup:time lookup. It accepts a field_name and tzname
    arguments and returns the SQL necessary to cast a datetime value to time value.
  • To enable FOR UPDATE SKIP LOCKED support, set
    DatabaseFeatures.has_select_for_update_skip_locked = True.
  • The new DatabaseFeatures.supports_index_column_ordering attribute
    specifies if a database allows defining ordering for columns in indexes. The
    default value is True and the DatabaseIntrospection.get_constraints()
    method should include an &#39;orders&#39; key in each of the returned
    dictionaries with a list of &#39;ASC&#39; and/or &#39;DESC&#39; values corresponding
    to the the ordering of each column in the index.
  • :djadmin:inspectdb no longer calls DatabaseIntrospection.get_indexes()
    which is deprecated. Custom database backends should ensure all types of
    indexes are returned by DatabaseIntrospection.get_constraints().
  • Renamed the ignores_quoted_identifier_case feature to
    ignores_table_name_case to more accurately reflect how it is used.
  • The name keyword argument is added to the
    DatabaseWrapper.create_cursor(self, name=None) method to allow usage of
    server-side cursors on backends that support it.

Dropped support for PostgreSQL 9.2 and PostGIS 2.0

Upstream support for PostgreSQL 9.2 ends in September 2017. As a consequence,
Django 1.11 sets PostgreSQL 9.3 as the minimum version it officially supports.

Support for PostGIS 2.0 is also removed as PostgreSQL 9.2 is the last version
to support it.

Also, the minimum supported version of psycopg2 is increased from 2.4.5 to
2.5.4.

LiveServerTestCase binds to port zero

Rather than taking a port range and iterating to find a free port,
LiveServerTestCase binds to port zero and relies on the operating system
to assign a free port. The DJANGO_LIVE_TEST_SERVER_ADDRESS environment
variable is no longer used, and as it's also no longer used, the
manage.py test --liveserver option is removed.

Protection against insecure redirects in :mod:django.contrib.auth and i18n views

LoginView, LogoutView (and the deprecated function-based equivalents),
and :func:~django.views.i18n.set_language protect users from being redirected
to non-HTTPS next URLs when the app is running over HTTPS.

QuerySet.get_or_create() and update_or_create() validate arguments

To prevent typos from passing silently,
:meth:~django.db.models.query.QuerySet.get_or_create and
:meth:~django.db.models.query.QuerySet.update_or_create check that their
arguments are model fields. This should be backwards-incompatible only in the
fact that it might expose a bug in your project.

pytz is a required dependency and support for settings.TIME_ZONE = None is removed

To simplify Django's timezone handling, pytz is now a required dependency.
It's automatically installed along with Django.

Support for settings.TIME_ZONE = None is removed as the behavior isn't
commonly used and is questionably useful. If you want to automatically detect
the timezone based on the system timezone, you can use tzlocal &lt;https://pypi.python.org/pypi/tzlocal&gt;_::

from tzlocal import get_localzone

TIME_ZONE = get_localzone().zone

This works similar to settings.TIME_ZONE = None except that it also sets
os.environ[&#39;TZ&#39;]. Let us know &lt;https://groups.google.com/d/topic/django-developers/OAV3FChfuPM/discussion&gt;__
if there's a use case where you find you can't adapt your code to set a
TIME_ZONE.

HTML changes in admin templates

&lt;p class=&quot;help&quot;&gt; is replaced with a &lt;div&gt; tag to allow including lists
inside help text.

Read-only fields are wrapped in &lt;div class=&quot;readonly&quot;&gt;...&lt;/div&gt; instead of
&lt;p&gt;...&lt;/p&gt; to allow any kind of HTML as the field's content.

.. _template-widget-incompatibilities-1-11:

Changes due to the introduction of template-based widget rendering

Some undocumented classes in django.forms.widgets are removed:

  • SubWidget
  • RendererMixin, ChoiceFieldRenderer, RadioFieldRenderer,
    CheckboxFieldRenderer
  • ChoiceInput, RadioChoiceInput, CheckboxChoiceInput

The Widget.format_output() method is removed. Use a custom widget template
instead.

Some widget values, such as &lt;select&gt; options, are now localized if
settings.USE_L10N=True. You could revert to the old behavior with custom
widget templates that uses the :ttag:localize template tag to turn off
localization.

django.template.backends.django.Template.render() prohibits non-dict context

For compatibility with multiple template engines,
django.template.backends.django.Template.render() (returned from high-level
template loader APIs such as loader.get_template()) must receive a
dictionary of context rather than Context or RequestContext. If you
were passing either of the two classes, pass a dictionary instead -- doing so
is backwards-compatible with older versions of Django.

Model state changes in migration operations

To improve the speed of applying migrations, rendering of related models is
delayed until an operation that needs them (e.g. RunPython). If you have a
custom operation that works with model classes or model instances from the
from_state argument in database_forwards() or database_backwards(),
you must render model states using the clear_delayed_apps_cache() method as
described in :ref:writing your own migration operation &lt;writing-your-own-migration-operation&gt;.

Miscellaneous

  • If no items in the feed have a pubdate or updateddate attribute,
    :meth:SyndicationFeed.latest_post_date() &lt;django.utils.feedgenerator.SyndicationFeed.latest_post_date&gt; now returns
    the current UTC date/time, instead of a datetime without any timezone
    information.
  • CSRF failures are logged to the django.security.csrf logger instead of
    django.request.
  • :setting:ALLOWED_HOSTS validation is no longer disabled when running tests.
    If your application includes tests with custom host names, you must include
    those host names in :setting:ALLOWED_HOSTS. See
    :ref:topics-testing-advanced-multiple-hosts.
  • Using a foreign key's id (e.g. &#39;field_id&#39;) in ModelAdmin.list_display
    displays the related object's ID. Remove the _id suffix if you want the
    old behavior of the string representation of the object.
  • In model forms, :class:~django.db.models.CharField with null=True now
    saves NULL for blank values instead of empty strings.
  • On Oracle, :meth:Model.validate_unique() &lt;django.db.models.Model.validate_unique&gt; no longer checks empty strings for
    uniqueness as the database interprets the value as NULL.
  • If you subclass :class:.AbstractUser and override clean(), be sure it
    calls super(). :meth:.BaseUserManager.normalize_email is called in a
    new :meth:.AbstractUser.clean method so that normalization is applied in
    cases like model form validation.
  • EmailField and URLField no longer accept the strip keyword
    argument. Remove it because it doesn't have an effect in older versions of
    Django as these fields always strip whitespace.
  • The checked and selected attribute rendered by form widgets now uses
    HTML5 boolean syntax rather than XHTML's checked=&#39;checked&#39; and
    selected=&#39;selected&#39;.
  • :meth:RelatedManager.add() &lt;django.db.models.fields.related.RelatedManager.add&gt;,
    :meth:~django.db.models.fields.related.RelatedManager.remove,
    :meth:~django.db.models.fields.related.RelatedManager.clear, and
    :meth:~django.db.models.fields.related.RelatedManager.set now
    clear the prefetch_related() cache.
  • To prevent possible loss of saved settings,
    :func:~django.test.utils.setup_test_environment now raises an exception if
    called a second time before calling
    :func:~django.test.utils.teardown_test_environment.
  • The undocumented DateTimeAwareJSONEncoder alias for
    :class:~django.core.serializers.json.DjangoJSONEncoder (renamed in Django
    1.0) is removed.
  • The :class:cached template loader &lt;django.template.loaders.cached.Loader&gt;
    is now enabled if :setting:DEBUG is False and
    :setting:OPTIONS[&#39;loaders&#39;] &lt;TEMPLATES-OPTIONS&gt; isn't specified. This could
    be backwards-incompatible if you have some :ref:template tags that aren&#39;t thread safe &lt;template_tag_thread_safety&gt;.
  • The prompt for stale content type deletion no longer occurs after running the
    migrate command. Use the new :djadmin:remove_stale_contenttypes command
    instead.
  • The admin's widget for IntegerField uses type=&quot;number&quot; rather than
    type=&quot;text&quot;.
  • Conditional HTTP headers are now parsed and compared according to the
    :rfc:7232 Conditional Requests specification rather than the older
    :rfc:2616.
  • :func:~django.utils.cache.patch_response_headers no longer adds a
    Last-Modified header. According to the :rfc:7234section-4.2.2, this
    header is useless alongside other caching headers that provide an explicit
    expiration time, e.g. Expires or Cache-Control.
    :class:~django.middleware.cache.UpdateCacheMiddleware and
    :func:~django.utils.cache.add_never_cache_headers call
    patch_response_headers() and therefore are also affected by this change.
  • In the admin templates, &lt;p class=&quot;help&quot;&gt; is replaced with a &lt;div&gt; tag
    to allow including lists inside help text.
  • :class:~django.middleware.http.ConditionalGetMiddleware no longer sets the
    Date header as Web servers set that header. It also no longer sets the
    Content-Length header as this is now done by
    :class:~django.middleware.common.CommonMiddleware.
  • :meth:~django.apps.AppConfig.get_model and
    :meth:~django.apps.AppConfig.get_models now raise
    :exc:~django.core.exceptions.AppRegistryNotReady if they're called before
    models of all applications have been loaded. Previously they only required
    the target application's models to be loaded and thus could return models
    without all their relations set up. If you need the old behavior of
    get_model(), set the require_ready argument to False.
  • The unused BaseCommand.can_import_settings attribute is removed.
  • The undocumented django.utils.functional.lazy_property is removed.
  • For consistency with non-multipart requests, MultiPartParser.parse() now
    leaves request.POST immutable. If you're modifying that QueryDict,
    you must now first copy it, e.g. request.POST.copy().
  • Support for cx_Oracle < 5.2 is removed.
  • Support for IPython < 1.0 is removed from the shell command.

.. _deprecated-features-1.11:

Features deprecated in 1.11

models.permalink() decorator

Use :func:django.urls.reverse instead. For example::

from django.db import models

class MyModel(models.Model):
...

   models.permalink
   def url(self):
       return (&#39;guitarist_detail&#39;, [self.slug])

becomes::

from django.db import models
from django.urls import reverse

class MyModel(models.Model):
...

   def url(self):
       return reverse(&#39;guitarist_detail&#39;, args=[self.slug])

Miscellaneous

  • contrib.auth’s login() and logout() function-based views are
    deprecated in favor of new class-based views
    :class:~django.contrib.auth.views.LoginView and
    :class:~django.contrib.auth.views.LogoutView.
  • The unused extra_context parameter of
    contrib.auth.views.logout_then_login() is deprecated.
  • contrib.auth’s password_change(), password_change_done(),
    password_reset(), password_reset_done(), password_reset_confirm(),
    and ``p

@jezdez jezdez closed this May 8, 2017
@jezdez jezdez deleted the pyup-initial-update branch May 8, 2017 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants