Kaydet (Commit) e392b4ff authored tarafından Benjamin Peterson's avatar Benjamin Peterson

Merged revisions 70086 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70086 | benjamin.peterson | 2009-03-01 21:35:12 -0600 (Sun, 01 Mar 2009) | 1 line

  fix a silly problem of caching gone wrong #5401
........
üst 4a9fda42
...@@ -237,7 +237,8 @@ def guess_type(url, strict=True): ...@@ -237,7 +237,8 @@ def guess_type(url, strict=True):
Optional `strict' argument when false adds a bunch of commonly found, but Optional `strict' argument when false adds a bunch of commonly found, but
non-standard types. non-standard types.
""" """
init() if not inited:
init()
return guess_type(url, strict) return guess_type(url, strict)
...@@ -254,7 +255,8 @@ def guess_all_extensions(type, strict=True): ...@@ -254,7 +255,8 @@ def guess_all_extensions(type, strict=True):
Optional `strict' argument when false adds a bunch of commonly found, Optional `strict' argument when false adds a bunch of commonly found,
but non-standard types. but non-standard types.
""" """
init() if not inited:
init()
return guess_all_extensions(type, strict) return guess_all_extensions(type, strict)
def guess_extension(type, strict=True): def guess_extension(type, strict=True):
...@@ -269,7 +271,8 @@ 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, Optional `strict' argument when false adds a bunch of commonly found,
but non-standard types. but non-standard types.
""" """
init() if not inited:
init()
return guess_extension(type, strict) return guess_extension(type, strict)
def add_type(type, ext, strict=True): def add_type(type, ext, strict=True):
...@@ -284,7 +287,8 @@ 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 list of standard types, else to the list of non-standard
types. types.
""" """
init() if not inited:
init()
return add_type(type, ext, strict) return add_type(type, ext, strict)
......
...@@ -89,6 +89,9 @@ Core and Builtins ...@@ -89,6 +89,9 @@ Core and Builtins
Library 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 - Issue #1733986: Fixed mmap crash in accessing elements of second map object
with same tagname but larger size than first map. (Windows) with same tagname but larger size than first map. (Windows)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment