Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8142 closed (fixed)

DeprecationWarning on Python 2.6 about tzinfo.__init__ taking no parameters

Reported by: Karen Tracey <kmtracey@…> Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords: python26
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 (1)

tzinfo.diff (450 bytes ) - added by Karen Tracey <kmtracey@…> 16 years ago.

Download all attachments as: .zip

Change History (5)

by Karen Tracey <kmtracey@…>, 16 years ago

Attachment: tzinfo.diff added

comment:1 by Karen Tracey <kmtracey@…>, 16 years ago

Summary: DeprecationWarning on Python 2.6 about tzinit.__init__ taking no parametersDeprecationWarning on Python 2.6 about tzinfo.__init__ taking no parameters

comment:2 by Karen Tracey <kmtracey@…>, 16 years ago

Has patch: set

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

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

comment:4 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top