Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ad58b7c9
Commit
ad58b7c9
authored
Mar 02, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a silly problem of caching gone wrong #5401
parent
3bac8b20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
Lib/mimetypes.py
Lib/mimetypes.py
+8
-4
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/mimetypes.py
View file @
ad58b7c9
...
...
@@ -237,7 +237,8 @@ def guess_type(url, strict=True):
Optional `strict' argument when false adds a bunch of commonly found, but
non-standard types.
"""
init
()
if
not
inited
:
init
()
return
guess_type
(
url
,
strict
)
...
...
@@ -254,7 +255,8 @@ def guess_all_extensions(type, strict=True):
Optional `strict' argument when false adds a bunch of commonly found,
but non-standard types.
"""
init
()
if
not
inited
:
init
()
return
guess_all_extensions
(
type
,
strict
)
def
guess_extension
(
type
,
strict
=
True
):
...
...
@@ -269,7 +271,8 @@ def guess_extension(type, strict=True):
Optional `strict' argument when false adds a bunch of commonly found,
but non-standard types.
"""
init
()
if
not
inited
:
init
()
return
guess_extension
(
type
,
strict
)
def
add_type
(
type
,
ext
,
strict
=
True
):
...
...
@@ -284,7 +287,8 @@ def add_type(type, ext, strict=True):
list of standard types, else to the list of non-standard
types.
"""
init
()
if
not
inited
:
init
()
return
add_type
(
type
,
ext
,
strict
)
...
...
Misc/NEWS
View file @
ad58b7c9
...
...
@@ -166,6 +166,9 @@ Core and Builtins
Library
-------
- Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes
import guess_extension`` was used.
- Issue #1733986: Fixed mmap crash in accessing elements of second map object
with same tagname but larger size than first map. (Windows)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment