Your message dated Fri, 21 Oct 2011 19:36:39 +0000
with message-id <[email protected]>
and subject line Bug#599047: fixed in python-tz 2011h-1
has caused the Debian Bug report #599047,
regarding python-tz: use of pytz generates UserWarning about repeated imports
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
599047: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599047
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-tz
Version: 2008c-2
Severity: normal

I have a script that imports some django (and hence mysql) libraries, before
then importing pytz. When I run the script I see:

geoffc@chiraz:~/svk/passwordaging/trunk/bin$ ./report-force-change-rate 
/usr/lib/python2.5/site-packages/pytz/__init__.py:29: UserWarning: Module
_mysql was already imported from
/var/lib/python-support/python2.5/_mysql.so, but
/var/lib/python-support/python2.5 is being added to sys.path
  from pkg_resources import resource_stream

I've patched the lenny package to get one that works for me, the diff is:
--- python-tz-2008c.orig/pytz/__init__.py
+++ python-tz-2008c/pytz/__init__.py
@@ -25,11 +25,6 @@
 
 import sys, datetime, os.path, gettext
 
-try:
-    from pkg_resources import resource_stream
-except ImportError:
-    resource_stream = None
-


It looks like the only place that resource_stream gets used in 
pytz/__init__.py has already been removed by the debian specific patch. 
So removing the attempt to import it seems to make sense. I have to admit
that I don't know python well enough to understand what resource_stream
is used for, or to understand the warning I'm getting. 

I had a look at the 2010b-1 package, and it looks like this code is still
present in squeeze and sid as well. So I imagine I'd get the same warning,
though I haven't confirmed this on a squeeze or sid system.

-- System Information:
Debian Release: 5.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-tz depends on:
ii  python                     2.5.2-3       An interactive high-level object-o
ii  python-central             0.6.8         register and build utility for Pyt
ii  tzdata                     2010j-0lenny1 time zone and daylight-saving time

python-tz recommends no packages.

python-tz suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: python-tz
Source-Version: 2011h-1

We believe that the bug you reported is fixed in the latest version of
python-tz, which is due to be installed in the Debian FTP archive:

python-tz_2011h-1.debian.tar.gz
  to main/p/python-tz/python-tz_2011h-1.debian.tar.gz
python-tz_2011h-1.dsc
  to main/p/python-tz/python-tz_2011h-1.dsc
python-tz_2011h-1_all.deb
  to main/p/python-tz/python-tz_2011h-1_all.deb
python3-tz_2011h-1_all.deb
  to main/p/python-tz/python3-tz_2011h-1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Arnaud Fontaine <[email protected]> (supplier of updated python-tz package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 21 Oct 2011 14:53:37 +0900
Source: python-tz
Binary: python-tz python3-tz
Architecture: source all
Version: 2011h-1
Distribution: unstable
Urgency: low
Maintainer: Debian/Ubuntu Zope Team 
<[email protected]>
Changed-By: Arnaud Fontaine <[email protected]>
Description: 
 python-tz  - Python version of the Olson timezone database
 python3-tz - Python3 version of the Olson timezone database
Closes: 579704 599047 617041 641506
Changes: 
 python-tz (2011h-1) unstable; urgency=low
 .
   * Team upload.
 .
   [ Arnaud Fontaine ]
   * debian/watch:
     - fix URL.
   * debian/patches/tzdata:
     - update following new upstream release.
     - Add missing patch for tzfile.py. Thanks to Matt Giuca (Closes: #579704)
   * Add Python3 support. Thanks to Stefano Rivera (Closes: #641506)
   * Add debian/clean to get rid of egg-info/* to prevent FTBFS if
     built twice.
 .
   [ Gediminas Paulauskas ]
   * Switch to dh_python2 (Closes: #617041):
   * Switch to source format 3.0 (quilt)
   * debian/control:
     - build-depend on python-all (not -dev)
     - remove Build-Depends on python-central, python-van.pydeb and quilt
     - add Vcs-Browser
   * debian/patches/tzdata: also remove import of pkg_resources (Closes: 
#599047)
   * debian/copyright: rewrite in dep5 format.
Checksums-Sha1: 
 16e5133471eaeb8337276ce5751c5b23da869fc6 1459 python-tz_2011h-1.dsc
 e3027f73f0c93bc4b0312a9e8d1e04e8706163be 5239 python-tz_2011h-1.debian.tar.gz
 c3b5397fe3f3755726bcebce7430ac341188e589 46222 python-tz_2011h-1_all.deb
 dbca378d455478f1c7594bdd29fe5ef7adb1a0ef 31066 python3-tz_2011h-1_all.deb
Checksums-Sha256: 
 acbedbd0cb9e29b2ef91dd5bb96ecffb8d8e8a70c8d9607e07f6f22bf573c7ae 1459 
python-tz_2011h-1.dsc
 db63a7f3f79e403f09daa9c75dd4688a22705b2472b8bcc024e2bb5eb0baf96d 5239 
python-tz_2011h-1.debian.tar.gz
 023c861d3fd7a2087bd492e65c5e938cdb8e982d0b84343bf26c546d234b28a4 46222 
python-tz_2011h-1_all.deb
 be191e89c5992e4a53ee5e5b5781d70e2708d593fa44388dee1f2c2594c40b33 31066 
python3-tz_2011h-1_all.deb
Files: 
 578ff95b4364c3098233f1538f1d87b4 1459 python optional python-tz_2011h-1.dsc
 afef197e606af23475d5fa7af276efbf 5239 python optional 
python-tz_2011h-1.debian.tar.gz
 e1aa1747967a97e8ac3766c190e37ef8 46222 python optional 
python-tz_2011h-1_all.deb
 728bb74db19c9476afbcb82c7bb30847 31066 python optional 
python3-tz_2011h-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6hGugACgkQvfKiIF42GdNI0QCfZWWdxiHVF61F53XLsVxMVoGL
6o8AoIKmcv+ZWRrgc+V0/c5L0PNY2KMJ
=wOOO
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to