Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issues with dateutil and pytz#983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 1 commit intomatplotlib:masterfrommdboom:update_pytz_and_dateutil
Aug 22, 2012

Conversation

mdboom
Copy link
Member

  1. pytz is outdated. The latest version is 2012chttp://pypi.python.org/pypi/pytz/2012c
  2. pytz 2012c is compatible with Python 3 and should not be converted with the 2to3 tool.
  3. dateutil 1.5 is for Python 2.x only. Dateutil 2.1 is for Python 3.x only. Seehttp://labix.org/python-dateutil/.
  4. dateutil 2.1 should should not be converted with the 2to3 tool.

How about the following fix (works for me on win-amd64-py3.2)?

  1. update pytz to version 2012c
  2. include dateutil 2.1 under lib/dateutil2
  3. add lib/six.py
  4. fix setup.py to use lib/dateutil2 instead of lib/dateutil on Python 3 and exclude pytz, dateutil2, and six.py from 2to3.
diff --git a/setup.py b/setup.pyindex 6c59b4c..2fc64ff 100644--- a/setup.py+++ b/setup.py@@ -106,6 +106,7 @@ package_data = {'matplotlib':['mpl-data/fonts/afm/*.afm',                               'mpl-data/*.glade',                               'backends/Matplotlib.nib/*',                               ]}+package_dir = {'': 'lib'} if 0:     # TODO: exclude these when making release?@@ -214,6 +215,8 @@ if hasdatetime: # dates require python23 datetime         packages.append('dateutil')         packages.append('dateutil.zoneinfo')         package_data['dateutil'] = ['zoneinfo/zoneinfo*.tar.*']+        if sys.version_info[0] >= 3:+            py_modules.append('six')+            package_dir['dateutil'] = 'lib/dateutil2'     if sys.platform=='win32':         # always add these to the win32 installer@@ -275,7 +278,9 @@ if sys.version_info[0] >= 3:         def run_2to3(self, files):             # We need to skip certain files that have already been             # converted to Python 3.x-            filtered = [x for x in files if 'py3' not in x]+            filtered = [x for x in files if ('py3' not in x and+                                             'dateutil' not in x and+                                             'pytz' not in x and+                                             'six.py' not in x)]             if sys.platform.startswith('win'):                 # doing this in parallel on windows may crash your computer                 [refactor(f) for f in filtered]@@ -305,7 +310,7 @@ distrib = setup(name="matplotlib",       platforms='any',       py_modules = py_modules,       ext_modules = ext_modules,-      package_dir = {'': 'lib'},+      package_dir = package_dir,       package_data = package_data,       cmdclass = {'build_py': build_py},       **additional_params

@cgohlke
Copy link
ContributorAuthor

Dateutil 2.1 depends on the modulesix.

@pelson
Copy link
Member

@cgohlke: What are the impacts of us not doing this for 1.2.x?

@mdboom
Copy link
Member

I would like to get this in for 1.2. It doesn't have to be by the freeze tomorrow, as it isn't really a "new feature" as much as updating these libraries -- and the potential breakage that entails.

@cgohlke
Copy link
ContributorAuthor

@pelson: We will have to exclude pytz and dateutil from the binary installers for Python 3 (Windows and Mac) and tell users to install them (and six.py) separately. That might be better anyway. It has always been problematic to include (outdated) pytz and dateutil packages that potentially overwrite existing packages in site-packages.

@mdboom
Copy link
Member

@cgohlke: Yes -- I would like to move away from including dependencies as much as possible in the future as well. But I think for this release we should continue to do so to avoid surprises, and then perhaps for the next release remove most of these things from our own distribution.pip and friends work much better now than they did when all this was originally put in place.

…1 for Python 3.xUpdate setup.py so that it assume datetime is always there (as it should be on the versions of Python we support).Update setup.py to not 2to3 pytz.Update setup.py to install the correct version of dateutil that matches the version of Python.
@mdboom
Copy link
Member

I have attached a PR to make these updates and fix the 2to3 issues. Let me know how this works, and I am particularly curious to see how this addresses#745.

mdboom added a commit that referenced this pull requestAug 22, 2012
@mdboommdboom merged commit354721b intomatplotlib:masterAug 22, 2012
@mdboommdboom deleted the update_pytz_and_dateutil branchMarch 3, 2015 18:44
@QuLogicQuLogic removed the status: needs clarificationIssues that need more information to resolve. labelNov 24, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v1.2.x
Development

Successfully merging this pull request may close these issues.

4 participants
@mdboom@cgohlke@pelson@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp