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

Commita922e1c

Browse files
authored
Merge pull request#10868 from matplotlib/auto-backport-of-pr-10867
Backport PR#10867 on branch v2.2.x
2 parents94c63af +6fcab4d commita922e1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎lib/matplotlib/cbook/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
importsix
1212
fromsix.movesimportxrange,zip
13-
importbz2
1413
importcollections
1514
importcontextlib
1615
importdatetime
@@ -602,6 +601,9 @@ def to_filehandle(fname, flag='rU', return_opened=False, encoding=None):
602601
flag=flag.replace('U','')
603602
fh=gzip.open(fname,flag)
604603
eliffname.endswith('.bz2'):
604+
# python may not be complied with bz2 support,
605+
# bury import until we need it
606+
importbz2
605607
# get rid of 'U' in flag for bz2 files
606608
flag=flag.replace('U','')
607609
fh=bz2.BZ2File(fname,flag)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp