Opened 8 years ago

Closed 8 years ago

Last modified 5 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: master
Severity: Keywords: python26
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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@…> 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Karen Tracey <kmtracey@…>

Attachment: tzinfo.diff added

comment:1 Changed 8 years ago by Karen Tracey <kmtracey@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Summary: DeprecationWarning on Python 2.6 about tzinit.__init__ taking no parametersDeprecationWarning on Python 2.6 about tzinfo.__init__ taking no parameters

comment:2 Changed 8 years ago by Karen Tracey <kmtracey@…>

Has patch: set

comment:3 Changed 8 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

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

comment:4 Changed 5 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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