[issue16686] audioop overflow issues

2012-12-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

5. max(b'\x00\x00\x00\x80', 4) returns 0 (on little-endian).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16686
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16685] Deprecate accepting strings as arguments in audioop functions

2012-12-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
keywords: +easy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16685
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good analysis, Matthew. Are you want to submit a patch?

--
keywords: +easy
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3871] cross and native build of python for mingw* hosts

2012-12-15 Thread Roumen Petrov

Roumen Petrov added the comment:

Jason Huntley wrote:

 patch -t -p1  python-py3k-20120729-MINGW.patch
Please run autoheader (optional) and autoconf (required .
 ./configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 
 --prefix=/mingw
...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3871
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16656] os.listdir() returns unusable bytes result on Windows

2012-12-15 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Anatoly,
- in Python2.7, try this:
print repr(os.listdir(u'.'))
- in Python3, try this:
print(ascii(os.listdir('.')))
Do the commands above work correctly?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16656
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed it looks like this commit may be the culprit for numerous buildbot 
failures.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Naming the test modules foo and bar was perhaps not the best idea.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e492a9a1845 by Andrew Svetlov in branch 'default':
Rename test module names for #16421 to don't clash with other tests.
http://hg.python.org/cpython/rev/2e492a9a1845

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16672] improve tracing performances when f_trace is NULL

2012-12-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +belopolsky, georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec

2012-12-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +Robin.Schreiber, loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16690
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-12-15 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed.
Antoine, you are right: foo and bar was bad names.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Sorry for the delay. I am not sure I understand your concern here:

 If the user reads the exact amount of bytes the server sent, read() on  the 
 socket will never have a chance to return '' and inform the user
 about the connection termination.

Certainly read(), called once again, would return ''? That's how I understand 
your unit test anyway.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-12-15 Thread Eran Rundstein

Eran Rundstein added the comment:

Hm, it's been a while and I'm no longer sure :(
You're right - since there is no length the user will have to call read() until 
he gets back ''. It's possible I forgot that assumption when speculating about 
this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16692] Support TLS 1.1 and TLS 1.2

2012-12-15 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Recent OpenSSL versions (e.g. 1.0.1c) have explicit support for TLS 1.1 and 
(presumably, although undocumented-ly) TLS 1.2 through TLSv1_1_method() and 
TLSv1_2_method(). It should be easy to add such support to the ssl module 
(although figuring out how exactly protocol version compatibility is handled - 
for the docs - might be a challenge).

--
components: Library (Lib)
keywords: easy
messages: 177541
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Support TLS 1.1 and TLS 1.2
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16692
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16692] Support TLS 1.1 and TLS 1.2

2012-12-15 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16692
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16693] Assertion error in ceval if Chainmap(object()) used as locals in eval

2012-12-15 Thread R. David Murray

New submission from R. David Murray:

 import collections
[61531 refs, 20955 blocks]
 eval('foo', {}, collections.ChainMap(object()))
python: Python/ceval.c:2996: PyEval_EvalFrameEx: Assertion `0' failed.
zsh: abort  ./python

--
messages: 177542
nosy: r.david.murray, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Assertion error in ceval if Chainmap(object()) used as locals in eval
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16693
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16693] Assertion error in ceval if Chainmap(object()) used as locals in eval

2012-12-15 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
assignee:  - benjamin.peterson
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16693
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16693] Assertion error in ceval if Chainmap(object()) used as locals in eval

2012-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb6fd6f021e7 by Benjamin Peterson in branch 'default':
use error label instead of breaking eval loop (closes #16693)
http://hg.python.org/cpython/rev/bb6fd6f021e7

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16693
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8109] Server-side support for TLS Server Name Indication extension

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've posted a few more comments.
As for cyclic garbage collection, it's explained a bit there:
http://docs.python.org/dev/extending/newtypes.html#supporting-cyclic-garbage-collection

If it isn't very clear to you, I can still handle it myself, though. Those docs 
aren't the best.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8109
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16597] file descriptor not being closed with context manager on IOError when device is full

2012-12-15 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16597
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16601] Restarting iteration over tarfile continues from where it left off.

2012-12-15 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16601
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2186f7b99c28 by Antoine Pitrou in branch '2.7':
Issue #16298: In HTTPResponse.read(), close the socket when there is no 
Content-Length and the incoming stream is finished.
http://hg.python.org/cpython/rev/2186f7b99c28

New changeset b47d342c449b by Antoine Pitrou in branch '3.2':
Issue #16298: In HTTPResponse.read(), close the socket when there is no 
Content-Length and the incoming stream is finished.
http://hg.python.org/cpython/rev/b47d342c449b

New changeset 59358f991c00 by Antoine Pitrou in branch '3.3':
Issue #16298: In HTTPResponse.read(), close the socket when there is no 
Content-Length and the incoming stream is finished.
http://hg.python.org/cpython/rev/59358f991c00

New changeset 5d6c2c7bc5d4 by Antoine Pitrou in branch 'default':
Issue #16298: In HTTPResponse.read(), close the socket when there is no 
Content-Length and the incoming stream is finished.
http://hg.python.org/cpython/rev/5d6c2c7bc5d4

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, the patch looked fine to me, so I've committed it to 2.7 and adapted it for 
3.x. Thank you!
By the way, it's probably easier to produce patches using Mercurial rather than 
using manual `diff`. You can have a look at the devguide for more information: 
http://docs.python.org/devguide/

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16665] doc for builtin hex() is poor

2012-12-15 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16664] [PATCH] Test Glob: files starting with .

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The patch looks good to me. The docs may need improving but that's a separate 
concern.
(also, the current behaviour is reasonable, and there is certainly existing 
code relying on it)

--
nosy: +hynek, pitrou, tarek
stage:  - commit review
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16664
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-12-15 Thread Eran Rundstein

Eran Rundstein added the comment:

My pleasure.
I had no idea about the Mercurial patch, this is the first time I have 
submitted a Python bug report :)
I'll have a look.

Thanks for merging the fix!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16298
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16555] Add es_cu to locale aliases

2012-12-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14266] pyunit script as shorthand for python -m unittest

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Berker's proposed implementation looks weird to me. Why the __unittest 
variable?
Also, it would be better to make unittest's API more flexible, rather than 
manually tweaking sys.argv to enable discovery.

--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14266
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16646] FTP.makeport() loses socket error details

2012-12-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10640] SystemError on pickling bytes = 4GB

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It should actually have been fixed in issue 11564. Please reopen if you can 
reproduce with a recent 3.x Python.

--
resolution:  - duplicate
status: pending - closed
superseder:  - pickle not 64-bit ready

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10640
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py)

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This very simple patch should certainly be applied.

--
assignee:  - dmalcolm
stage: patch review - commit review
versions: +Python 2.7 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Does it need additional tests?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16550
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16203] Proposal: add re.fullmatch() method

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the patch. While an internal flag may be a reasonable implementation 
strategy, IMHO a dedicated method still makes sense: it's simply more readable 
than passing a flag.

As for the tests, they should probably exercise the interaction with 
re.MULTILINE - see MRAB's comment in msg172775.

--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16203
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16501] deprecate RISCOS support

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

PEP 11 updated in 3abdc6b075fb.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16501
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16670] Point class may be not be a good example for namedtuple

2012-12-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

[Raymond, I am assuming that you only left this open for additional comments, 
possibly more favorable than yours. If I am wrong, reopen.]

I have not read the namedtuple doc before. I did so now and think the Point 
example is fine for the purpose of explaining namedtuples and should be left as 
is. It is clear to me and should be for anyone.

For instance, it naturally leads to this example.

Subclassing is not useful for adding new, stored fields. Instead, simply 
create a new named tuple type from the _fields attribute:

 Point3D = namedtuple('Point3D', Point._fields + ('z',))

While I do not consider the issue of 'practice' to be entirely relevant here, I 
note that complex numbers only work for 2-d points while tuples work for other 
dimensions, as the above shows. Tuples can be easily multiplied by a 
transformation matrix of the same dimension through indexing. The namedtuple 
factory just creates a friendly facade for what is still basically a tuple. 
Named tuple instances do not have per-instance dictionaries, so they are 
lightweight and require no more memory than regular tuples. Anyway, serious 
numerical work is more likely to use numpy arrays or something similar.

--
nosy: +terry.reedy
resolution:  - works for me
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett

Matthew Barnett added the comment:

OK, here's a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file28321/issue16688.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

How about adding a test?

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16488] Add context manager support to epoll object

2012-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d6f61cd364d9 by Antoine Pitrou in branch 'default':
Issue #16488: epoll() objects now support the `with` statement.
http://hg.python.org/cpython/rev/d6f61cd364d9

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16488
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16488] Add context manager support to epoll object

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Committed, thank you!

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16488
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16669] Docstrings for namedtuple

2012-12-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think this should be rejected and closed since the 'enhancement' looks worse 
to me than what we can do now.

1. Most data attributes cannot have individual docstrings, so I expect the 
class docstring to list and possibly explain the data attributes. 

2. In the process of responding to #16670, I finally read the namedtuple doc. I 
notice that it already generates default one-line .__doc__ attributes for both 
the class and properties. For Point, the class docstring is 'Point(x, y)', 
which will often be good enough. 

3. If the person creating the class does not think this sufficient, the 
replacement is likely to be multiple lines. This is awkward for a constructor 
argument. There is a reason we put docstrings *after* the header, not *in* the 
header.

4. The class docstring is easily replaced by assignment. So I would write 
Eric's example as

Point = namedtuple('Point', 'x y')
Point.__doc__ = '''\
A 2-dimensional coordinate

x - the abscissa
y - the ordinate'''

This does not create a second new class and is not a 'trick'.

5. The property docstrings have the form 'Alias for field number 0'. I do not 
consider replacing them an issue. If a true data attribute is replaced by a 
property, the act of replacement should be transparent. That is the point of 
properties. So there is no expectation that the attribute should suddenly grow 
a docstring, I presume that is why property docstrings are not used much. The 
default for named tuples gives information that is peculiarly relevant to named 
tuples and that should be generated automatically. As I said before, I think 
the prose explanation of field names belongs in the class doc.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16669
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results

2012-12-15 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
assignee:  - rosslagerwall
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16661
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d5a0698a8354 by Petri Lehtinen in branch 'default':
#11175: argparse.FileType now accepts encoding and errors arguments.
http://hg.python.org/cpython/rev/d5a0698a8354

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11175
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2012-12-15 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Committed, thanks for the patch!

I made little tweaks before committing:

- changed l1 to UTF-8 in the example (guess you mis-uploaded the latest version)
- changed the argument to 'replace' in test_r_1_replace
- fixed 3-space indentation to 4-space indentation in test_open_args

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11175
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned

2012-12-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Lib/test/pickletester.py contains some bigmem tests, they can be modified to 
cover issue12848 and this issue. But I can't run this tests.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16550
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14266] pyunit script as shorthand for python -m unittest

2012-12-15 Thread Éric Araujo

Éric Araujo added the comment:

I think the __unittest name is magic to hide modules from the unittest package 
in error/failure tracebacks.

About the script: can’t it be as simple as runpy.run_module?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14266
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have made the test, but I can't run it. Therefore I can't guarantee that the 
test works.

--
Added file: http://bugs.python.org/file28322/glob_magic_in_drive_test.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file28323/glob_magic_in_drive_test-2.7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29becac5dd9b by Stefan Krah in branch '3.3':
Issue #15783: Except for the number methods, the C version of decimal now
http://hg.python.org/cpython/rev/29becac5dd9b

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15783
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16618] Different glob() results for strings and bytes

2012-12-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15783] decimal: Support None default values in the C accelerator module

2012-12-15 Thread Stefan Krah

Stefan Krah added the comment:

Ezio, thanks for the Rietveld comments.


There are still unsupported None default values in the Context
constructor, so I'm leaving the issue open.

--
title: decimal.localcontext(None) fails when using the C accelerator module - 
decimal: Support None default values in the C accelerator module

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15783
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16648] stdib should use new exception types from PEP 3151

2012-12-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +FTP.makeport() loses socket error details, LMTP.connect() loses 
socket error details, Popen._internal_poll() references errno.ECHILD outside of 
the local scope, Wrong code in ContextManagerTests.test_invalid_args() in 
test_subprocess.py, Wrong test_extract_hardlink() in test_tarfile.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16648
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Tests work fine under 3.x, but under 2.7 I get:

==
FAIL: test_glob_magic_in_drive (test.test_glob.GlobTests)
--
Traceback (most recent call last):
  File C:\t\cpython\lib\test\test_glob.py, line 117, in test_glob_magic_in_dri
ve
eq(glob.glob('?\\c:\\'), ['?\\c:\\'])
  File C:\t\cpython\lib\test\test_glob.py, line 48, in assertSequencesEqual_no
order
self.assertEqual(set(l1), set(l2))
AssertionError: Items in the second set but not the first:
'?\\c:\\'

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, I forgot that splitdrive() on 2.7 does not work with UNC paths. Here is an 
updated patch.

--
Added file: 
http://bugs.python.org/file28324/glob_magic_in_drive_test-2.7_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: 
http://bugs.python.org/file28323/glob_magic_in_drive_test-2.7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16626] Infinite recursion in glob.glob('*:') on Windows

2012-12-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you, the new test works fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16677] Hard to find operator precedence in Lang Ref.

2012-12-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree with index entries and that 6.14 Evaluation Order (7 lines) and 6.15 
Summary (precedence table and notes) could be combined into 6.14 Evaluation 
Order and Precedence. I don't think the text necessarily needs revision. Just 
augment 6.14 and remove 6.15.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16677
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16679] Wrong URL path decoding

2012-12-15 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +aclover, pje

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread STINNER Victor

STINNER Victor added the comment:

Can someone check if there is no other similar regression (introduced
by the PEP 393)?

2012/12/15 Serhiy Storchaka rep...@bugs.python.org:

 Changes by Serhiy Storchaka storch...@gmail.com:


 --
 stage: needs patch - patch review

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16688
 ___

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett

Matthew Barnett added the comment:

I found another bug while looking through the source.

On line 495 in function SRE_COUNT:

if (maxcount  end - ptr  maxcount != 65535)
end = ptr + maxcount*state-charsize;

where 'end' and 'ptr' are of type 'char*'. That means that 'end - ptr' is the 
length in _bytes_, not characters.

If the byte after the end of the string is 0 then you get this:

 # Good:
 re.search(r\x00{1,3}, a\x00\x00).span()
(1, 3)
 # Bad:
 re.search(r\x00{1,3}, \u0100\x00\x00).span()
(1, 4)

I'll keep looking before submitting a patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett

Matthew Barnett added the comment:

I found another bug while looking through the source.

On line 495 in function SRE_COUNT:

if (maxcount  end - ptr  maxcount != 65535)
end = ptr + maxcount*state-charsize;

where 'end' and 'ptr' are of type 'char*'. That means that 'end - ptr' is the 
length in _bytes_, not characters.

If the byte after the end of the string is 0 then you get this:

 # Good:
 re.search(r\x00{1,3}, a\x00\x00).span()
(1, 3)
 # Bad:
 re.search(r\x00{1,3}, \u0100\x00\x00).span()
(1, 4)

I'll keep looking before submitting a patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15962] Windows STDIN/STDOUT Redirection is actually FIXED

2012-12-15 Thread Nacsa Kristóf

Nacsa Kristóf added the comment:

@dhgmgn I think the change is ok. That said, I add two things. 

It maybe should be noted which Windows version has this corrected.
The article contains this string: This problem was first corrected in 
Microsoft Windows 2000 Service Pack 4. This problem was first corrected in 
Windows XP Service Pack 1.

The other thing is that I prefer if the relevant information is copied due to 
various reasons. One reason is that it serves as a highlight (nice time-saver 
and is also against TL;DR situations). Another is that Microsoft may simply 
cease support, or discontinue this link (they tend to do this).

I'm not familiar with how the python docs is constructed, if there is a style 
guide, etc., but I can tell that I'd be happy if I could see this information 
there directly. This is also how I've found out about that cmd header 
line/'trick'.

@everyone
Another thing, can anyone else confirm that this works for [s]he?
I've tested this on an 32-bit xp pro sp3.

When _not_ using the fix, something like `foo | myscript.py | bar` results in:
IOError: [Errno 9] Bad file descriptor
With _using_ the registry fix from Microsoft, the command from above just works 
for me on the XP. (The cmd.exe/console needs to be restarted.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15962
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-15 Thread Matthew Barnett

Matthew Barnett added the comment:

I haven't found any other issues, so here's the second patch.

--
Added file: http://bugs.python.org/file28325/issue16688#2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16688
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16669] Docstrings for namedtuple

2012-12-15 Thread Eric Snow

Eric Snow added the comment:

+1, Terry

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16669
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16679] Wrong URL path decoding

2012-12-15 Thread Phillip J. Eby

Phillip J. Eby added the comment:

 Wouldn't it be possible to amend PEP ?

Sure...  except then it would also be necessary to amend PEP , and also all 
WSGI applications already written that assume this, any time in the last nine 
years.

This is a known and intended consistent property of how WSGI handles HTTP 
headers.  Under Python 2.x, PATH_INFO was a byte string (and still is), and to 
maintain also side-compatibility with Jython and IronPython, header strings are 
always maintained as bytes in unicode form, with applications having 
responsibility to decode-recode as needed.

This isn't a minor corner of the spec, it's central to how headers are handled, 
and has been so long before Python 3 even existed.  To mess with it now means 
you break applications and frameworks that are already correctly written to 
follow the specs.

To put it in brief, the reported behavior is not a bug, it is a feature and by 
design.  A server that returns a UTF-8 decoded PATH_INFO is in violation of the 
spec, so the reference implementation of the spec should absolutely not do so.  
;-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8109] Server-side support for TLS Server Name Indication extension

2012-12-15 Thread danblack

Changes by danblack daniel.bl...@openquery.com:


Added file: http://bugs.python.org/file28326/issue-8109-sni-serverside.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8109
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16694] Add pure Python operator module

2012-12-15 Thread Zachary Ware

New submission from Zachary Ware:

(Brett, I've made you nosy due to the relation to Issue16651.)

Here is a pure Python implementation of the operator module, or at least a 
first draft thereof :).  I'm attaching the module itself, as well as a patch to 
integrate it.

Any and all review is quite welcome. I'm confident in the fact that the module 
as it stands passes all current tests, but how it gets there is entirely up for 
debate (namely, the attrgetter, itemgetter, and methodcaller classes, as well 
as length_hint(), countOf(), and indexOf()).

Note that there's also a change to hmac.py; _compare_digest() in operator.c 
doesn't seem to have any relation to the rest of the module (see issue15061 
discussion) and is private anyway, so operator.py doesn't go near it.  hmac.py 
has to import directly from _operator.

Thanks,

Zach Ware

--
components: Extension Modules, Library (Lib)
files: operator.py
messages: 177579
nosy: brett.cannon, zach.ware
priority: normal
severity: normal
status: open
title: Add pure Python operator module
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28327/operator.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16694] Add pure Python operator module

2012-12-15 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file28328/py_operator.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com