Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#7830 closed (fixed)

removal of some deprecated features for 1.0

Reported by: gwilson Owned by:
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Attached is a patch that removes:

  • "simple" cache backend
  • ObjectPaginator
  • edit_inline_type argument for ForeignKey fields
  • QOperator, QNot, QAnd and QOr
  • maxlength argument

Along with mentions of them in the docs.

Note, the following should also be removed (if applying the patch doesn't do it):

  • django/utils/maxlength.py
  • tests/regressiontests/maxlength/

Attachments (1)

deprecated.patch (24.5 KB) - added by gwilson 6 years ago.

Download all attachments as: .zip

Change History (16)

Changed 6 years ago by gwilson

comment:1 Changed 6 years ago by gwilson

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 follow-up: Changed 6 years ago by russellm

Another list of bits that need to be purged are the oldforms-specific parts of model fields. An incomplete list:

  • get_manipulator_field_names()
  • prepare_field_objs_and_params()
  • get_manipulator_fields()
  • get_manipulator_new_data()
  • flatten_data()
  • get_choices() and get_choices_default()

These aren't just in db.models.fields.init.py - they are in a few other locations, too. Doing a search for any method that mentions "manipulator" would be a pretty good starting point for finding the remainder.

comment:3 Changed 6 years ago by jacob

  • milestone changed from 1.0 alpha to 1.0 beta

comment:4 Changed 6 years ago by Alex

Is the auto_now auto_now_add stuff slated for removal(I only ask because if we keep those in then we can't remove them until 2.0 or whenever we next break backwards-compatibility)?

comment:5 Changed 6 years ago by gwilson

(In [8191]) Removed several deprecated features for 1.0 (refs #7830):

  • "simple" cache backend
  • ObjectPaginator
  • edit_inline_type argument for ForeignKey fields
  • QOperator, QNot, QAnd and QOr
  • maxlength argument

comment:6 Changed 6 years ago by gwilson

(In [8197]) Removed notes about legacy Paginator object in the generic view docs (refs #7830).

comment:7 Changed 6 years ago by gwilson

(In [8199]) Removed unused warnings import that should have been removed in [8191], refs #7830.

comment:8 Changed 6 years ago by gwilson

  • Has patch unset
  • Owner gwilson deleted
  • Triage Stage changed from Ready for checkin to Design decision needed

The following items are still issuing warnings:

  • UploadedFile properties - filename, file_name, file_size, and chunk. IMO, we should go ahead and remove these; weren't they only around for 6 days ([7814] to [7859])!?
  • Using uploaded-files-as-dictionaries. This should stay around for 1.0 and be removed next release.
  • form_for_model and form_for_instance. I'm not sure what the latest fate of these two functions are. Anyone have a status update?
  • Attempting to import django.newforms. I assume we are also going to want to keep this for 1.0 and remove next release.
  • Use of the follow argument in create/update generic views. This should probably get removed as part of #7742.

comment:9 Changed 6 years ago by Alex

I don't think we can remove in the next release, 1.0 is supposed to mean backward compatibility going forward, aka everything that works on 1.0 will work with 1.1, etc. So I don't think that lets us remove things.

comment:10 Changed 6 years ago by gwilson

Hmm... according to the contributing documentation, it looks like we actually need to remove all deprecated features before 1.0:

"A minor release may deprecate certain features in previous releases. If a feature in version A.B is deprecated, it will continue to work in version A.B+1. In version A.B+2, use of the feature will raise a PendingDeprecationWarning but will continue to work. Version A.B+3 will remove the feature entirely. Major point releases will always remove deprecated features immediately."

comment:11 in reply to: ↑ 2 ; follow-up: Changed 6 years ago by gwilson

Replying to russellm:

Another list of bits that need to be purged are the oldforms-specific parts of model fields. An incomplete list:

These should probably be removed with #7742, don't you think?

comment:12 in reply to: ↑ 11 Changed 6 years ago by russellm

Replying to gwilson:

Replying to russellm:

Another list of bits that need to be purged are the oldforms-specific parts of model fields. An incomplete list:

These should probably be removed with #7742, don't you think?

I didn't notice #7742 when I commented on this ticket. Yes, oldforms bits should be removed as part of #7742.

comment:13 Changed 6 years ago by jacob

  • Triage Stage changed from Design decision needed to Accepted

comment:14 Changed 6 years ago by gwilson

  • Resolution set to fixed
  • Status changed from new to closed

(In [8291]) Fixed #7830 -- Removed all of the remaining, deprecated, non-oldforms features:

  • Support for representing files as strings was removed. Use django.core.files.base.ContentFile instead.
  • Support for representing uploaded files as dictionaries was removed. Use django.core.files.uploadedfile.SimpleUploadedFile instead.
  • The filename, file_name, file_size, and chuck properties of UploadedFile were removed. Use the name, name, size, and chunks properties instead, respectively.
  • The get_FIELD_filename, get_FIELD_url, get_FIELD_size, and save_FIELD_file methods for Models with FileField fields were removed. Instead, use the path, url, and size attributes and save method on the field itself, respectively.
  • The get_FIELD_width and get_FIELD_height methods for Models with ImageField fields were removed. Use the width and height attributes on the field itself instead.
  • The dispatcher connect, disconnect, send, and sendExact functions were removed. Use the signal object's own connect, disconnect, send, and send methods instead, respectively.
  • The form_for_model and form_for_instance functions were removed. Use a ModelForm subclass instead.
  • Support for importing django.newforms was removed. Use django.forms instead.
  • Support for importing django.utils.images was removed. Use django.core.files.images instead.
  • Support for the follow argument in the create_object and update_object generic views was removed. Use the django.forms package and the new form_class argument instead.

comment:15 Changed 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.