Opened 7 years ago

Closed 7 years ago

Last modified 4 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@…> 7 years ago.

Download all attachments as: .zip

Change History (5)

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

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • 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

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

  • Has patch set

comment:3 Changed 7 years ago by mtredinnick

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

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

comment:4 Changed 4 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

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