[issue22757] TclStackFree: incorrect freePtr. Call out of sequence?

2014-10-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> test needed

___
Python tracker 

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



[issue3453] PyType_Ready doesn't ensure that all bases are ready

2014-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
versions: +Python 3.5 -Python 3.2

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Tim Graham

New submission from Tim Graham:

I noticed some failing Django tests on Python 3.2.6 the other day. The 
regression is caused by this change: 
https://github.com/python/cpython/commit/572d9c59a1441c6f8ffb9308824c804856020e31

Behavior before that commit (and on other version of Python even after that 
commit):

>>> from http.cookies import SimpleCookie
>>> SimpleCookie("Set-Cookie: foo=bar; Path=/")


New broken behavior on Python 3.2.6:

>>> from http.cookies import SimpleCookie
>>> SimpleCookie("Set-Cookie: foo=bar; Path=/")


Python 3.2.6 no longer accepts the "Set-Cookie: " prefix to BaseCookie.load:

>>> SimpleCookie("Set-Cookie: foo=bar; Path=/")

>>> SimpleCookie("foo=bar; Path=/")


This issue doesn't affect 2.7, 3.3, or 3.4 because of 
https://github.com/python/cpython/commit/b92e104dc57c37ddf22ada1c6e5380e09268ee93
 (this commit wasn't backported to 3.2 because that branch is in 
security-fix-only mode).

I asked Berker about this and he suggested to create this issue and said, "If 
Georg is OK to backout the commit I can write a patch with additional test 
cases and commit it."

He also confirmed the regression as follows:

I've tested your example on Python 2.7.8, 3.2.6, 3.3.6, 3.4.2, 3.5.0 (all 
unreleased development versions - they will be X.Y.Z+1) and looks like it's a 
regression.

My test script is:

try:
from http.cookies import SimpleCookie
except ImportError:
from Cookie import SimpleCookie

c = SimpleCookie("Set-Cookie: foo=bar; Path=/")
print(c)

Here are the results:

Python 2.7.8:
Set-Cookie: foo=bar; Path=/

Python 3.5.0:
Set-Cookie: foo=bar; Path=/

Python 3.4.2:
Set-Cookie: foo=bar; Path=/

Python 3.3.6:
Set-Cookie: foo=bar; Path=/
[45602 refs]

Python 3.2.6:

[38937 refs]

--
components: Library (Lib)
messages: 230200
nosy: Tim.Graham, berker.peksag, georg.brandl, pitrou, r.david.murray
priority: normal
severity: normal
status: open
title: Regression in Python 3.2 cookie parsing
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is it a normal use of SimpleCookie? The docs don't seem to imply it:

"""
>>> C = cookies.SimpleCookie()
>>> C.load("chips=ahoy; vienna=finger") # load from a string (HTTP header)
"""

In any case, it's up to Georg to decide. But changeset 
572d9c59a1441c6f8ffb9308824c804856020e31 fixes a security issue reported to 
secur...@python.org (the report included a concrete example of how to exploit 
it under certain conditions).

--

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you give a pointer to the failing Django test, by the way?

--

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Tim Graham

Tim Graham added the comment:

I wasn't sure if it was expected behavior or not. I'm attaching a file with the 
list of failing tests on Django's master.

Perhaps more useful is a reference to the problematic usage in Django:

https://github.com/django/django/blob/349471eeb9a4db2f5d8e95cb6555e7b3f2c94e3f/django/http/response.py#L208-L217

That logic was added to fix https://code.djangoproject.com/ticket/15863.

--
Added file: http://bugs.python.org/file37061/failing-django-tests-22758.txt

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ah, so it's about round-tripping between SimpleCookie.__str__() and 
SimpleCookie.__init__(). That sounds like a reasonable behaviour to preserve 
(and easier than parsing arbitrary Set-Cookie headers). IMO we should also add 
for tests for it in other versions.

--

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Georg Brandl

Georg Brandl added the comment:

OK, so there are two root issues here:

* Django uses __init__(str()) roundtripping, which is not explicitly supported 
by the library, and worked by accident with previous versions.  That it works 
again with 3.3+ is another accident, and a bug.

(The change for #16611 reintroduces "lax" parsing behavior that the security 
fix was supposed to prevent.)

* BaseCookie doesn't roundtrip correctly when pickled with protocol >= 2.  This 
should be fixed in upcoming bugfix releases.

I would advise Django to subclass SimpleCookie and fix the pickling issue, 
which is not hard (see attached diff).

--
keywords: +patch
Added file: http://bugs.python.org/file37062/cookie-pickling-fix.diff

___
Python tracker 

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



[issue22731] test_capi test fails because of mismatched newlines

2014-10-29 Thread Nick Coghlan

Nick Coghlan added the comment:

Yes, switching the subprocess invocation in test_capi.py to universal newlines 
mode and joining the expected output with '\n' sounds like the right test case 
fix to me.

As far as the printf() change goes, I'm not really the right person to ask - 
all my Windows dev experience is with Python and C++, while my C dev experience 
has been primarily on TI DSP's and Linux.

If I had to guess, the behavioural change is likely a result of the C99 
enhancements and standards conformance improvements described in 
http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx

--

___
Python tracker 

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



[issue22731] test_capi test fails because of mismatched newlines

2014-10-29 Thread Nick Coghlan

Nick Coghlan added the comment:

One last thing: we may also want to update the C API docs to explicitly point 
out the discrepancy in handling of '\n' on Windows between printf() in VC14+ 
(which no longer does the '\r\n' substitution) and the print functions in the 
Python C API (which will keep the transformation).

This is a weird enough quirk that I feel like we should explicitly point it out 
*somewhere*, but also obscure enough that I don't want to bother people with it 
unnecessarily.

--

___
Python tracker 

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



[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack

Lorenz Quack added the comment:

sorry for the delay but here is a new patch with a test.

I changed the strategy for fixing the bug because the dealing with the opening 
parenthesis became to complicated.

So, now I simply check whether the match actually startswith the search phrase 
before adding the match to the results. This is like a sanity check which fixes 
this bug.

--
Added file: http://bugs.python.org/file37063/rlcompleter_22141.patch

___
Python tracker 

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



[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack

Changes by Lorenz Quack :


Removed file: http://bugs.python.org/file37063/rlcompleter_22141.patch

___
Python tracker 

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



[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack

Changes by Lorenz Quack :


Added file: http://bugs.python.org/file37064/rlcompleter_22141.patch

___
Python tracker 

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



[issue22143] rlcompleter.Completer has duplicate matches

2014-10-29 Thread Lorenz Quack

Lorenz Quack added the comment:

Hi,

here finally the updated patch with test case.
It depends on and should be applied after the patch included in issue22141.

This patch does changes two things:
1) completions are now unique
2) completions are now in no specific order

I had to touch some other rlcompleter tests because they assumed a certain 
order of the returned matches.

Thanks for reviewing!

--
Added file: http://bugs.python.org/file37065/rlcompleter_22143.patch

___
Python tracker 

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



[issue22731] test_capi test fails because of mismatched newlines

2014-10-29 Thread R. David Murray

R. David Murray added the comment:

That information should also go in the porting notes section of the 3.5 What's 
New, but clearly labeled (if I understand correctly) as applying only to 
applications that embed python on Windows.

--

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2014-10-29 Thread Daniel Farrell

Daniel Farrell added the comment:

> An emerging workflow is using Docker for a Python environment.

This applies to Vagrant environments as well (VirtualBox shared folders, tests 
fail).

--
nosy: +dfarrell07

___
Python tracker 

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



[issue22731] test_capi test fails because of mismatched newlines

2014-10-29 Thread Steve Dower

Steve Dower added the comment:

I think it's also in any extension that prints directly to the console without 
going through the Python IO machinery.

I'll make the test change in default, since that's what the os.linesep is 
trying to achieve anyway, and modify the porting notes in my branch, since it 
won't apply until the build changes are merged in.

Thanks all.

--

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I agree this deserves fixing, and the patch looks basically ok. It would be 
nice to add a test, though (by mocking os.link()).

Éric, are you still here, or should someone else take over?

--

___
Python tracker 

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



[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Hristo Venev

New submission from Hristo Venev:

$ touch a
c: stat("a/x", ...) -> errno=ENOTDIR
$ python
>>> pathlib.Path('a/x').exists()

This should return False and not throw an exception.

Patch not tested.

--
files: py.patch
keywords: patch
messages: 230214
nosy: h.venev
priority: normal
severity: normal
status: open
title: pathlib: Path.exists broken
Added file: http://bugs.python.org/file37066/py.patch

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2014-10-29 Thread Éric Araujo

Éric Araujo added the comment:

I can’t make any commitment to core Python at this time.  I still read all 
email and can be available for guidance or questions about obscure parts of 
distutils.

(Ideally I would find someone willing to be mentored to take over maintenance.)

--

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread Michael Del Monte

New submission from Michael Del Monte:

Easily reproduced:

re.sub('x', 'a', "x"*20, re.S)

returns ''

--
components: Regular Expressions
messages: 230216
nosy: ezio.melotti, mgdelmonte, mrabarnett
priority: normal
severity: normal
status: open
title: re.sub does only first 16 replacements if re.S is used
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2014-10-29 Thread Ugra Dániel

Changes by Ugra Dániel :


--
nosy: +daniel.ugra

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread Peter Otten

Peter Otten added the comment:

This is not a bug; the signature of re.sub() is

sub(pattern, repl, string, count=0, flags=0)

and the fourth argument thus the 'count' delimiting the number of substitutions 
that you accidentally specify as

>>> import re
>>> re.S
16

I recommend that you use a keyword arg to fix your code:

>>> re.sub('x', 'a', "x"*20, flags=re.S)
''

--
nosy: +peter.otten

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread Georg Brandl

Georg Brandl added the comment:

The fourth parameter is not "flags", but "count", the max. number of 
substitutions.  "flags" is the fifth parameter, or give it as a keyword 
argument.

--
nosy: +georg.brandl
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread STINNER Victor

STINNER Victor added the comment:

This bug report is common. An enhancement would be to make the count parameter 
a keyword only parameter. Would it break a lot of code?

--
nosy: +haypo

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread Ezio Melotti

Ezio Melotti added the comment:

See #11957.

--

___
Python tracker 

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



[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Hristo Venev

Hristo Venev added the comment:

Tested and works.

--

___
Python tracker 

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



[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +pitrou
stage:  -> test needed
type:  -> behavior
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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 767fd62b59a9 by Victor Stinner in branch 'default':
Issue #11957: Explicit parameter name when calling re.split() and re.sub()
https://hg.python.org/cpython/rev/767fd62b59a9

--
nosy: +python-dev

___
Python tracker 

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



[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Georg Brandl

Georg Brandl added the comment:

os.path.exists() ignores *all* OSErrors from stat.  This is probably too broad, 
but only ignoring ENOENT is probably too narrow.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread STINNER Victor

STINNER Victor added the comment:

I suggest to make the 2 last parameters of re.sub(), re.subn() and re.split() 
parameters as keyword-only. It will break applications using count and maxsplit 
parameters as index parameters, but it's easy to fix these applications if they 
want to support also Python 3.5.

I checked Python 2.6: the name of the maxsplit and count parameters didn't 
change. So it's possible to write code working on Python 2.6-3.5 if the 
parameter name is explicitly used:

* re.sub("a", "a", "a", count=1)
* re.subn("a", "a", "a", count=1)
* re.split("a", "a", maxsplit=1)

The flags parameter was added to re.sub(), re.subn() and re.split() functions 
in Python 2.7:

* https://docs.python.org/2.7/library/re.html#re.sub
* https://docs.python.org/2.7/library/re.html#re.subn
* https://docs.python.org/2.7/library/re.html#re.split

See my attached re_keyword_only.patch:

* sub(), subn(): count and flags become keyword-only parameters
* split(): maxsplit and flags become keyword-only parameters

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file37067/re_keyword_only.patch

___
Python tracker 

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



[issue22760] re.sub does only first 16 replacements if re.S is used

2014-10-29 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: not a bug -> duplicate
superseder:  -> re.sub confusion between count and flags args

___
Python tracker 

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



[issue17663] re.sub not replacing all

2014-10-29 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: not a bug -> duplicate
superseder:  -> re.sub confusion between count and flags args

___
Python tracker 

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



[issue15537] MULTILINE confuses re.split

2014-10-29 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: not a bug -> duplicate
superseder:  -> re.sub confusion between count and flags args

___
Python tracker 

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



[issue22759] pathlib: Path.exists broken

2014-10-29 Thread Hristo Venev

Hristo Venev added the comment:

ENAMETOOLONG and possibly ELOOP should also return False.
EACCES, EOVERFLOW and ENOMEM should probably be forwarded.
EFAULT should not happen.

--

___
Python tracker 

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



[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2014-10-29 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: not a bug -> duplicate
superseder:  -> re.sub confusion between count and flags args

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread STINNER Victor

STINNER Victor added the comment:

Confusion between count/maxplit and count parameters is common, duplicated 
issues:

* Issue #22760
* Issue #17663
* Issue #15537
* Issue #12875
* Issue #12078
* Issue #11947

See also issue #13385 which proposed an explicit "re.NOFLAGS flag".

--

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22642] trace module: unclear error message

2014-10-29 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Thanks, Berker Peksag, for the review. Here is the updated patch with the test.

--
Added file: http://bugs.python.org/file37068/better_err_listfuncs_trace_v2.patch

___
Python tracker 

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



[issue22173] Update lib2to3.tests and test_lib2to3 to use test discovery

2014-10-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9d36bf887be3 by Zachary Ware in branch '3.4':
Issue #22173: Update lib2to3 tests to use unittest test discovery.
https://hg.python.org/cpython/rev/9d36bf887be3

New changeset 179ccc48566f by Zachary Ware in branch 'default':
Closes #22173: Merge with 3.4
https://hg.python.org/cpython/rev/179ccc48566f

--
nosy: +python-dev
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22173] Update lib2to3.tests and test_lib2to3 to use test discovery

2014-10-29 Thread Zachary Ware

Zachary Ware added the comment:

Thanks, Ezio!

--
assignee:  -> zach.ware

___
Python tracker 

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



[issue21917] Python 2.7.7 Tests fail, and math is faulty

2014-10-29 Thread Phil Elson

Phil Elson added the comment:

I just wanted to say that I am seeing the same issue with similar build flags 
for the xlc compiler.

Finding the correct compile flags may well be the problem here.

For the record, since I think this is related to the flags which are being 
passed to os.open, I've been looking at the following:

http://bugs.python.org/issue19749
https://github.com/pypa/pip/issues/849

I actually have access to a python2.7 which does work on this OS (which I 
didn't compile), which allowed me to identify the following difference:


$> ./python
Python 2.7.8 [C] on aix7
>>> import os; print os..O_NOFOLLOW
137438953472


$> /usr/bin/python
Python 2.7.6 [C] on aix7
>>> import os; print os.O_NOFOLLOW
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'O_NOFOLLOW'



My workaround therefore is to put the following in sitecustomize:

import os; os.__dict__.pop('O_NOFOLLOW', None)

And as a result "make test" no longer fails.

Any idea what it is we're missing in the configure step which is erroneously 
putting O_NOFOLLOW in os?

--
nosy: +pelson

___
Python tracker 

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



[issue22153] There is no standard TestCase.runTest implementation

2014-10-29 Thread Robert Collins

Robert Collins added the comment:

Oh, one thought - in testtools we split out 'docs for test writers' and 'docs 
for framework folk'. That would facilitate getting runTest out of test writers 
face while still documenting it appropriately.

Related to that is my ongoing push to split the protocol so that these concerns 
are not intertwined the way they are today, but that needs to wait for the 
existing backlog to clear up :)

--

___
Python tracker 

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



[issue22153] Documentation of TestCase.runTest is incorrect and confusing

2014-10-29 Thread Robert Collins

Changes by Robert Collins :


--
title: There is no standard TestCase.runTest implementation -> Documentation of 
TestCase.runTest is incorrect and confusing

___
Python tracker 

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



[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-10-29 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Jean Christophe: Please have a look at the patch for ticket 
http://bugs.python.org/issue22681 as example of the doc patch.

Thanks.

--

___
Python tracker 

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



[issue22756] testAssertEqualSingleLine gives poor errors

2014-10-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f17d71ec53f by Robert Collins in branch 'default':
Close #22756: Improve the test output for some assertEqual tests.
https://hg.python.org/cpython/rev/2f17d71ec53f

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2014-10-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 708b2e656c1d by Robert Collins in branch 'default':
Close #7559: ImportError when loading a test now shown as ImportError.
https://hg.python.org/cpython/rev/708b2e656c1d

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-10-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Or issue22682.

Needed:

* The codec itself (in Lib/encodings/ directory).
* Entries in aliases table (Lib/encodings/aliases.py).
* A row in encodings table (Doc/library/codecs.rst).
* An entry in What's New (Doc/whatsnew/3.5.rst).
* May be addition in encodings table in Lib/locale.py. May be regenerate 
aliases table.
* An entry in all encodings list (Lib/test/test_codecs.py) and mentions in some 
other tests (Lib/test/test_unicode.py, Lib/test/test_xml_etree.py).

--

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your patch Valentina. But it makes flags combinations not 
pickleable.

>>> import re, pickle
>>> pickle.dumps(re.I|re.S, 3)
Traceback (most recent call last):
  File "", line 1, in 
_pickle.PicklingError: Can't pickle : attribute lookup SubFlag 
on sre_constants failed
>>> pickle.dumps(re.I|re.S, 4)
Traceback (most recent call last):
  File "", line 1, in 
_pickle.PicklingError: Can't pickle : attribute lookup 
BaseFlags.__or__..SubFlag on sre_constants failed

And I'm afraid that creating new class in the "|" operator can affect 
performance.

--
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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As for 767fd62b59a9, I doubt that changing positional arguments to keyword 
argumennts in tests is justified. This can hide a bug.

--

___
Python tracker 

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



[issue11957] re.sub confusion between count and flags args

2014-10-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And again about patch_11957. I afraid that testing isinstance(count, 
sre_constants.BaseFlags) on every re.sub() call will hit performance too.

--

___
Python tracker 

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



[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2014-10-29 Thread David Bolen

David Bolen added the comment:

I've just brought a Windows 8 buildbot online (bolen-windows8) and can confirm 
that this test does fail in the 3.4 and 3.x branches, and that it does so 
consistently even if I execute the steps interactively.

--
nosy: +db3l

___
Python tracker 

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



[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

FTR, the buildbot URL: http://buildbot.python.org/all/buildslaves/bolen-windows8

--
nosy: +pitrou

___
Python tracker 

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



[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2014-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> needs patch
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2014-10-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: eric.araujo -> 
stage: patch review -> test needed
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Tim Graham

Tim Graham added the comment:

Thank-you Georg; I believe I was able to fix some of the failures by patching 
Django as you suggested.

However, I think I found another issue due to #16611 (support for 
httponly/secure cookies) not being backported to Python 3.2. The issue is that 
any cookies that appear after one that uses httponly or secure are dropped:

>>> from http.cookies import SimpleCookie
>>> c = SimpleCookie()
>>> c['a'] = 'b'
>>> c['a']['httponly'] = True
>>> c['d'] = 'e'
>>> out = c.output(header='', sep='; ')
>>> SimpleCookie(out)


Here's another example using the 'domain' option to show the same flow from 
above working as expected:

>>> c = SimpleCookie()
>>> c['a'] = 'b'
>>> c['a']['domain'] = 'foo.com'
>>> c['d'] = 'e'
>>> out = c.output(header='', sep='; ')
>>> SimpleCookie(out)


It seems to me this may warrant backporting httponly/secure support to Python 
3.2 now that cookie parsing is more strict (unless Django is again relying on 
incorrect behavior).

--

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Updated patch with tests.

--
stage: test needed -> patch review
Added file: http://bugs.python.org/file37069/copy_file_link_fail.patch

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2014-10-29 Thread Georg Brandl

Georg Brandl added the comment:

Thanks, this is indeed a regression.

--

___
Python tracker 

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



[issue22217] Reprs for zipfile classes

2014-10-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 82fd95c2851b by Serhiy Storchaka in branch 'default':
Issue #22217: Implemented reprs of classes in the zipfile module.
https://hg.python.org/cpython/rev/82fd95c2851b

--
nosy: +python-dev

___
Python tracker 

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



[issue22217] Reprs for zipfile classes

2014-10-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Berker and Ezio for your reviews.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22761] Catching StopIteraion inside list comprehension

2014-10-29 Thread yotamv

New submission from yotamv:

Inside a list comprehension expression, if a StopIteration exception is raised, 
the interpreter assumes the exception was raised by the object Iterated buy the 
list comprehension expression.

For example, this generator will never stop, and will keep returning empty 
tuples:

def izip(*args):
iters = [iter(obj) for obj in args]
while True:
yield tuple(next(it) for it in iters)
x = izip([1,2],[3,4])
print(next(x)) #(1,3)
print(next(x)) #(2,4)
print(next(x)) #()

--
components: Interpreter Core
messages: 230246
nosy: tomirendo
priority: normal
severity: normal
status: open
title: Catching StopIteraion inside list comprehension
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



[issue22762] PyObject_Call called with an exception set while displaying a traceback

2014-10-29 Thread Xavier de Gaye

New submission from Xavier de Gaye:

To reproduce the crash run the following two-lines script and, at the fisrt 
(Pdb) prompt, remove the last line of this script (and the following empty 
lines if any):

import pdb; pdb.set_trace()
x = 1

then issue the 'quit' pdb command. This will cause an assert:

python: Objects/abstract.c:2079: PyObject_Call: Assertion `!PyErr_Occurred()' 
failed.
Aborted (core dumped)

A patch is attached.

--
components: Interpreter Core
files: traceback.patch
keywords: patch
messages: 230247
nosy: xdegaye
priority: normal
severity: normal
status: open
title: PyObject_Call called with an exception set while displaying a traceback
type: crash
versions: Python 3.5
Added file: http://bugs.python.org/file37070/traceback.patch

___
Python tracker 

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



[issue22761] Catching StopIteraion inside list comprehension

2014-10-29 Thread yotamv

yotamv added the comment:

Inside a list comprehension expression, if a StopIteration exception is raised, 
the interpreter assumes the exception was raised by the object Iterated by the 
list comprehension expression.

For example, this generator will never stop, and will keep returning empty 
tuples:

def izip(*args):
iters = [iter(obj) for obj in args]
while True:
yield tuple(next(it) for it in iters)
x = izip([1,2],[3,4])
print(next(x)) #(1,3)
print(next(x)) #(2,4)
print(next(x)) #()

--

___
Python tracker 

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



[issue22762] PyObject_Call called with an exception set while displaying a traceback

2014-10-29 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Looks similar to the problem fixed at changeset 298d98486794 by Victor Stinner.

--
nosy: +haypo

___
Python tracker 

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



[issue8876] distutils should not assume that hardlinks will work

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, the only place where distutils seems to use hard-linking is 
distutils.command.sdist. The fallback on copying is safe there, since it's done 
manually if os.link doesn't exist.

--

___
Python tracker 

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



[issue17717] Set up nasm from external.bat

2014-10-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

NASM seems BSD-licensed, so it shouldn't be a legal problem.

--
nosy: +pitrou

___
Python tracker 

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



[issue17896] Move Windows external libs from \..\ to \externals

2014-10-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

After seeing your new diagram and glancing at the patch, we are pretty much in 
agreement.  I would like to see this change so I can delete the extra layer of 
directories.  I will try to do a review and test tomorrow.  I will also check 
the devguide to see if I think it needs revising too.

--

___
Python tracker 

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



[issue22763] load_tests chaining into discover from non-discover entry point gets top_level_dir wrong

2014-10-29 Thread Robert Collins

New submission from Robert Collins:

The following trivial chain-into-discover load_tests:
def load_tests(loader, tests, pattern):
import os.path
# top level directory cached on loader instance
this_dir = os.path.dirname(__file__)
return loader.discover(start_dir=this_dir, pattern=pattern)

Will work fine when that module was loaded by discover in the first place, but 
if the entry point was e.g. loader.loadTestsFromModule then it will fail 
because _top_level_dir starts None and is, if not supplied, inferred from 
start_dir.

One possible way to improve this would be to check for start_dir being a child 
of rather than just an exact match of, the elements of sys.path. This isn't 
complete of course, because individual packages can have their own path. And we 
also compare with top_level_dir to assess importability - but perhaps we can 
deprecate/ get rid of the top_level_dir concept entirely - it only has two 
functional uses: a) making it possible to import things when the path to be 
discovered isn't on sys.path yet, which could be done by the unittest front 
end, leaving the core API less complicated, and b) to map from paths back to 
modules which is complicated by the need to handle namespaces and other 
packages with multiple directories providing modules. (Because load_tests can 
chain into other directories that aren't under top_level_dir this same bug can 
show up in the inverse situation).

Another possibility would be to make a new api 'discover from a package' and 
split discover's internals into 'find packages' and then a chain call to this 
new api. I'm in favour of this latter approach because I think it will have 
less compromises and work better. It might also make it easier for us in fixing 
the rather ugly thing at the moment where discover('foo.bar') adds foo.bar to 
sys.path before figuring out that its a module dotted path, not a filesystem 
path.

--
messages: 230253
nosy: rbcollins
priority: normal
severity: normal
status: open
title: load_tests chaining into discover from non-discover entry point gets 
top_level_dir wrong

___
Python tracker 

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



[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-29 Thread Robert Collins

Robert Collins added the comment:

Updated patch, after other recent conflicting changes.

--
Added file: http://bugs.python.org/file37071/issue22457.patch

___
Python tracker 

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



[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-10-29 Thread Robert Collins

Changes by Robert Collins :


--
type:  -> behavior
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



[issue11874] argparse assertion failure with brackets in metavars

2014-10-29 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy:  -tshepang

___
Python tracker 

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