[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Chris Jerdonek
New submission from Chris Jerdonek chris.jerdo...@gmail.com: The error message for os.path.join() is misleading when the first argument is None. The message should probably say something about mixing None and strings. Python 3.3.0b1 (default:f954ee489896, Jul 16 2012, 22:42:29) [GCC 4.2.1

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15377 ___ ___ Python-bugs-list mailing list

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: I propose the following patch (against 3.2) that does the right thing. -- keywords: +patch nosy: +ncoghlan, pitrou stage: - patch review Added file: http://bugs.python.org/file26414/nicer-error-for-none.diff

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- assignee: - hynek versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15377 ___ ___

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'd be more inclined to tighten up the check for the can't mix message to something like: valid_types = all(isinstance(s, (str, bytes, bytearray)) for s in (a, ) + p) if valid_types: # Must have a mixture of text and binary data

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Yeah, we talked about that exact think with Antoine on IRC. New proposal. -- Added file: http://bugs.python.org/file26415/nicer-error-for-none-v2.diff ___ Python tracker rep...@bugs.python.org

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Looks good to me -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15377 ___ ___

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5553a53a230a by Hynek Schlawack in branch '3.2': #15377: Make posixpath.join() more strict when checking for str/bytes mix http://hg.python.org/cpython/rev/5553a53a230a New changeset d087ef80372d by Hynek Schlawack

[issue15377] os.path.join() error misleading with path1=None

2012-07-17 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Fine! :) -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15377