Django

Code

Ticket #8142 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

DeprecationWarning on Python 2.6 about tzinfo.__init__ taking no parameters

Reported by: Karen Tracey <kmtracey@gmail.com> Assigned to: nobody
Milestone: 1.0 beta Component: Uncategorized
Version: SVN Keywords: python26
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Running the test suite on [8223] with Python 2.6 beta2 I see a DeprecationWarning about tzinfo.__init__ taking no parameters:

D:\u\kmt\django\trunk\tests>\bin\Python26b2\python.exe runtests.py --settings=testsettings dateformat
d:\u\kmt\django\trunk\django\utils\tzinfo.py:40: DeprecationWarning: object.__init__() takes no parameters
  tzinfo.__init__(self, dt)
----------------------------------------------------------------------
Ran 1 test in 0.040s

OK

I believe it's a result of this Python change: http://bugs.python.org/issue1683368. That is, it's never taken a parameter and Python is only now warning about it. I'll attach a patch that removes the extraneous parameter. Tested on Python 2.3.5/2.5.1/2.6b2.

Attachments

tzinfo.diff (450 bytes) - added by Karen Tracey <kmtracey@gmail.com> on 08/06/08 16:23:23.

Change History

08/06/08 16:23:23 changed by Karen Tracey <kmtracey@gmail.com>

  • attachment tzinfo.diff added.

08/06/08 16:24:14 changed by Karen Tracey <kmtracey@gmail.com>

  • needs_better_patch changed.
  • summary changed from DeprecationWarning on Python 2.6 about tzinit.__init__ taking no parameters to DeprecationWarning on Python 2.6 about tzinfo.__init__ taking no parameters.
  • needs_tests changed.
  • needs_docs changed.

08/06/08 16:32:46 changed by Karen Tracey <kmtracey@gmail.com>

  • has_patch set to 1.

08/08/08 13:33:03 changed by mtredinnick

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

(In [8237]) Fixed #8142 -- Removed an unnecessary parameter in a superclass init call. Patch from Karen Tracey.


Add/Change #8142 (DeprecationWarning on Python 2.6 about tzinfo.__init__ taking no parameters)




Change Properties
Action