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

Scheduled biweekly dependency update for week 49 #1189

Merged
merged 7 commits into from
Dec 11, 2023

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Dec 4, 2023

Update flake8-bugbear from 23.9.16 to 23.12.2.

Changelog

23.12.2

* B018: to detect useless-statements at all levels (434)
* B018: Add classname to b018 useless-expression output (433)
* B018: Include tuples in b018 useless-statement check (432)

23.11.28

* B035: Fix false positive when named expressions are used (430)

23.11.26

* B035: add check for static keys in dict-comprehension (426)
* B902: Add exceptions for standard library metaclasses (415)
* B017: Modify to no longer have a false negative when raises() is imported
directly from pytest (424)
* B026: Fix bug where the check was not triggered for calls where the caller
is an attribute (420)
Links

Update sphinx_rtd_theme from 1.3.0 to 2.0.0.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update django-filter from 23.3 to 23.4.

Changelog

23.4

-------------------------

* Official support for Django 5.0 and Python 3.12.

* Fix DeprecationWarning for pkgutil.find_loader.

Thanks to `wmorrell`.

* Adopted Furo theme for docs.
Links

Update django-polymorphic from 3.1.0 to 3.1.0.

Changelog

3.1

---------------------------

* Added support for Django 4.0.
* Fixed crash when the admin "add type" view has no choices; will show a permission denied.
* Fixed missing ``locale`` folder in sdist.
* Fixed missing ``QuerySet.bulk_create(.., ignore_conflicts=True)`` parameter support.
* Fixed ``FilteredRelation`` support.
* Fixed supporting class keyword arguments in model definitions for ``__init_subclass__()``.
* Fixed including ``polymorphic.tests.migrations`` in the sdist.
* Fixed non-polymorphic parent handling, which has no ``_base_objects``.
* Fixed missing ``widgets`` support for ``modelform_factory()``.
* Fixed ``has_changed`` handling for ``polymorphic_ctype_id`` due to implicit str to int conversions.
* Fixed ``Q`` object handling when lists are used (e.g. in django-advanced-filters_).
* Fixed Django Admin support when using a script-prefix.

Many thanks to everyone providing clear pull requests!

3.0.0

-----------------------------

* Support for Django 3.X
* Dropped support for python 2.X
* A lot of various fixes and improvements by various authors. Thanks a lot!

2.1.2

-----------------------------

* Fix ``PolymorphicInlineModelAdmin`` media jQuery include for Django 2.0+

2.1.1

-----------------------------

* Fixed admin import error due to ``isort`` changes.

2.1

---------------------------

* Added Django 2.2 support.
* Changed ``.non_polymorphic()``, to use a different iterable class that completely cirvumvent polymorphic.
* Changed SQL for ``instance_of`` filter: use ``IN`` statement instead of ``OR`` clauses.
* Changed queryset iteration to implement ``prefetch_related()`` support.
* Fixed Django 3.0 alpha compatibility.
* Fixed compatibility with current django-extra-views_ in ``polymorphic.contrib.extra_views``.
* Fixed ``prefetch_related()`` support on polymorphic M2M relations.
* Fixed model subclass ``___`` selector for abstract/proxy models.
* Fixed model subclass ``___`` selector for models with a custom ``OneToOneField(parent_link=True)``.
* Fixed unwanted results on calling ``queryset.get_real_instances([])``.
* Fixed unwanted ``TypeError`` exception when ``PolymorphicTypeInvalid`` should have raised.
* Fixed hiding the add-button of polymorphic lines in the Django admin.
* Reformatted all files with black

2.0.3

-----------------------------

* Fixed admin crash for Django 2.1 with missing ``use_required_attribute``.

2.0.2

-----------------------------

* Fixed manager inheritance behavior for Django 1.11, by automatically enabling ``Meta.manager_inheritance_from_future`` if it's not defined.
This restores the manager inheritance behavior that *django-polymorphic 1.3* provided for Django 1.x projects.
* Fixed internal ``base_objects`` usage.

2.0.1

-----------------------------

* Fixed manager inheritance detection for Django 1.11.

It's recommended to use ``Meta.manager_inheritance_from_future`` so Django 1.x code also inherit
the ``PolymorphicManager`` in all subclasses. Django 2.0 already does this by default.

* Deprecated the ``base_objects`` manager. Use ``objects.non_polymorphic()`` instead.
* Optimized detection for dumpdata behavior, avoiding the performance hit of ``__getattribute__()``.
* Fixed test management commands

2.0

---------------------------

* **BACKWARDS INCOMPATIBILITY:** Dropped Django 1.8 and 1.10 support.
* **BACKWARDS INCOMPATIBILITY:** Removed old deprecated code from 1.0, thus:

* Import managers from ``polymorphic.managers`` (plural), not ``polymorphic.manager``.
* Register child models to the admin as well using ``admin.register()`` or ``admin.site.register()``,
as this is no longer done automatically.

* Added Django 2.0 support.

1.3.1

--------------------------

Backported various fixes from 2.x to support older Django versions:

* Added ``PolymorphicTypeUndefined`` exception for incomplete imported models.
When a data migration or import creates an polymorphic model,
the ``polymorphic_ctype_id`` field should be filled in manually too.
The ``polymorphic.utils.reset_polymorphic_ctype`` function can be used for that.
* Added ``PolymorphicTypeInvalid`` exception when database was incorrectly imported.
* Added ``polymorphic.utils.get_base_polymorphic_model()`` to find the base model for types.
* Using ``base_model`` on the polymorphic admins is no longer required, as this can be autodetected.
* Fixed manager errors for swappable models.
* Fixed ``deleteText`` of ``|as_script_options`` template filter.
* Fixed ``.filter(applabel__ModelName___field=...)`` lookups.
* Fixed proxy model support in formsets.
* Fixed error with .defer and child models that use the same parent.
* Fixed error message when ``polymorphic_ctype_id`` is null.
* Fixed fieldsets recursion in the admin.
* Improved ``polymorphic.utils.reset_polymorphic_ctype()`` to accept models in random ordering.
* Fix fieldsets handling in the admin (``declared_fieldsets`` is removed since Django 1.9)

1.3

------------------------

* **BACKWARDS INCOMPATIBILITY:** Dropped Django 1.4, 1.5, 1.6, 1.7, 1.9 and Python 2.6 support.
Only official Django releases (1.8, 1.10, 1.11) are supported now.
* Allow expressions to pass unchanged in ``.order_by()``
* Fixed Django 1.11 accessor checks (to support subclasses of ``ForwardManyToOneDescriptor``, like ``ForwardOneToOneDescriptor``)
* Fixed polib syntax error messages in translations.

1.2

------------------------

* Django 1.11 support.
* Fixed ``PolymorphicInlineModelAdmin`` to explictly exclude ``polymorphic_ctype``.
* Fixed Python 3 TypeError in the admin when preserving the query string.
* Fixed Python 3 issue due to ``force_unicode()`` usage instead of ``force_text()``.
* Fixed ``z-index`` attribute for admin menu appearance.

1.1

------------------------

* Added class based formset views in ``polymorphic/contrib/extra_views``.
* Added helper function ``polymorphic.utils.reset_polymorphic_ctype()``.
This eases the migration old existing models to polymorphic.
* Fixed Python 2.6 issue.
* Fixed Django 1.6 support.

1.0.2

--------------------------

* Added helper function for django-guardian_; add
``GUARDIAN_GET_CONTENT_TYPE = 'polymorphic.contrib.guardian.get_polymorphic_base_content_type'``
to the project settings to let guardian handles inherited models properly.
* Fixed ``polymorphic_modelformset_factory()`` usage.
* Fixed Python 3 bug for inline formsets.
* Fixed CSS for Grappelli, so model choice menu properly overlaps.
* Fixed ``ParentAdminNotRegistered`` exception for models that are registered via a proxy model instead of the real base model.

1.0.1

--------------------------

* Fixed compatibility with manager changes in Django 1.10.1

1.0

------------------------

* Added Django 1.10 support.
* Added **admin inline** support for polymorphic models.
* Added **formset** support for polymorphic models.
* Added support for polymorphic queryset limiting effects on *proxy models*.
* Added support for multiple databases with the ``.using()`` method and ``using=..`` keyword argument.
* Fixed modifying passed ``Q()`` objects in place.

.. note::
This version provides a new method for registering the admin models.
While the old method is still supported, we recommend to upgrade your code.
The new registration style improves the compatibility in the Django admin.

* Register each ``PolymorphicChildModelAdmin`` with the admin site too.
* The ``child_models`` attribute of the ``PolymorphicParentModelAdmin`` should be a flat list of all child models.
  The ``(model, admin)`` tuple is obsolete.

Also note that proxy models will now limit the queryset too.


Fixed since 1.0b1 (2016-08-10)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Fix formset empty-form display when there are form errors.
* Fix formset empty-form hiding for Grappelli_.
* Fixed packing ``admin/polymorphic/edit_inline/stacked.html`` in the wheel format.

0.9.2

--------------------------

* Fix error when using ``date_hierarchy`` field in the admin
* Fixed Django 1.10 warning in admin add-type view.

0.9.1

--------------------------

* Fixed support for ``PolymorphicManager.from_queryset()`` for custom query sets.
* Fixed Django 1.7 ``changeform_view()`` redirection to the child admin site.
This fixes custom admin code that uses these views, such as django-reversion_'s ``revision_view()`` / ``recover_view()``.
* Fixed ``.only('pk')`` field support.
* Fixed ``object_history_template`` breadcrumb.
**NOTE:** when using django-reversion_ / django-reversion-compare_, make sure to implement
a ``admin/polymorphic/object_history.html`` template in your project that extends
from ``reversion/object_history.html`` or ``reversion-compare/object_history.html`` respectively.

0.9

------------------------

* Added ``.only()`` and ``.defer()`` support.
* Added support for Django 1.8 complex expressions in ``.annotate()`` / ``.aggregate()``.
* Fix Django 1.9 handling of custom URLs.
The new change-URL redirect overlapped any custom URLs defined in the child admin.
* Fix Django 1.9 support in the admin.
* Fix setting an extra custom manager without overriding the ``_default_manager``.
* Fix missing ``history_view()`` redirection to the child admin, which is important for django-reversion_ support.
See the documentation for hints for :ref:`django-reversion-compare support <django-reversion-compare-support>`.

0.8.1

--------------------------

* Fixed support for reverse relations for ``relname___field`` when the field starts with an ``_`` character.
Otherwise, the query will be interpreted as subclass lookup (``ClassName___field``).

0.8

------------------------

* Added Django 1.9 compatibility.
* Renamed ``polymorphic.manager`` => ``polymorphic.managers`` for consistentcy.
* **BACKWARDS INCOMPATIBILITY:** The import paths have changed to support Django 1.9.
Instead of ``from polymorphic import X``,
you'll have to import from the proper package. For example:

.. code-block:: python

 from polymorphic.models import PolymorphicModel
 from polymorphic.managers import PolymorphicManager, PolymorphicQuerySet
 from polymorphic.showfields import ShowFieldContent, ShowFieldType, ShowFieldTypeAndContent

* **BACKWARDS INCOMPATIBILITY:** Removed ``__version__.py`` in favor of a standard ``__version__`` in ``polymorphic/__init__.py``.
* **BACKWARDS INCOMPATIBILITY:** Removed automatic proxying of method calls to the queryset class.
Use the standard Django methods instead:

.. code-block:: python

  In model code:
 objects = PolymorphicQuerySet.as_manager()

  For manager code:
 MyCustomManager = PolymorphicManager.from_queryset(MyCustomQuerySet)

0.7.2

--------------------------

* Added ``queryset.as_manager()`` support for Django 1.7/1.8
* Optimize model access for non-dumpdata usage; avoid ``__getattribute__()`` call each time to access the manager.
* Fixed 500 error when using invalid PK's in the admin URL, return 404 instead.
* Fixed possible issues when using an custom ``AdminSite`` class for the parent object.
* Fixed Pickle exception when polymorphic model is cached.

0.7.1

--------------------------

* Fixed Django 1.8 support for related field widgets.

0.7

------------------------

* Added Django 1.8 support
* Added support for custom primary key defined using ``mybase_ptr = models.OneToOneField(BaseClass, parent_link=True, related_name="...")``.
* Fixed Python 3 issue in the admin
* Fixed ``_default_manager`` to be consistent with Django, it's now assigned directly instead of using ``add_to_class()``
* Fixed 500 error for admin URLs without a '/', e.g. ``admin/app/parentmodel/id``.
* Fixed preserved filter for Django admin in delete views
* Removed test noise for diamond inheritance problem (which Django 1.7 detects)

0.6.1

--------------------------

* Remove Django 1.7 warnings
* Fix Django 1.4/1.5 queryset calls on related objects for unknown methods.
The ``RelatedManager`` code overrides ``get_query_set()`` while ``__getattr__()`` used the new-style ``get_queryset()``.
* Fix validate_model_fields(), caused errors when metaclass raises errors

0.6

------------------------

* Added Django 1.7 support.
* Added permission check for all child types.
* **BACKWARDS INCOMPATIBILITY:** the ``get_child_type_choices()`` method receives 2 arguments now (request, action).
If you have overwritten this method in your code, make sure the method signature is updated accordingly.

0.5.6

--------------------------

* Added ``pk_regex`` to the ``PolymorphicParentModelAdmin`` to support non-integer primary keys.
* Fixed passing ``?ct_id=`` to the add view for Django 1.6 (fixes compatibility with django-parler_).

0.5.5

--------------------------

* Fixed ``get_real_instance_class()`` for proxy models (broke in 0.5.4).

0.5.4

--------------------------

* Fix ``.non_polymorphic()`` to returns a clone of the queryset, instead of effecting the existing queryset.
* Fix missing ``alters_data = True`` annotations on the overwritten ``save()`` methods.
* Fix infinite recursion bug in the admin with Django 1.6+
* Added detection of bad ``ContentType`` table data.

0.5.3

--------------------------

* Fix TypeError when ``base_form`` was not defined.
* Fix passing ``/admin/app/model/id/XYZ`` urls to the correct admin backend.
There is no need to include a ``?ct_id=..`` field, as the ID already provides enough information.

0.5.2

--------------------------

* Fix Grappelli_ breadcrumb support in the views.
* Fix unwanted ``___`` handling in the ORM when a field name starts with an underscore;
this detects you meant ``relatedfield__ _underscorefield`` instead of ``ClassName___field``.
* Fix missing permission check in the "add type" view. This was caught however in the next step.
* Fix admin validation errors related to additional non-model form fields.

0.5.1

--------------------------

* Add Django 1.6 support.
* Fix Grappelli_ theme support in the "Add type" view.

0.5

------------------------

* Add Python 3.2 and 3.3 support
* Fix errors with ContentType objects that don't refer to an existing model.

0.4.2

--------------------------

* Used proper ``__version__`` marker.

0.4.1

--------------------------

* Add Django 1.5 and 1.6 support
* Add proxy model support
* Add default admin ``list_filter`` for polymorphic model type.
* Fix queryset support of related objects.
* Performed an overall cleanup of the project
* **Deprecated** the ``queryset_class`` argument of the ``PolymorphicManager`` constructor, use the class attribute instead.
* **Dropped** Django 1.1, 1.2 and 1.3 support

0.4

------------------------

* Update example project for Django 1.4
* Added tox and Travis configuration

0.3.1

--------------------------

* SQL optimization, avoid query in pre_save_polymorphic()

0.3

* Added a polymorphic admin interface.
* PEP8 and code cleanups by various authors

0.2

------------------------

The 0.2 release serves as legacy release.
It supports Django 1.1 up till 1.4 and Python 2.4 up till 2.7.

For a detailed list of it's changes, see the :doc:`archived changelog <changelog_archive>`.

.. _Grappelli: http://grappelliproject.com/
.. _django-advanced-filters: https://github.com/modlinltd/django-advanced-filters
.. _django-extra-views: https://github.com/AndrewIngram/django-extra-views
.. _django-guardian: https://github.com/django-guardian/django-guardian
.. _django-parler: https://github.com/django-parler/django-parler
.. _django-reversion: https://github.com/etianen/django-reversion
.. _django-reversion-compare: https://github.com/jedie/django-reversion-compare
Links

Update Faker from 20.0.3 to 20.1.0.

Changelog

20.1.0

* Add company provider and NUSS for `es_ES` locale. Thanks fgsalomon.
* Add official support for Python 3.12. Thanks pfouque.
Links

@sliverc sliverc self-requested a review December 11, 2023 14:51
@sliverc sliverc merged commit 6aaaac7 into main Dec 11, 2023
11 checks passed
@sliverc sliverc deleted the pyup-scheduled-update-2023-12-04 branch December 11, 2023 14:52
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