Django

Code

Ticket #7830 (closed: fixed)

Opened 5 months ago

Last modified 4 months ago

removal of some deprecated features for 1.0

Reported by: gwilson Assigned to:
Milestone: 1.0 beta Component: Uncategorized
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

deprecated.patch (24.5 kB) - added by gwilson on 07/19/08 00:59:04.

Change History

07/19/08 00:59:04 changed by gwilson

  • attachment deprecated.patch added.

07/19/08 01:00:15 changed by gwilson

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

(follow-up: ↓ 11 ) 07/19/08 07:23:56 changed 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.

07/21/08 09:54:47 changed by jacob

  • milestone changed from 1.0 alpha to 1.0 beta.

07/21/08 11:09:22 changed 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)?

08/01/08 23:56:11 changed 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

08/02/08 21:52:47 changed by gwilson

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

08/03/08 12:26:50 changed by gwilson

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

08/03/08 13:05:51 changed by gwilson

  • owner deleted.
  • has_patch deleted.
  • 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.

08/03/08 13:25:11 changed 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.

08/03/08 14:51:00 changed 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."

(in reply to: ↑ 2 ; follow-up: ↓ 12 ) 08/03/08 21:26:35 changed 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?

(in reply to: ↑ 11 ) 08/04/08 06:49:57 changed 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.

08/08/08 16:04:18 changed by jacob

  • stage changed from Design decision needed to Accepted.

08/10/08 16:10:49 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

(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.

Add/Change #7830 (removal of some deprecated features for 1.0)




Change Properties
Action