Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/postgis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
PGPASSWORD=$POSTGRES_PASSWORD psql -U $POSTGRES_USER -d $POSTGRES_DB -h localhost -c "SELECT PostGIS_full_version();"
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
- name: Create PostgreSQL settings file
run: mv ./.github/workflows/data/test_postgis.py.tpl ./tests/test_postgis.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .
- name: Run tests
run: python -Wall tests/runtests.py -v2
10 changes: 5 additions & 5 deletions .github/workflows/schedule_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .
- name: Run tests
run: python -Wall tests/runtests.py -v2
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install .
- name: Prepare site-packages
run: |
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .
- name: Run Selenium tests
working-directory: ./tests/
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
- name: Create PostgreSQL settings file
run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
- name: Create PostgreSQL settings file
run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .

- name: Run Selenium tests with screenshots
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/selenium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .
- name: Run Selenium tests
working-directory: ./tests/
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e .
- name: Create PostgreSQL settings file
run: mv ./.github/workflows/data/test_postgres.py.tpl ./tests/test_postgres.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
run: python -m pip install --upgrade pip wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .
- name: Run tests
run: python -Wall tests/runtests.py -v2
Expand Down
3 changes: 3 additions & 0 deletions django/contrib/auth/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def set_password_and_save(self, user, password_field_name="password1", commit=Tr
user.save()
return user

def __class_getitem__(cls, *args, **kwargs):
return cls


class SetUnusablePasswordMixin:
"""
Expand Down
5 changes: 3 additions & 2 deletions django/db/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,8 +1182,9 @@ def _do_update(
returning_fields,
):
"""
Try to update the model. Return True if the model was updated (if an
update query was done and a matching row was found in the DB).
Try to update the model. Return a list of updated fields if the model
was updated (if an update query was done and a matching row was
found in the DB).
"""
filtered = base_qs.filter(pk=pk_val)
if not values:
Expand Down
1 change: 0 additions & 1 deletion docs/internals/contributing/writing-code/unit-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ dependencies:
* :pypi:`PyYAML` 6.0.2+
* :pypi:`pywatchman`
* :pypi:`redis` 5.1.0+
* :pypi:`setuptools`
* :pypi:`pymemcache`, plus a `supported Python binding
<https://memcached.org/>`_
* `gettext <https://www.gnu.org/software/gettext/manual/gettext.html>`_
Expand Down
3 changes: 1 addition & 2 deletions docs/internals/howto-release-django.txt
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,7 @@ Now you're ready to actually put the release out there. To do this:

__ https://djangoci.com/job/confirm-release/

#. Upload the release packages to PyPI (for pre-releases, only upload the wheel
file):
#. Upload the release packages to PyPI:

.. code-block:: shell

Expand Down
3 changes: 3 additions & 0 deletions tests/auth_tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ def test_html_autocomplete_attributes(self):
form.fields[field_name].widget.attrs["autocomplete"], autocomplete
)

def test_user_creation_form_class_getitem(self):
self.assertIs(BaseUserCreationForm["MyCustomUser"], BaseUserCreationForm)


class CustomUserCreationFormTest(TestDataMixin, TestCase):

Expand Down
Loading