[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Georg Brandl

Georg Brandl added the comment:

Hi Chris, your commit is a bit hard to review due to all the unrelated spacing 
changes.  I assume this is done automatically by your editor?  It's probably 
best to switch off that feature for CPython development :)

--

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



[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Georg Brandl

Georg Brandl added the comment:

While reviewing: is it intended that the filter is only called for directories 
and not for individual files?

--

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



[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2d39b3555951 by Georg Brandl in branch 'default':
#19274: use captured_stdout() in the test suite; add NEWS entry.
http://hg.python.org/cpython/rev/2d39b3555951

--

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



[issue19323] typo in statistics documentation

2013-10-21 Thread Michael Merickel

New submission from Michael Merickel:

http://docs.python.org/dev/library/statistics.html#mean describes the mean as 
effected by outliers, when it should say affected.

--
assignee: docs@python
components: Documentation
messages: 200704
nosy: docs@python, mmerickel
priority: normal
severity: normal
status: open
title: typo in statistics documentation
versions: Python 3.4

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



[issue19323] typo in statistics documentation

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1f466354a85b by Georg Brandl in branch 'default':
Closes #19323: fix typo. Thanks to Michael Merickel.
http://hg.python.org/cpython/rev/1f466354a85b

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

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



[issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3

2013-10-21 Thread David Coles

David Coles added the comment:

And here's the patch for Python 2.7.

The result of testing is as follows:
- python (default) against py2-linked gdb: All tests pass
- python (2.7) against py2-linked gdb: `test_long` fails.
- python (default) against py3-linked gdb: All tests pass
- python (2.7) against py3-linked gdb: `test_long`, `test_strings` and 
`test_unicode` fail.

`test_long` has been removed from the default branch, in addition gdb doesn't 
seem to distinguish printing 0 from 0L. `test_strings` likely fails since 
Python 3 will print printable unicode characters (like \xff) while Python 2 
will not. `test_unicode` likely fails due to the 'u' prefix on unicode strings 
in Python 2. This kind of behavior is pretty much expected when cross-testing 
gdb.

--
Added file: http://bugs.python.org/file32273/python27-gdb_py3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19308
___
___
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

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which follows second way.

--
keywords: +patch
Added file: http://bugs.python.org/file32274/test_tcl_wantobjects.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19320
___
___
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

2013-10-21 Thread Serhiy Storchaka

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


--
stage:  - patch review
versions: +Python 3.3, Python 3.4

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If the order of events with the same time and priority doesn't matter, we can 
optimize the queue property more than 10 times by using sort() (see 
cancel_4.patch in issue13451).

--

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



[issue19321] memoryview should be a context manager

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And thank you Antoine for this.

--

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



[issue19321] memoryview should be a context manager

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Well, it was not only proposed, but it was also implemented (by Antoine).

Oh, sorry for the noise.

--
resolution:  - out of date
stage: needs patch - committed/rejected
status: open - closed

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

 That is allowed.   We make no stability guarantees.  Plus it just makes sense 
 that events with the same time and priority are non-deterministic.

It would be nice to keep the insertion order. If it is not guaranteed, it must 
be well documented (big red warning).

Does it occur frequently to schedule two events at exactly the same time? On 
Linux, clocks have a good precision, even time.monotonic(). On Windows, the 
precision of time.monotonic() is worse (around 16 ms), so two events at the 
same time is more likely.

The issue is specific to events scheduled at an absolute time, right? Or does 
.enter() has a similar issue?

--
nosy: +haypo

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



[issue19306] Warn unsuspecting readers that thread stacks are in reverse order

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

Thanks. (most recent call first) was already present in some cases, but I 
forgot to mention it in all cases.

--

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



[issue19293] test_asyncio hanging for 1 hour

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

2013/10/21 David Edelsohn rep...@bugs.python.org:
 I added many tests when I added this feature to Python: see test_signal.py. 
 By the way, it uses select.select() :-) Does test_signal pass successfully 
 on AIX?

 @haypo: test_signal skips some tests on AIX.  See Issue #18238 .

Ah yes, the test on select+signal is skipped, but the basic feature
(writing a signal number in a pipe using wakeup fd) works on AIX.

--

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Does it occur frequently to schedule two events at exactly the same
 time? On Linux, clocks have a good precision, even time.monotonic().

It depends how you calculate your timestamps, I'd say :-) It's unlikely
for two calls to time.time() to give the exact same outcome. OTOH, if
you're using a fixed base time and add user-provided timedeltas to it,
collisions are quite possible.

(a special case is using a 0 delay, in order to schedule a call for
the next loop iteration)

--

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

  ... for two calls to time.time() to give the exact same outcome
 
 sched now uses time.monotonic() since Python 3.3.

This seems quite irrelevant:

   len(set(time.monotonic() for i in range(100)))
  100

--

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



[issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've added a review comment to the 3.3 version of the patch.

--

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

 ... for two calls to time.time() to give the exact same outcome

sched now uses time.monotonic() since Python 3.3. In Python 2.7, there is no 
default timer, but I get that users pick time.time(). (Oh, sched has no unit 
test in Python 2.7.)

--

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



[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hmm, does anyone have an opinion for or against the proposed representation in 
Sunny's patch? 

Sunny, if you haven't done so, could you sign a contributor's agreement? 
http://www.python.org/psf/contrib/
Thanks!

--

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

Victor: On Windows, the precision of time.monotonic() is worse (around 16 ms), 
so two events at the same time is more likely.

Antoine: This seems quite irrelevant:

I would be interested of the same test on Windows.

--

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



[issue19293] test_asyncio hanging for 1 hour

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

I'm completely lost: how many issues is this thread conflating?
For example, David, I think you said that my patch regarding signal
handling did fix some tests.
Is that still the case?
If yes, could you open a specific issue for the remaining failing tests on AIX?

AFAICT, the original hang is due to AIX always reporting the write-end
of a pipe as read-ready: we should only keep discussing this problem
here.

The above FreeBSD and Ubuntu failures seem completely unrelated, they
should get there own issues.

--

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



[issue19205] Don't import re and sysconfig in site.py

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

The imports in _osx_support counteract the performance boost. I neither have an 
OS X machine and nor do I understand the internals of  _osx_support. Perhaps 
somebody else likes to work on the module.

--
assignee: christian.heimes - 
components: +Macintosh -Interpreter Core
priority: normal - low

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



[issue18528] Possible fd leak in socketmodule

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Shall I commit my patch or shall I close the coverity issue as intentionally?

--
versions:  -Python 3.3

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



[issue18650] intermittent test_pydoc failure on 3.4.0a1

2013-10-21 Thread Esa Peuha

Esa Peuha added the comment:

The problem seems to be 
/Users/pyi/Library/Python/3.4/lib/python/site-packages/setuptools-0.9.8-py3.4.egg
 according to the error page. What is that file? The fact that the second run 
of the test succeeds implies that it could be a temporary file which is no 
longer present when the test is run again.

--
nosy: +Esa.Peuha

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



[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Yes, it's a security issue. But the patch would changes the behavior of the 
function. The current function conforms to RFC 2818. The patch implements RFC 
6125, which is more restrictive.

--
nosy: +georg.brandl, larry
priority: normal - release blocker

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



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Victor, is here anything left to do?

--
assignee:  - haypo
stage:  - commit review
status: open - languishing

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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread koobs

koobs added the comment:

@Ethan, not sure if you've already seen them, but there are 4 pydoc failures 
since 2f09a6980e1a

Attaching another complete log from build #245 on the koobs-freebsd9 buildslave 
here for posterity

--
Added file: http://bugs.python.org/file32275/koobs-freebsd9-py3x-build245.log

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



[issue19324] Expose Linux-specific APIs in resource module

2013-10-21 Thread Christian Heimes

New submission from Christian Heimes:

See #16595
and http://mail.python.org/pipermail/python-ideas/2012-June/015323.html

I'm going to add the extra constants before beta.

RLIMIT_MSGQUEUE
RLIMIT_NICE
RLIMIT_RTPRIO
RLIMIT_RTTIME
RLIMIT_SIGPENDING

--
assignee: christian.heimes
messages: 200727
nosy: christian.heimes, giampaolo.rodola
priority: normal
severity: normal
stage: needs patch
status: open
title: Expose Linux-specific APIs in resource module
type: enhancement
versions: Python 3.4

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



[issue18550] internal_setblocking() doesn't check return value of fcntl()

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

LGTM
The patch silences the coverity warnings, too. Does anybody else like to do a 
code review?

--

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



[issue17276] HMAC: deprecate default hash

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

GPS, what do you suggest instead? Do you want me to remove the deprecation 
warning?

--

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



[issue18775] name attribute for HMAC

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

I'm going to commit the patch this week. Speak now or forever hold your peace...

--

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



[issue19324] Expose Linux-specific APIs in resource module

2013-10-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +neologix

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



[issue19205] Don't import re and sysconfig in site.py

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

 The imports in _osx_support counteract the performance boost. I neither have 
 an OS X machine and nor do I understand the internals of  _osx_support. 
 Perhaps somebody else likes to work on the module.

Please open a separated issue for OS X, this issue can be closed IMO.

--

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



[issue19302] Add support for AIX pollset efficient event I/O polling

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

 David Edelsohn added the comment:

 This enhancement issue is not a demand that you or anyone else in the Python 
 community volunteer to implement it. AIX is a very lucrative business and 
 deployed in many businesses that the Python community would like to reach. 
 Maybe you should broaden your viewpoint and think about why support for a 
 niche platform could be beneficial for Python.

Sorry, but I stand by my claim: making Python work on AIX by fixing compilation 
bugs, or non-portable assumptions like the one in #19293 is a good thing, and 
such bugs should be fixed.
But adding a large chunk of AIX-specific code, which will only be used by a 
handful of users, and more importantly only debuggable and maintainable by a 
couple of contributors, is a whole different story.

My reaction would be the same if someone were to suggest implementing something 
similar for e.g. the Hurd (that's an example, I know there are more AIX users).

Also, AFAICT we don't have any *stable* AIX buildbot yet: at the very least, 
making the current test suite pass - and not merely by skipping tests - and 
having a stable AIX buildbot would be a prerequisite.

Furthermore, apparently AIX isn't an officially supported platform, see 
http://www.python.org/getit/other/

Having someone volunteer to write a patch isn't enough to have it merged.

But I'd like to have Martin's opinion, since he's the author and PEP 11, and 
usually has good insights on those issues.

--
nosy: +loewis

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



[issue19205] Don't import re and sysconfig in site.py

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Good point, #19325

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

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



[issue19325] _osx_support imports many modules

2013-10-21 Thread Christian Heimes

New submission from Christian Heimes:

On Mac OS X the site module imports sysconfig which imports _osx_support which 
in turn imports several more modules like the re module. More modules == slower 
startup. See #19205 for background information on the issue.

--
assignee: ronaldoussoren
components: Library (Lib), Macintosh
messages: 200733
nosy: christian.heimes, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: _osx_support imports many modules
type: performance
versions: Python 3.4

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



[issue19251] bitwise ops for bytes of equal length

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

I see that the feature idea is more controversial than I initially expected. 
It's probably best to have a long bike-shedding discussion on Python-ideas... 
:) Right now from_bytes/to_bytes trick is fast enough for my needs anyway. 
Therefore I'm deferring the proposal for 3.5.

By the way I'd also be happy with a set of vector ops in the operator module, 
e.g. vector_xor(a, b).

--
versions: +Python 3.5 -Python 3.4

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



[issue19325] _osx_support imports many modules

2013-10-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue19302] Add support for AIX pollset efficient event I/O polling

2013-10-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(note that we have a devpoll implementation for Solaris)

--

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



[issue19251] bitwise ops for bytes of equal length

2013-10-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue16595] Add resource.prlimit

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for your tests. I may have to rework my test scenario a bit.

--

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



[issue16685] audioop functions shouldn't accept strings

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Well. In updated patch I use gotos where it decreases the number of lines 
(total decreasing is almost 30 lines).

--

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



[issue16685] audioop functions shouldn't accept strings

2013-10-21 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file32276/audioop_buffer_2.patch

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



[issue19325] _osx_support imports many modules

2013-10-21 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
assignee: ronaldoussoren - ned.deily
nosy: +ned.deily

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



[issue19251] bitwise ops for bytes of equal length

2013-10-21 Thread Ramchandra Apte

Ramchandra Apte added the comment:

On 21 October 2013 14:45, Christian Heimes rep...@bugs.python.org wrote:


 Christian Heimes added the comment:

 I see that the feature idea is more controversial than I initially
 expected. It's probably best to have a long bike-shedding discussion on
 Python-ideas... :) Right now from_bytes/to_bytes trick is fast enough for
 my needs anyway. Therefore I'm deferring the proposal for 3.5.

 By the way I'd also be happy with a set of vector ops in the operator
 module, e.g. vector_xor(a, b).

 +1, a generic vector_xor function looks like a better idea.

--

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



[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2013-10-21 Thread Maciej Bliziński

Changes by Maciej Bliziński maciej.blizin...@gmail.com:


--
versions: +Python 2.6, Python 2.7

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



[issue10977] Concrete object C API considered harmful to subclasses of builtin types

2013-10-21 Thread Stefan Krah

Stefan Krah added the comment:

I'm also in favor of a clean separation between the concrete and abstract
APIs (see also #12965).  Why can't the concrete functions be locked down
with *CheckExact()?  If there's any breakage in third party modules,
it's easy to fix (probably much easier than the Unicode changes in 3.3).

--
nosy: +skrah

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



[issue18527] Upgrade Modules/zlib to 1.2.8

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 224aa49f22f1 by Christian Heimes in branch 'default':
Issue #18527: Upgrade internal copy of zlib to 1.2.8
http://hg.python.org/cpython/rev/224aa49f22f1

--
nosy: +python-dev

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



[issue19292] Make SSLContext.set_default_verify_paths() work on Windows

2013-10-21 Thread intgr

Changes by intgr ma...@juffo.org:


--
nosy: +intgr

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



[issue18527] Upgrade Modules/zlib to 1.2.8

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Done.

I have also removed two files that are neither part of zlib 1.2.8 nor required 
to build the extension on Windows.

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

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



[issue19251] bitwise ops for bytes of equal length

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 By the way I'd also be happy with a set of vector ops in the operator module, 
 e.g. vector_xor(a, b).

This is one direction. Other direction is adding the bitarray or bitset 
container and the bitview adapter.

--

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



[issue19326] asyncio: child process exit isn't detected if its stdin/stdout/stderr FDs have been inherited by a child process

2013-10-21 Thread Charles-François Natali

New submission from Charles-François Natali:

(This is a spinoff from http://bugs.python.org/issue19293#msg200598)

When SIGCHLD is received, _sig_chld() is executed:

def _sig_chld(self):
[...]
transp = self._subprocesses.get(pid)
if transp is not None:
transp._process_exited(returncode)

Then, here's _process_exited():

def _process_exited(self, returncode):
assert returncode is not None, returncode
assert self._returncode is None, self._returncode
self._returncode = returncode
self._loop._subprocess_closed(self)
self._call(self._protocol.process_exited)
self._try_finish()

And here's _try_finish():

def _try_finish(self):
assert not self._finished
if self._returncode is None:
return
if all(p is not None and p.disconnected
   for p in self._pipes.values()):
self._finished = True
self._loop.call_soon(self._call_connection_lost, None)

Thus, _UnixSubprocessTransport protocol's connection_lost is only
called if the all() expression is true:
and it's true only if all the subprocess pipes have been disconnected
(or if we didn't setup any pipe).

Unfortunately, this might very well never happen: imagine that the
subprocess forks a process: this grand-child process inherits the
child process's pipes, so when the child process exits, we won't
receive any notification, since this grand-child process still has
open FDs pointing to the original child's stdin/stdout/stderr.

The following simple test will hang until the background 'sleep' exits:

diff -r 47618b00405b Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py  Sat Oct 19 10:45:48 2013 +0300
+++ b/Lib/test/test_asyncio/test_events.py  Sun Oct 20 19:32:37 2013 +0200
@@ -1059,6 +1059,23 @@

 @unittest.skipIf(sys.platform == 'win32',
  Don't support subprocess for Windows yet)
+def test_subprocess_inherit_fds(self):
+proto = None
+
+@tasks.coroutine
+def connect():
+nonlocal proto
+transp, proto = yield from self.loop.subprocess_shell(
+functools.partial(MySubprocessProtocol, self.loop),
+'sleep 60 ')
+self.assertIsInstance(proto, MySubprocessProtocol)
+
+self.loop.run_until_complete(connect())
+self.loop.run_until_complete(proto.completed)
+self.assertEqual(0, proto.returncode)
+
+@unittest.skipIf(sys.platform == 'win32',
+ Don't support subprocess for Windows yet)
 def test_subprocess_close_after_finish(self):
 proto = None
 transp = None


If waitpid() returns a process's PID, then the process is done,
there's no reason to further wait for pipe's disconnection: they can
be used as a hint that the process terminated, but there's definitely
not required...

--
messages: 200744
nosy: neologix
priority: normal
severity: normal
stage: needs patch
status: open
title: asyncio: child process exit isn't detected if its stdin/stdout/stderr 
FDs have been inherited by a child process
type: behavior
versions: Python 3.4

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



[issue19293] test_asyncio hanging for 1 hour

2013-10-21 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Would it make sense to use socketpair() instead of pipe() on AIX?  We could 
check for the bug directly rather than checking specifically for AIX.

--

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



[issue18742] Abstract base class for hashlib

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

I'm going to add CryptoKeyedHash ABC and register hmac as keyed hash algorithm, 
too.

--

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



[issue19327] re doesn't work with big charsets

2013-10-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

 import re
 re.compile('[%s]' % ''.join(map(chr, range(256, 2**16, 255
Traceback (most recent call last):
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 211, in 
_optimize_charset
charmap[fixup(av)] = 1
IndexError: list assignment index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/serhiy/py/cpython/Lib/re.py, line 213, in compile
return _compile(pattern, flags)
  File /home/serhiy/py/cpython/Lib/re.py, line 280, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 489, in compile
code = _code(p, flags)
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 471, in _code
_compile_info(code, p, flags)
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 459, in _compile_info
_compile_charset(charset, flags, code)
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 177, in 
_compile_charset
for op, av in _optimize_charset(charset, fixup):
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 220, in 
_optimize_charset
return _optimize_unicode(charset, fixup)
  File /home/serhiy/py/cpython/Lib/sre_compile.py, line 342, in 
_optimize_unicode
mapping = array.array('b', mapping).tobytes()
OverflowError: signed char is greater than maximum

--
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
files: re_bigcharset.patch
keywords: patch
messages: 200747
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: re doesn't work with big charsets
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32277/re_bigcharset.patch

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



[issue19327] re doesn't work with big charsets

2013-10-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue19327] re doesn't work with big charsets

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

@Serhiy: Could you please take a look at issue #13100?

--

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



[issue19328] Improve PBKDF2 documentation

2013-10-21 Thread Christian Heimes

New submission from Christian Heimes:

The new pbkdf2_hmac() feature #18582 #19254 needs more documentation. I'm going 
to explain round count, salt generation, user vs. application salt, salt length 
etc.

--
assignee: christian.heimes
components: Documentation
messages: 200749
nosy: christian.heimes
priority: normal
severity: normal
stage: test needed
status: open
title: Improve PBKDF2 documentation
type: enhancement
versions: Python 3.4

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



[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Christian Tismer

Christian Tismer added the comment:

ah, I just see that.
The problem was that the checkin drove me nuts. It forced me to
run reindent to normalize the code. I did that with my WindIde
editor, but this did not help.
The point was: Actually an end-of-line was missing at the end of
the files.
Sorry, I did not see that at all, because the indentation changes
are at the end. I usually avoid this strictly. It was just the check-in
rejection...

--

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



[issue19328] Improve PBKDF2 documentation

2013-10-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue19327] re doesn't work with big charsets

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have encountered this bug when writing test for for fragment of my large 
patch which cleanups and optimize the re module (it is too large to be 
committed all at once).

--

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



[issue10977] Concrete object C API considered harmful to subclasses of builtin types

2013-10-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Because calling them *from* method implementations in concrete subclasses
is often a perfectly reasonable thing to do.

--

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



[issue13100] sre_compile._optimize_unicode() needs a cleanup

2013-10-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are a lot of dead or suboptimal code in the re module. For example 
_sre.CODESIZE now can't be 2. We could cleanup the code as side effect of 
optimization.

--
nosy: +serhiy.storchaka

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



[issue19170] telnetlib: use selectors

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f713d9b6393c by Charles-François Natali in branch 'default':
Issue #19170: telnetlib: use selectors.
http://hg.python.org/cpython/rev/f713d9b6393c

--
nosy: +python-dev

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



[issue19329] Faster compiling of big charset regexpes

2013-10-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which speed up compiling of regular expressions with big 
charsets.

Microbenchmark:
$ ./python -m timeit from sre_compile import compile; r = '[%s]' % 
''.join(map(chr, range(256, 2**16, 255)))  compile(r, 0)

Unpatched (but with fixed issue19327): 119 msec per loop
Patched: 59.6 msec per loop

Compiling regular expressions with big charset was main cause of slowing down 
importing the email.message module (issue11454).

--
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
files: re_mk_bitmap.patch
keywords: patch
messages: 200755
nosy: ezio.melotti, haypo, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Faster compiling of big charset regexpes
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file32278/re_mk_bitmap.patch

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



[issue19329] Faster compiling of big charset regexpes

2013-10-21 Thread Serhiy Storchaka

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


--
dependencies: +re doesn't work with big charsets

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



[issue18931] new selectors module should support devpoll on Solaris

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

Just to let you know that I'm not forgetting this issue.
I'd just like to iron-out issue #19172 (keys()-like method for selectors), 
since it could impact the API, to avoid repeated refactoring.

--

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



[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

Gregory, did you make any progress on this?
I think it would be a nice addition.

--

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



[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Indeed! I'd like to see the feature in 3.4 so I can remove my own hack from our 
code base.

--

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



[issue18603] PyOS_mystricmp unused and no longer available

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

ping RMs

--
nosy: +benjamin.peterson, georg.brandl, larry

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



[issue17791] PC/pyconfig.h defines PREFIX macro

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

ping RMs and Windows devs

--
nosy: +brian.curtin, larry, tim.golden

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



[issue17913] stat.filemode returns - for sockets and unknown types

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

The C code in Python 3.4's _stat.c module already handle unsupported types 
correctly. I'm going to apply my patch to the Python implementation in 2.7, 3.3 
and 3.4 soonish. Or is somebody against a fix of 2.7 and 3.3?

--

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



[issue18369] X509 cert class for ssl module

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Bump up my priority. I'd like to get the feature into 3.4 as a foundation for 
some of my other improvements of the SSL module.

--
assignee:  - christian.heimes
priority: normal - high
stage:  - patch review

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



[issue17123] Add OCSP support to ssl module

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

I won't have time for a proper implementation for 3.4. Defer to 3.5

--
versions: +Python 3.5 -Python 2.6, Python 2.7, Python 3.4

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



[issue17006] Warn users about hashing secrets?

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Who likes to step in? Alex?

--
nosy: +alex

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



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

ping :)

--
versions:  -Python 3.2

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



[issue16175] Add I/O Completion Ports wrapper

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Is this patch still of relevance for asyncio?

--

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Richard, do you have time to get your patch ready for 3.4?

--
assignee: christian.heimes - 

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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dad1debba93c by Charles-François Natali in branch 'default':
Fix test_pydoc failure introduced by 2f09a6980e1a (issue #19030).
http://hg.python.org/cpython/rev/dad1debba93c

--

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



[issue16175] Add I/O Completion Ports wrapper

2013-10-21 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Is this patch still of relevance for asyncio?

No, the _overlapped extension contains the IOCP stuff.

--

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



[issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

 Christian Heimes added the comment:

 I think it's more likely that my patch is triggering an existing bug. The 
 locking code for the SSL module and OpenSSL doesn't release locks on fork. I 
 have attached an experimental patch that unlocks all locks in the client.

The problem is that this patch can make it even more deadlock-prone:
pthread_mutex_unlock() isn't async-signal safe (it's not just theory:
depending on the implementation, I've seen it deadlock on some
platforms, even on Linux IIRC).

Also, there's another problem with the approach of unlocking locks in
the child process: locks are usually used to protect critical
sections, i.e. sections of code where an invariant must be preserved
between entry and exit: by merely unlocking the locks in the child
process, we can - maybe, see above - prevent deadlocks, but the data
protected by those locks can very-well be left in an inconsistent
state. So we might be trading a deadlock for a non-functional ssl
library in the child process, which would be - from a security POV -
even worse.

Really, adding fork-hooks is a bad idea: unfortunately, I don't have
anything better to suggest :-(.

Except maybe adding an add-hoc hook to posix_fork(), like the ones
used to reset the GIL, threading module etc: at least, it will not
make the interpreter less safe than now, and won't be able to deadlock
processes that are conform and use subprocess to create processes...

--

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



[issue19217] Calling assertEquals for moderately long list takes too long

2013-10-21 Thread Jacek Bzdak

Jacek Bzdak added the comment:

The patch works for me, thanks Ezio!

--

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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

I took the freedom to push a fix for the test_pydoc failures (all the buildbots 
were red). It should fix the failures, but since I'm not familiar with the 
code, it'd be good to have someone double-check it.

Ethan, you just broke all the buildbots: you're now officialy a core developer! 
;-)

--
nosy: +neologix

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



[issue16175] Add I/O Completion Ports wrapper

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Thanks, I'm closing this ticket.

--
resolution:  - out of date
stage:  - committed/rejected
status: open - closed

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Richard, do you have time to get your patch ready for 3.4?

Yes.  But we don't seem to have concensus on how to handle exceptions.  The 
main question is whether a failed prepare callback should prevent the fork from 
happenning, or just be printed.

--

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



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Is the error still current? io.StringIO is now completely implemented in 
_io/textio.c, and should not have any Python-level __del__.

--

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



[issue1540] Refleak tests: test_doctest and test_gc are failing

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

I don't know ... Is somebody able to test it?

--

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Dwayne Litzenberger

Dwayne Litzenberger added the comment:

 The main question is whether a failed prepare callback should prevent the 
 fork from happenning

Yes, I think an exception should prevent the fork from happening.

It's fail-safe for the PRNG case (you can guarantee that a fork won't occur 
without properly re-seeding a PRNG), and it makes bugs easier to catch in unit 
testing.

--

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

+1 for exception prevents fork

--

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

I have a couple random remarks:
- now that FDs are non-inheritable by default, fork locks around
subprocess and multiprocessing shouldn't be necessary anymore? What
other use cases does the fork-lock have?
- the current implementation keeps hard-references to the functions
passed: so if one isn't careful, you can end up easily with a lot of
objects kept alive just because of those references, which can be a
problem
- also, since we're not sure about the API, and it's mostly intended
to be used for the interpreter/stdlib, how about making it private for
now, or at least provisional' (I think that's the term)?
- I'm also +1 on exceptions in prepare hook preventing fork, but we'll
need to play a bit with actual fork hooks to see if that's a
reasonable approach

--

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



[issue16500] Add an 'atfork' module

2013-10-21 Thread STINNER Victor

STINNER Victor added the comment:

now that FDs are non-inheritable by default, fork locks around
subprocess and multiprocessing shouldn't be necessary anymore? What
other use cases does the fork-lock have?

Well, on Windows, it's still not possible to inherit only one handle. If you 
mark temporary the handle as inheritable (os.set_handle_inheritable), it might 
be inherited by a diffrent child process if another Python thread spawn a 
process... It's probably unlikely, so it's one of the use case of such lock :-)

--

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



[issue19302] Add support for AIX pollset efficient event I/O polling

2013-10-21 Thread David Edelsohn

David Edelsohn added the comment:

CF,

Pre-built binaries of Python for AIX are available on the Bull Freeware and 
Perzl sites of Open Source Software for AIX. The GetIt page should be updated 
and the packages can be made available through python.org

Other parts of your reasoning are somewhat circular because most of the 
problems on AIX are Linux-isms (or BSD-isms where BSD has not yielded to Linux 
behavior). So you argue against adding lots of AIX-specific code, yet fixing 
some of the tests more generally will require adding lots of AIX-specific code.

I am trying to focus on features and functionality that will make Python more 
useful to more AIX users. Hopefully that would grow the Python user base and 
developer base on AIX and lead to more support for Python on AIX. Fixing every 
corner case test is more a pedantic argument than something that is useful to 
the general Python user.

A lot of the Python buildbot testsuite failures are due to a locale issue that 
has not been my highest priority.

--

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



[issue19330] Use public classes for contextlib.suppress and redirect_stdout

2013-10-21 Thread Nick Coghlan

New submission from Nick Coghlan:

I broke help() for instances of these context managers by trying to postpone 
exposing the class APIs until 3.5 (and didn't even record my full rationale, 
however flawed, in the associated comments).

The wrapper functions should be removed, making the classes the public 
implementation. I also plan to make the following changes (although I may end 
up moving them to separate issues):

- provide (and document) a public target attribute on redirect_stdout
- make redirect_stdout reentrant (and switch to ExitStack as the 
reusable-but-not-reentrant example)

- provide (and document) a public exceptions attribute on suppress
- return self from suppress.__enter__

--
assignee: ncoghlan
components: Library (Lib)
messages: 200782
nosy: larry, ncoghlan
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Use public classes for contextlib.suppress and redirect_stdout
type: behavior
versions: Python 3.4

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Barry A. Warsaw

New submission from Barry A. Warsaw:

PEP 8 says:


Class Names
Almost without exception, class names use the CapWords convention. Classes for 
internal use have a leading underscore in addition.


yet there are some notable exceptions in practice, such as classes designed to 
be context managers (used with the `with` statement).

This message indicates Nick's implementation choice of a wrapper function in 
part to avoid naming a class with all lower cases (which look better with 
`with`, but break the PEP 8 convention).

https://mail.python.org/pipermail/python-dev/2013-October/129791.html

The PEP 8 language should be revised, but striking the right balance might be a 
little tricky.

--
messages: 200783
nosy: barry
priority: normal
severity: normal
status: open
title: Revise PEP 8 recommendation for class names

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
assignee:  - barry

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



[issue19332] Guard against changing dict during iteration

2013-10-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Currently dict iterating is guarded against changing dict's size. However when 
dict changed during iteration so that it's size left unchanged, this 
modification left unnoticed.

 d = dict.fromkeys('abcd')
 for i in d:
... print(i)
... d[i + 'x'] = None
... del d[i]
... 
d
a
dx
dxx
ax
c
b

In general iterating over mutating dict considered logical error. It is good 
detect it as early as possible.

The proposed patch introduces a counter which changed every time when added or 
removed key. If an iterator detects that this counter is changed, it raises 
runtime error.

--
components: Interpreter Core
files: dict_mutating_iteration.patch
keywords: patch
messages: 200784
nosy: pitrou, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Guard against changing dict during iteration
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32279/dict_mutating_iteration.patch

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



[issue19333] distutils.util.grok_environment_error loses the error message

2013-10-21 Thread Marius Gedminas

New submission from Marius Gedminas:

Steps to reproduce:

$ python -c 'from distutils.util import grok_environment_error as e; 
print(e(IOError(message)))'

What I expect to see:
error: message

What I get instead:
error: None

This is a problem because it hides the error message in a real-life use case: 
trying to use the latest setuptools in an ancient virtualenv (see [1]).  TL;DR 
version:
- sysconfig (in the standard library) raises IOError(msg),
- which is then caught and passed 
throughdistutils.util.grok_environment_error(),
- which then returns an unfriendly 'error: None'.

[1] 
https://bitbucket.org/pypa/setuptools/issue/89/easy_install-quits-with-error-none-in

--
assignee: eric.araujo
components: Distutils
messages: 200785
nosy: eric.araujo, mgedmin, tarek
priority: normal
severity: normal
status: open
title: distutils.util.grok_environment_error loses the error message
type: behavior
versions: Python 2.7, Python 3.3

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



[issue19302] Add support for AIX pollset efficient event I/O polling

2013-10-21 Thread Charles-François Natali

Charles-François Natali added the comment:

 Other parts of your reasoning are somewhat circular because most of the 
 problems on AIX are Linux-isms (or BSD-isms where BSD has not yielded to 
 Linux behavior). So you argue against adding lots of AIX-specific code, yet 
 fixing some of the tests more generally will require adding lots of 
 AIX-specific code.

It shouldn't require a lot of AIX-specific code, as long as AIX is
POSIX-compliant.
If some tests are failing because on Linux-isms assumptions - either
in the stdlib, or in the tests - as I said, we'll be happy to fix
them: just open relevant issues.

Once again, this issue is not about whether or not we want to support
AIX (I'm personally happy to have as many Unices supported as
possible), but rather whether or not we want to add large chunks of
OS-specific code, whereas the currently generic POSIX primitives -
such as select() and poll() - work on all POSIX-compliant platforms.
Adding platform-specific code has a cost, and IMO, the cost isn't
worth it for AIX.

I can understand that your point of view differs, either because of
your job or personal interest, that's why I'd like to know if there's
a consensus, or semi-official policy among the CPython project.

Feel free to bring this up on the python-dev mailing list!

--

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



[issue19331] Revise PEP 8 recommendation for class names

2013-10-21 Thread Paul Moore

Paul Moore added the comment:

How about simply adding a further sentence, something like:

Where a class is being used conceptually as a callable (for example, context 
managers), the naming convention for callables (lower_case_with_underscores) 
should be followed.

Maybe also add a section at the start of Naming Conventions:


Overriding Principle
Whenever names are visible to the user, as public parts of the API, the naming 
convention should reflect usage rather than implementation. An internal change 
(for example switching from a class to a factory function) should never affect 
the names used in the public API.


--
nosy: +pmoore

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



[issue19270] sched.cancel() breaks events order

2013-10-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This module has been around for a long time and no users have reported any 
issues with respect to event ordering.  The logic is essentially the same as is 
used in popular event loops like Tornado.

Please don't just make-up a new invariant for this module.

--
versions:  -Python 2.7, Python 3.3

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



  1   2   3   >