[Python-bugs-list] [ python-Bugs-412252 ] mimetypes.py uses posixpath not os.path

noreply@sourceforge.net noreply@sourceforge.net
Tue, 10 Apr 2001 08:48:50 -0700


Bugs item #412252, was updated on 2001-03-29 10:50
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=412252&group_id=5470

Category: Python Library
Group: None
>Status: Closed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: mimetypes.py uses posixpath not os.path

Initial Comment:
The mimetypes.py module imports posixpath instead of 
os.path.  There's nothing special from posixpath that 
it's using - only three calls to splitext, which 
should have the same implementation in all of the 
platform-specific path modules.

This was noted when using Gordon McMillan's installer, 
which normally excludes posixpath since it's creating 
Win32 executables that should be using ntpath.

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-04-10 08:48

Message:
Logged In: YES 
user_id=6380

Actually, the use of posixpath is intentional. The
splitext() function only looks at the extension after the
last pathname delimiter, and for URLs, we should always use
the Unix style pathname delimiters.

It's very clear that the argument to guesstype should be a
URL, not a filename in local filesystem syntax.

So, closing as Invalid.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=412252&group_id=5470