[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-10 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch for sha512. It got the same issue as sha1. After being 
clinic-ed, the constructor accepts None value happily.

--
Added file: http://bugs.python.org/file33402/clinic_sha512module.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-10 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch for md5. It got the same issue as sha1. After being 
clinic-ed, the constructor accepts None value happily.

--
Added file: http://bugs.python.org/file33403/clinic_md5module.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the updated patch addressing Giampaolo's concern.

--
Added file: http://bugs.python.org/file33404/fix_error_message_getspall_v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13943] distutils’ build_py fails when package string is unicode

2014-01-10 Thread Boris FELD

Boris FELD added the comment:

An issue has been opened in pip repository: 
https://github.com/pypa/pip/issues/1441

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

LGTM

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19077] More robust TemporaryDirectory cleanup

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Excellent, Antoine!

Here is a patch for 3.3 with tests based on Antoine's patch. My changes to 
tests:

* TemporaryDirectory instance is preserved as attributes of several modules. So 
some modules can be destroyed before cleaning up temporary directory.

* Resource warning is not checked because the warning module can be destroyed 
at time of cleaning up temporary directory.

--
Added file: http://bugs.python.org/file33405/tempfile_tempdir_cleanup_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I doubt that we can change behavior at this time.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19527] Test failures with COUNT_ALLOCS

2014-01-10 Thread Bohuslav "Slavek" Kabrda

Bohuslav "Slavek" Kabrda added the comment:

Since 3.4.0.b2, this also causes failures in another tests: test_io, 
test_logging, test_threading, test_warnings. There are various cases testing 
that some types get collected when the interpreter shuts down.

I'm attaching a new patch that covers all of these.

--
Added file: 
http://bugs.python.org/file33406/00141-fix-tests_with_COUNT_ALLOCS-v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

You mean this should be made in 3.4 only?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19527] Test failures with COUNT_ALLOCS

2014-01-10 Thread STINNER Victor

STINNER Victor added the comment:

What is COUNT_ALLOCS?

Python 3.4 now has sys.getallocatedblocks() and a new tracemalloc module which 
are compiled by default.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2014-01-10 Thread Bohuslav "Slavek" Kabrda

Bohuslav "Slavek" Kabrda added the comment:

Attaching a list of files in /usr/sbin in Fedora's minimal buildroot. (Note, 
that in Fedora /sbin is a symlink to /usr/sbin.)
FWIW I can workaround this issue by adding net-tools to BuildRequires, so this 
is no big pain for me.

--
Added file: http://bugs.python.org/file33407/usr-sbin-contents

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19527] Test failures with COUNT_ALLOCS

2014-01-10 Thread Bohuslav "Slavek" Kabrda

Bohuslav "Slavek" Kabrda added the comment:

As noted in Misc/SpecialBuilds:

COUNT_ALLOCS


Each type object grows three new members:

/* Number of times an object of this type was allocated. */
int tp_allocs;

/* Number of times an object of this type was deallocated. */
int tp_frees;

/* Highwater mark:  the maximum value of tp_allocs - tp_frees so
 * far; or, IOW, the largest number of objects of this type alive at
 * the same time.
 */
int tp_maxalloc;

...
We use this for Fedora's python debug build to get some interesting debugging 
info. (If you try to "grep -r" through Python 3.4 source code, you'll find 
quite a few ifdefs with COUNT_ALLOCS.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19887] Path.resolve() fails on complex symlinks

2014-01-10 Thread Philippe Fremy

Philippe Fremy added the comment:

Hi,

This precise set of tests fails on Windows 7 on a NTFS partition (on revision  
c0b0e7aef360+ tip ), see below.

The problem  is probably minor (drive letter case). I won't be able to develop 
a fix myself, but I'll be happy to test one.

cheers,

Philippe

==
FAIL: test_complex_symlinks_absolute (test.test_pathlib.PathTest)
--
Traceback (most recent call last):
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1724, in test_complex_symlinks_absolute
self._check_complex_symlinks(BASE)
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1692, in _check_complex_symlinks
self.assertEqual(str(p), BASE)
AssertionError: 'C:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp' != 
'c:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp'
- 
C:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^
+ 
c:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^


==
FAIL: test_complex_symlinks_relative (test.test_pathlib.PathTest)
--
Traceback (most recent call last):
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1728, in test_complex_symlinks_relative
self._check_complex_symlinks('.')
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1692, in _check_complex_symlinks
self.assertEqual(str(p), BASE)
AssertionError: 'C:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp' != 
'c:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp'
- 
C:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^
+ 
c:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^


==
FAIL: test_complex_symlinks_relative_dot_dot (test.test_pathlib.PathTest)
--
Traceback (most recent call last):
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1732, in test_complex_symlinks_relative_dot_dot
self._check_complex_symlinks(os.path.join('dirA', '..'))
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1692, in _check_complex_symlinks
self.assertEqual(str(p), BASE)
AssertionError: 'C:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp' != 
'c:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp'
- 
C:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^
+ 
c:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^


==
FAIL: test_complex_symlinks_absolute (test.test_pathlib.WindowsPathTest)
--
Traceback (most recent call last):
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1724, in test_complex_symlinks_absolute
self._check_complex_symlinks(BASE)
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1692, in _check_complex_symlinks
self.assertEqual(str(p), BASE)
AssertionError: 'C:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp' != 
'c:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp'
- 
C:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^
+ 
c:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^


==
FAIL: test_complex_symlinks_relative (test.test_pathlib.WindowsPathTest)
--
Traceback (most recent call last):
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1728, in test_complex_symlinks_relative
self._check_complex_symlinks('.')
  File 
"c:\Users\Morgane\Documents\000\Dev\CPython\cpython\lib\test\test_pathlib.py", 
line 1692, in _check_complex_symlinks
self.assertEqual(str(p), BASE)
AssertionError: 'C:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp' != 
'c:\\Users\\Morgane\\Documents\\000\\Dev\\[53 chars]_tmp'
- 
C:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^
+ 
c:\Users\Morgane\Documents\000\Dev\CPython\cpython\build\test_python_6060\@test_6060_tmp
? ^


==
FAIL: test_complex_symlinks_relative_dot_dot (tes

[issue20132] Many incremental codecs don’t handle fragmented data

2014-01-10 Thread Walter Dörwald

Walter Dörwald added the comment:

The best solution IMHO would be to implement real incremental codecs for all of 
those.

Maybe iterencode() with an empty iterator should never call encode()? (But IMHO 
it would be better to document that iterencode()/iterdecode() should only be 
used with "real" codecs.)

Note that the comment before PyUnicode_DecodeUTF7Stateful() in unicodeobject.c 
reads:

/* The decoder.  The only state we preserve is our read position,
 * i.e. how many characters we have consumed.  So if we end in the
 * middle of a shift sequence we have to back off the read position
 * and the output to the beginning of the sequence, otherwise we lose
 * all the shift state (seen bits, number of bits seen, high
 * surrogate). */

Changing that would have to introduce a state object that the codec updates and 
from which it can be restarted.

Also the encoder does not buffer anything. To implement the suggested 
behaviour, the encoder might have to buffer unlimited data.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19886] Better estimated memory requirements for bigmem tests

2014-01-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aee672ba9c38 by Serhiy Storchaka in branch '2.7':
Issue #19886: Use better estimated memory requirements for bigmem tests.
http://hg.python.org/cpython/rev/aee672ba9c38

New changeset 2ca26065fb00 by Serhiy Storchaka in branch '3.3':
Issue #19886: Use better estimated memory requirements for bigmem tests.
http://hg.python.org/cpython/rev/2ca26065fb00

New changeset fff1455e1147 by Serhiy Storchaka in branch 'default':
Issue #19886: Use better estimated memory requirements for bigmem tests.
http://hg.python.org/cpython/rev/fff1455e1147

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If there are no objections, I'll commit this patch tomorrow.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-10 Thread Walter Dörwald

Walter Dörwald added the comment:

The stream part of the codecs isn't used that much in Python 3 any more, so I'm 
not sure if this is worth fixing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Larry Hastings

Larry Hastings added the comment:

1)
When I wrote that I hadn't considered that people would want custom subclasses 
of ints.  I assumed they'd be using custom converter *functions*, which of 
course means they'd use 'O&'.  I can think of how to reword the text but for 
now I assume your approach for REGSAM is fine; certainly I approve of using the 
correct type in the generated code.

However, I doubt doc_default, py_default, and c_default should all be exactly 
the same.  And the 'key_name' parameter seems a little awkward.

Here's something you could consider: I don't think it's documented yet (I'm 
going as fast as I can over here, honest) but now you can use simple constants 
as Python defaults.  So maybe you can use REGSAM like this:
arg: REGSAM(c_default='KEY_READ') = winreg.KEY_READ

and then REGSAM could simply be an empty ("pass") subclass of int_converter.

2)
No convenient way yet.  Let me think about it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19886] Better estimated memory requirements for bigmem tests

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I never decreased requirements, so these changes shouldn't cause regressions.

--
assignee:  -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Even for 3.4 it looks too late.

But I afraid we can't change this behavior never. Users of spwd don't expect 
any exception, raising an exception will break any existing code.

Only one safe way is design new API and deprecate old API. This will be great 
refactoring, it should also change APIs of the pwd and grp modules, perhaps 
these three modules should be merged, perhaps we should cross-platform API 
(available on Windows).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Bohuslav. Unfortunately I don't see good replacement for ifconfig, 
any of these executables can be absent (e.g. chroot can be built in BusyBox). 
So I'll left ifconfig and adds checks for its accessibility.

You can workaround this issue by adding an executable with name ifconfig to 
your PATH. For example:

bin_for_test_uuid="$HOME/bin_for_test_uuid"
mkdir "$bin_for_test_uuid"
ln -s /bin/true "$bin_for_test_uuid/ifconfig"
export PATH="$PATH:$bin_for_test_uuid"
./python -m test.regrtest test_uuid

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19804] test_uuid.TestUUID.test_find_mac() fails

2014-01-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 34ae4333d3bf by Serhiy Storchaka in branch '2.7':
Issue #19804: The test_find_mac test in test_uuid is now skipped if the
http://hg.python.org/cpython/rev/34ae4333d3bf

New changeset 201077b57fe0 by Serhiy Storchaka in branch '3.3':
Issue #19804: The test_find_mac test in test_uuid is now skipped if the
http://hg.python.org/cpython/rev/201077b57fe0

New changeset 51dc9b2a5b35 by Serhiy Storchaka in branch 'default':
Issue #19804: The test_find_mac test in test_uuid is now skipped if the
http://hg.python.org/cpython/rev/51dc9b2a5b35

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails on PPC64 PowerLinux

2014-01-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3696b9ae6b17 by Serhiy Storchaka in branch '2.7':
Issue #20086: Output more details when test_getsetlocale_issue1813 is failed.
http://hg.python.org/cpython/rev/3696b9ae6b17

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I can agree with you that it's probably better to avoid changing existent 
python versions to avoid breakage but I see no need to be that strict for newer 
ones.

Current version should check errno but it doesn't. IMO that is clearly a bug.
Same goes for returning an empty list when users actually exists and for *not* 
raising FileNotFoundError if the shadow file is not available.

Also note that the doc does not mention that an empty list should be treated as 
an alias for "insufficient permissions" or "shadow file not available", 
therefore whoever made that assumption is someone who deliberately and 
erroneously decided to do so.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20208] Clarify some things in porting HOWTO

2014-01-10 Thread Rodrigo Bernardo Pimentel

Rodrigo Bernardo Pimentel added the comment:

I've created a patch that addresses the first criticism (explaining 
unicode_literals), as well as the first mention of print_function. It also 
addresses a small concern regarding "map", which I've mentioned in my G+ 
comment:

"""
Also, a friend was confused by 
http://docs.python.org/dev/howto/pyporting.html#update-map-for-imbalanced-input-sequences
 , until I understood that he didn't know map can take several sequences. I 
assume a lot of less experienced Python programmers only use map with a single 
sequence, and might be confused as well. A sentence mentioning that might help.
"""

I see that the current version of the doc on hg already addresses the 2to3 
mention.

--
keywords: +patch
nosy: +rbp
Added file: http://bugs.python.org/file33408/pyporting.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20208] Clarify some things in porting HOWTO

2014-01-10 Thread Rodrigo Bernardo Pimentel

Rodrigo Bernardo Pimentel added the comment:

BTW, there remains another concern I mentioned on G+:

"""
A note on formatting: I found some of 4th- and 5th-level headings too subtle. 
For instance, 
http://docs.python.org/dev/howto/pyporting.html#from-future-import-absolute-import
 got me thinking for a second if it was part of the previous paragraph or a new 
heading. Maybe underlining, or a bullet-like marker, or some indentation could 
help there.
"""

But I don't know enough of the formatting standards, so I haven't addressed 
this in the patch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread R. David Murray

R. David Murray added the comment:

I think that a new cross platform API would be great, but I don't think that 
fixing this bug should wait for that.  It may be borderline for being changed 
in a feature release (and definitely should not be changed in a maintenance 
release), but I think it would be OK.  Mostly likely a program that uses spwd 
will also be using other root-only functions and already be producing other 
errors if run as a non-privileged user.  The file-doesn't-exist case is a 
little more concerning, but my guess is that anyone actually checking for an 
empty return (as opposed to their program just failing when it gets one) would 
actually welcome the change, since it will give a more specific error message.

Or, to put it another way, I think the negative impact of this in a feature 
release will be low enough that we won't take much if any flak for it :)

--
components: +Library (Lib)
nosy: +r.david.murray
type:  -> behavior
versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Zachary Ware

Zachary Ware added the comment:

A, much better.  An empty subclass doesn't do quite the right thing, but 
`class REGSAM_converter(int_converter): type = 'REGSAM'` does the trick (see 
http://hg.python.org/sandbox/zware/rev/5af08aa49631).

Thanks, Larry!

(Next will probably be trying to get a proper HKEY converter to work, but I'm 
holding off on that until I have most everything else clinicized first.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20217] Build failure in posixmodule.c with SCHED_SPORADIC available

2014-01-10 Thread Phil Connell

Phil Connell added the comment:

Where I actually mean changeset 71704:89e92e684b37

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20217] Build failure in posixmodule.c with SCHED_SPORADIC available

2014-01-10 Thread Phil Connell

New submission from Phil Connell:

Typo in revision 71704 that causes build failures on systems with 
SCHED_SPORADIC available. See attached patch.

(Can reproduce by #defining SCHED_SPORADIC just above where it's used in 
posixmodule.c)

--
components: Extension Modules
files: sched_sporadic_build.diff
keywords: patch
messages: 207865
nosy: benjamin.peterson, isoschiz, pconnell
priority: normal
severity: normal
status: open
title: Build failure in posixmodule.c with SCHED_SPORADIC available
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33409/sched_sporadic_build.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20217] Build failure in posixmodule.c with SCHED_SPORADIC available

2014-01-10 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Congratulations on having a system with SCHED_SPORADIC defined. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20217] Build failure in posixmodule.c with SCHED_SPORADIC available

2014-01-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f74ea7eba03 by Benjamin Peterson in branch '3.3':
fix build when SCHED_SPORADIC is defined (closes #20217)
http://hg.python.org/cpython/rev/4f74ea7eba03

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20217] Build failure in posixmodule.c with SCHED_SPORADIC available

2014-01-10 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20208] Clarify some things in porting HOWTO

2014-01-10 Thread Brett Cannon

Brett Cannon added the comment:

There's actually no way to tweak that formatting as that is all done by Sphinx 
automatically.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails on PPC64 PowerLinux

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Detailed output:
http://buildbot.python.org/all/builders/PPC64%20PowerLinux%202.7/builds/415/steps/test/logs/stdio
==
FAIL: test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/2.7.edelsohn-powerlinux-ppc64/build/Lib/test/test_locale.py",
 line 484, in test_getsetlocale_issue1813
(loc, oldlocale, e))
AssertionError: Failed to set locale ('tr_TR', 'ISO8859-9') (default locale is 
(None, None)): Error('unsupported locale setting',)

--

locale.getlocale() calls _parse_localename() which uses normalize() which maps 
'tr_TR' to 'tr_TR.ISO8859-9' with according to locale_alias table. However on 
this platform tr_TR.ISO8859-9 doesn't not exist, only tr_TR.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17825] Indentation.offset and SyntaxError.offset mismatch

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Florent, can you commit your patch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20209] Deprecate PROTOCOL_SSLv2

2014-01-10 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +hynek

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2014-01-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Python should have a uniform definition of 'Python source' in both the doc and 
in practice in all source code processing functions. Currently, "2. Lexical 
analysis" in the Language Manual just says "Python reads program text as 
Unicode code points; the encoding of a source file can be given by an encoding 
declaration and defaults to UTF-8." UTF-8 encodes code point U+ as a null 
byte and this code point is nowhere excluded in the doc. (The definition of 
string literals uses 'source character' without any additional specification, 
so I take it to mean 'Unicode code point'.)

If U+ is a legal 'source character', it, as with other control chars not 
given special meaning, should be a SyntaxError unless occurring in a comment or 
string literal. Eval and exec exclude even the latter with 
TypeError: source code string cannot contain null bytes
If null bytes are legal, this is wrong.

Simply truncating lines as done by the CPython parser is wrong whether not not 
U+ is legal.

The simplest change would be to change the parser to match exec and add " other 
than U+000" after "Unicode code points" in the sentence quoted above.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2014-01-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Armin, what is the different behavior of PyPy?

We should perhaps get Guido's opinion on this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20218] Add `pathlib.Path.write` and `pathlib.Path.read`

2014-01-10 Thread Ram Rachum

New submission from Ram Rachum:

I'd really like to have methods `pathlib.Path.write` and `pathlib.Path.read`. 
Untested implementation:

def read(self, binary=False):
with self.open('br' is binary else 'r') as file:
return file.read()

def write(self, data. binary=False):
with self.open('bw' is binary else 'w') as file:
file.write(data)

This will be super useful to me. Many files actions are one liners like that, 
and avoiding putting the `with` clause in user code would be wonderful.

Antoine suggests that `binary` shouldn't be an argument, that there should be 
separate methods for reading/writing text and binary contents, and that the 
text one would require passing in encoding and other parameters. I'll be happy 
to add these to the implementation and create a patch, once people can define 
which parameters should be used.

--
components: Library (Lib)
messages: 207874
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Add `pathlib.Path.write` and `pathlib.Path.read`
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is revised patch.

* Behavior is changed less. read() is less greedy and uses characters from the 
buffer when read() is called with only one argument (size). It is now a little 
closer to io stream's read() than with previous patch.

* Added tests for cases of issue12446 and issue16636.

* Fixed read() for for the TransformCodecTest.test_read test added in 3.4. 
Actually the uu_codec and zlib_codec are broken.

--
versions:  -Python 3.2
Added file: http://bugs.python.org/file33410/codecs_read-3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Zachary Ware

Changes by Zachary Ware :


Added file: http://bugs.python.org/file33411/f2192566eefd.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file33367/issue20172.partial.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18960] First line can be executed twice

2014-01-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Zachary Ware

Zachary Ware added the comment:

Here's the complete patch for PC/winreg.c.  One clinic/signature/pydoc issue 
I've noticed:

>>> help(winreg.HKEYType.Close)
Help on method_descriptor:

Close(...)<--- No signature
Close()   <--- Extra
Closes the underlying Windows handle.

If the handle is already closed, no error is raised.

>>> winreg.HKEYType.Close.__doc__
'Close()\nCloses the underlying Windows handle.\n\nIf the handle is already clos
ed, no error is raised.'
>>> winreg.HKEYType.Close.__text_signature__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'method_descriptor' object has no attribute '__text_signature__'


My gut feeling is that it's a Clinic issue; Clinic should be adding 'self' to 
the signature, which should then be picked up by the __text_signature__ parser, 
and used by inspect and pydoc.

As far as the patch, one point I'd like some extra scrutiny on is the 
HKEY_converter (and C clinic_HKEY_converter).  I don't understand how all of 
the C machinery there works properly, so I can't say with confidence that it is 
right.  It compiles without errors and the tests pass, but beyond that, I can't 
guarantee anything.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20219] ElementTree: allow passing XMLPullParser instance into iterparse()

2014-01-10 Thread Stefan Behnel

New submission from Stefan Behnel:

in the XMLPullParser ticket

http://bugs.python.org/issue17741

specifically here:

http://bugs.python.org/msg196177

it says:

"""
* [The pull parser] will *not* accept a "parser" argument in the constructor.
Rationale: the parser argument of iterparse is broken anyway. This will
make it much easier to modify the implementation of EventParser in the
future when the C internals are fixed w.r.t problems mentioned in this issue.

* iterparse's "parser" argument will be deprecated, and the documentation
will be more detailed w.r.t to the limitations on its current "parser"
argument (the limitations are there in the code, but they're not fully
documented).
"""

And the "parser" argument to iterparse is now deprecated, according to the
docs:

http://docs.python.org/3.4/library/xml.etree.elementtree.html#xml.etree.ElementTree.iterparse

In lxml, however, I'm noticing that it would be really helpful to pass a
pull parser into iterparse(). Essentially, iterparse() is now stripped down
to a wrapper around the pull parser(s: XML/HTML in lxml) that simply serves
the feeding side of the interface for the user's convenience.

Note that lxml's iterparse() never had a "parser" argument. That's for
historical reasons, because it originally *was* a parser itself, but it
no longer is now.

I'd like to allow passing pull parsers into iterparse(), so that users can
configure them on their own. Currently, iterparse() must duplicate
basically all of the parser configuration arguments. I'd like to deprecate
that in lxml and replace it with the same simple interface as in ET, i.e.
pass in *either* a set of events *or* a readily configured pull parser.
Preferably raising an error if users pass both.

Could we change the deprecation from "argument is deprecated" to "passing a
normal (non-pull) parser into iterparse is deprecated", and then allow
passing a pull parser in the future?

--
components: Library (Lib), XML
messages: 207877
nosy: eli.bendersky, scoder
priority: normal
severity: normal
status: open
title: ElementTree: allow passing XMLPullParser instance into iterparse()
type: enhancement
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20220] TarFile.list() outputs wrong time

2014-01-10 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

TarFile.list() outputs a time exactly 6 hours back from expected.

http://buildbot.python.org/all/builders/System%20Z%20Linux%203.x/builds/1023/steps/test/logs/stdio

==
FAIL: test_list_command_verbose (test.test_tarfile.CommandLineTest)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-zlinux-z/build/Lib/test/test_tarfile.py",
 line 1797, in test_list_command_verbose
self.assertEqual(out, expected)
AssertionError: b'?rw[36 chars]-22 12:34:43 tokenize_tests.txt \n?rw--- 
d[96 chars]t \n' != b'?rw[36 chars]-22 18:34:43 tokenize_tests.txt \n?rw--- 
d[96 chars]t \n'

--

--
components: Library (Lib)
messages: 207878
nosy: lars.gustaebel, serhiy.storchaka
priority: normal
severity: normal
status: open
title: TarFile.list() outputs wrong time
type: behavior
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2014-01-10 Thread Armin Rigo

Armin Rigo added the comment:

PyPy 2.x accepts null characters in all of import, exec and eval, and complains 
if they occur in non-comment.

PyPy 3.x refuses them in import, which is where this bug report originally 
comes from (someone complained that CPython 3.x "accepts" them but not PyPy 
3.x, even thought this complain doesn't really make sense as CPython just gets 
very confused by them).  I don't know about exec and eval.

We need a consistent decision for 3.5.  I suppose it's not really worth 
backporting it to CPython 2.7 - 3.3 - 3.4, but it's your choice.  PyPy will 
just follow the lead (or keep its current behavior for 2.x if CPython 2.x is 
not modified).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20201] Argument Clinic: rwbuffer support broken

2014-01-10 Thread Ryan Smith-Roberts

Ryan Smith-Roberts added the comment:

Accepts only a writable bytearray, when the function needs to mutate-in-place. 
The rw_buffer support is for PyPy I guess.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Zachary Ware

Zachary Ware added the comment:

PC/winsound.c went pretty quick and easy.

--
Added file: http://bugs.python.org/file33412/issue20172.winsound.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails with Turkish locale

2014-01-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: test_locale fails on PPC64 PowerLinux -> test_locale fails with Turkish 
locale

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails on PPC64 PowerLinux

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This bug is occured not only on PPC64 PowerLinux. See also:

http://buildbot.python.org/all/builders/x86%20RHEL%206%202.7/builds/975/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%202.7/builds/1644/steps/test/logs/stdio

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails with Turkish locale

2014-01-10 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19320] Tkinter tests ran with wantobjects is false

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Unfortunately they are still red:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/1020/steps/test/logs/stdio
==
FAIL: test_split (test.test_tcl.TclTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\2.7.kloth-win64\build\lib\test\test_tcl.py", 
line 283, in test_split
self.assertEqual(split(arg), res)
AssertionError: Tuples differ: ('12', u'\u20ac', u'\u20ac', '... != (12, 
u'\u20ac', u'\u20ac', (3

First differing element 0:
12
12

- ('12', u'\u20ac', u'\u20ac', '3.4')
?  -  -^   ^

+ (12, u'\u20ac', u'\u20ac', (3.4,))
?^   ^ +


==
FAIL: test_splitlist (test.test_tcl.TclTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\2.7.kloth-win64\build\lib\test\test_tcl.py", 
line 243, in test_splitlist
self.assertEqual(splitlist(arg), res)
AssertionError: Tuples differ: ('1', u'\u20ac', u'\u20ac', '3... != (1, 
u'\u20ac', u'\u20ac', (3.4...

First differing element 0:
1
1

- ('1', u'\u20ac', u'\u20ac', '3.4')
?  - -^   ^

+ (1, u'\u20ac', u'\u20ac', (3.4,))
?   ^   ^ +


--

http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%202.7/builds/787/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%202.7/builds/865/steps/test/logs/stdio

All they are run with Tcl/Tk 8.5.2.

--
resolution: fixed -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19320] Tkinter tests ran with wantobjects is false

2014-01-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20072] Ttk tests fail when wantobjects is false

2014-01-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails with Turkish locale

2014-01-10 Thread Stefan Krah

Stefan Krah added the comment:

3d805bee06e2 uses str.lower(), which fails on the Turkish 'i' if the Turkish 
locale is set:


Python 2.7.6+ (2.7:0e5df5b62488+, Jan 10 2014, 23:25:35) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_CTYPE, ('tr_TR', 'ISO8859-9'))
'tr_TR.ISO8859-9'
>>> 'tr_TR.ISO8859-9'.lower()
'tr_tr.\xfdso8859-9'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20119] pdb c(ont(inue)) optional one-time-only breakpoint (like perl debugger)

2014-01-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails with Turkish locale

2014-01-10 Thread Stefan Krah

Stefan Krah added the comment:

I'm not sure if str.lower() is supposed to use tolower() in
stringobject.c. If tolower() is replaced by Py_TOLOWER(), the
problem disappears.

But maybe the locale dependent tolower() is used on purpose.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2014-01-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20135] FAQ need list mutation answers

2014-01-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> needs patch
title: mutate list -> FAQ need list mutation answers

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails with Turkish locale

2014-01-10 Thread Stefan Krah

Stefan Krah added the comment:

Ignore me, the fine manual says that "For 8-bit strings, this method is
locale-dependent."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Which version and bugfix release are you using?
What is werkzeug and what does it have to do with stdlib urllib?
An stdlib test cannot depend on 3rd party code.

--
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior
versions: +Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-10 Thread Armin Ronacher

Armin Ronacher added the comment:

> Which version and bugfix release are you using?

You can reproduce it against the current development version of Python 3.

> What is werkzeug and what does it have to do with stdlib urllib?

Werkzeug is a WSGI implementation.

> An stdlib test cannot depend on 3rd party code.

That's why the output values are in the clear so you can remove the werkzeug 
specific parts.  url_unquote can be replaced with urllib.parse.unquote.  None 
of that is relevant to the issue here though.  It was just to show that the 
standard library is currently in violation to PEP .

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20086] test_locale fails with Turkish locale

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch, Stefan!

Here is a patch which restores old behavior. It also changes test_locale to try 
several Turkish locale names. On some platforms (as Ubuntu) bare tr_TR is not 
exist, but only tr_TK.utf8. This will increase chance for this test to run.

--
assignee:  -> serhiy.storchaka
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file33413/locale_tr_TR.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-10 Thread Armin Ronacher

Armin Ronacher added the comment:

What it currently returns:

>>> from wsgiref.util import request_uri
>>> request_uri({
...  'wsgi.url_scheme': 'http',
...  'SCRIPT_NAME': '',
...  'PATH_INFO': '/\xe2\x98\x83',
...  'SERVER_PORT': '80',
...  'SERVER_NAME': 'localhost'
... })
'http://localhost/%C3%A2%C2%98%C2%83'

What it should return:

'http://localhost/%E2%98%83'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please show us the value of env?

Perhaps it is werkzeug creates wrongly quoted URL. request_uri() just calls 
urllib.parse.quote() which works good.

>>> from urllib.parse import quote, unquote
>>> quote('/\N{SNOWMAN}')
'/%E2%98%83'
>>> unquote('/%E2%98%83') == '/\N{SNOWMAN}'
True

Your result looks as

>>> quote('/\N{SNOWMAN}'.encode().decode('latin1'))
'/%C3%A2%C2%98%C2%83'

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

>>> from wsgiref.util import request_uri
>>> request_uri({
...  'wsgi.url_scheme': 'http',
...  'SCRIPT_NAME': '',
...  'PATH_INFO': '/\N{SNOWMAN}',
...  'SERVER_PORT': '80',
...  'SERVER_NAME': 'localhost'
... })
'http://localhost/%E2%98%83'
>>> request_uri({
...  'wsgi.url_scheme': 'http',
...  'SCRIPT_NAME': '',
...  'PATH_INFO': b'/\xe2\x98\x83',
...  'SERVER_PORT': '80',
...  'SERVER_NAME': 'localhost'
... })
'http://localhost/%E2%98%83'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-10 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14119] Ability to adjust queue size in Executors

2014-01-10 Thread Brian Quinlan

Brian Quinlan added the comment:

Can't you accomplish what you want using add_done_callback?

e.g.

# Pseudocode
class MyExecutor(ThreadPoolExecutor):
  def __init__(self):
self._count = 0

  def _decrement(self):
with self._some_lock:
  self._count -= 1

  def submit(self, fn, *args, **kwargs):
f = super(self).submit(fn, *args, **kwargs)
with self._some_lock:
  self._count += 1
f.add_done_callback(self._decrement)

  @property
  def num_pending_futures(self):
return self._count

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Tabrez Mohammed

New submission from Tabrez Mohammed:

In pyconfig.h (line 216), there is this line:
#define hypot _hypot

This conflicts with the definition of _hypot that ships with VS2010 (math.h, 
line 161):
static __inline double __CRTDECL hypot(_In_ double _X, _In_ double _Y)

The result of the redefinition is that the following warning occurs during 
compilation:
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(162): 
warning C4211: nonstandard extension used : redefined extern to static

When compiling with warnings being treated as errors, this will obviously 
result in failed builds.

The recommendation from Microsoft (see 
http://connect.microsoft.com/VisualStudio/feedback/details/633988/warning-in-math-h-line-162-re-nonstandard-extensions-used)
 is to change the definition to:
#if _MSC_VER < 1600
#define hypot _hypot
#endif

--
components: Windows
messages: 207894
nosy: tabrezm
priority: normal
severity: normal
status: open
title: #define hypot _hypot conflicts with existing definition
type: compile error
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-10 Thread Ethan Furman

Ethan Furman added the comment:

For anyone paying really close attention, I've already switched the 
assertEquals to assertEqual.  ;)

--
Added file: http://bugs.python.org/file33414/issue19995.stoneleaf.04.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14119] Ability to adjust queue size in Executors

2014-01-10 Thread Victor Varvariuc

Victor Varvariuc added the comment:

Hi!

Looks like your pseudocode will work as a workaround instead of monkey-patching!

Still the my suggestion to add the line to code stays.
self._count should be always equal to the length of self._work_queue? If yes, 
why duplication. If no - which one to use, why duplication? Also there is an 
additional lock.

http://docs.python.org/3.3/library/queue.html#queue.Queue.task_done - there is 
a special method, why not using it?

Looks like you think that `work_queue.task_done()` should not be added. I don't 
understand why, but you decide what's better for Python.

Thank you for your time!
Victor

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2014-01-10 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Zachary Ware

Zachary Ware added the comment:

How are you compiling to get that warning?  I've never seen it, and none of the 
Windows buildbots do either.  Also, which version of Python are you compiling 
on which version of Windows?

--
nosy: +zach.ware
stage:  -> test needed
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-10 Thread Zachary Ware

Zachary Ware added the comment:

Here's msvcrt.

--
Added file: http://bugs.python.org/file33415/issue20172.msvcrt.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

v100 toolset, with compiler setting /W4. Microsoft recommends W4 for all new 
C++ projects (see 
http://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.100).aspx). I'm using 3.3.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20132] Many incremental codecs don’t handle fragmented data

2014-01-10 Thread Martin Panter

Martin Panter added the comment:

I think calling iterencode() with an empty iterator is a side issue. Even with 
a non-empty iterator, it tries to encode an empty _text_ string to finalise the 
encoder:

>>> bytes().join(codecs.iterencode(iter((b"data",)), "base64-codec"))
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.3/codecs.py", line 1014, in iterencode
output = encoder.encode("", True)
  File "/usr/lib/python3.3/encodings/base64_codec.py", line 31, in encode
return base64.encodebytes(input)
  File "/usr/lib/python3.3/base64.py", line 343, in encodebytes
raise TypeError("expected bytes, not %s" % s.__class__.__name__)
TypeError: expected bytes, not str

Similarly, iterdecode(encoding="rot-13") doesn’t work. I agree it would be good 
to document that iterencode() is limited to text encoders and iterdecode() is 
limited to byte decoders.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com