[issue20330] PEP 342 is outdated

2014-01-25 Thread Nick Coghlan

Nick Coghlan added the comment:

David is correct, most PEPs are historical records of design decisions that 
cease to be updated once completed. The language reference is the normative 
guide for current behaviour.

The exception is informational and process PEPs, which cover things that 
are not covered in the language reference, as well the occasional Standards 
Track PEP which ends up not being incorporated into the language reference 
properly (for example, until the import section was added to the language 
reference in Python 3.3, PEP 302 was the best available reference 
documentation).

--
nosy: +ncoghlan
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue20317] ExitStack hang if enough nested exceptions

2014-01-25 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


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

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



[issue20075] help(open) eats first line

2014-01-25 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
dependencies: +Argument Clinic should use a non-error-prone syntax to mark text 
signatures

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Georg Brandl

Georg Brandl added the comment:

Since the test is still failing on at least 3 stable buildbots, I've reverted 
the 3.3 changes for 3.3.4rc1.

--
nosy: +georg.brandl

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



[issue20264] Update patchcheck to looks for files with clinic comments

2014-01-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Having clinic work like reindent on make patchcheck would be very nice.

As a second line of defence, we should also have a server side equivalent of 
the whitespace check as a repo hook in Mercurial (i.e. don't allow a push when 
clinic output is out of date).

--
nosy: +ncoghlan, pitrou

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



[issue20388] Argument Clinic generates wrong signature for module level functions

2014-01-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Argument Clinic generates wrong signature for module level functions.

For example for the following declaration

/*[clinic input]
binascii.a2b_uu

ascii: ascii_buffer
/

Decode a line of uuencoded data.
[clinic start generated code]*/

Argument Clinic generates

PyDoc_STRVAR(binascii_a2b_uu__doc__,
a2b_uu(module, ascii)\n
Decode a line of uuencoded data.);

--
components: Demos and Tools
messages: 209166
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic generates wrong signature for module level functions
type: behavior
versions: Python 3.4

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



[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

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


--
dependencies: +Argument Clinic generates wrong signature for module level 
functions

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



[issue20388] Argument Clinic generates wrong signature for module level functions

2014-01-25 Thread Zachary Ware

Zachary Ware added the comment:

That's by design (of #20189); inspect.Signature.from_builtin strips out the 
'module' param.

--
nosy: +zach.ware
resolution:  - invalid
status: open - pending

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

I've found two bugs:

1) In the type check, a '' needs to be added before the type name.
2) Setting template_dict['self_type_object'] fails for module functions

--

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



[issue20388] Argument Clinic generates wrong signature for module level functions

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What if function already has the module parameter? E.g. 
_warnings.warn_explicit.

--
status: pending - open

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



[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

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


--
dependencies: +Argument Clinic: backslashes in docstrings are not escaped

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



[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2014-01-25 Thread Serhiy Storchaka

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


--
priority: normal - high

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

Also, I believe the the type of the first argument passed to a method is a 
pointer to the typedef object, so a '*' needs to be added after the typedef 
name wherever it is used in such functions.

--

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



[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Zachary Ware

Zachary Ware added the comment:

Ahh, that is a good point, though the real problem with that is in compilation 
rather than the Python signature.  I believe there's a fix in the works, 
somewhere in Larry's to-do list.  _winapi also has a function that takes a 
'module' parameter, though being undocumented (and referring to a handle, not a 
Python module), I was able to just name that one 'module_handle'.

--
resolution: invalid - 
title: Argument Clinic generates wrong signature for module level functions - 
Argument Clinic doesn't handle module level functions with module parameter well

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



[issue20376] Argument Clinic: backslashes in docstrings are not escaped

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  - zach.ware
stage:  - commit review

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



[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 21f8abfe459a by Serhiy Storchaka in branch 'default':
Issue #20151: The binascii module now uses Argument Clinic.
http://hg.python.org/cpython/rev/21f8abfe459a

--
nosy: +python-dev

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



[issue20376] Argument Clinic: backslashes in docstrings are not escaped

2014-01-25 Thread Zachary Ware

Zachary Ware added the comment:

Done!

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

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



[issue20376] Argument Clinic: backslashes in docstrings are not escaped

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 381c9d592cc8 by Zachary Ware in branch 'default':
Issue #20376: Argument Clinic now escapes backslashes in docstrings.
http://hg.python.org/cpython/rev/381c9d592cc8

--
nosy: +python-dev

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

My last comment was wrong. There is a bug regarding the first argument to new 
methods; It should just remain a PyTypeObject*.

--

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

1) That's not a bug, that's the API.  If you used the dynamic API to create a 
type it wouldn't take the .  So I can't guess in advance what type it is, nor 
can I assume I always add the .

2) Will fix.

--

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



[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

If you use a self converter you can name your first parameter anything you like.

--

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



[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2014-01-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Attached patch shows the new test case I'm using to ensure that all callable 
builtins have signatures, and once we get it that way, it stays that way.

Preliminary goal is signatures for all the non-type objects, and once I get to 
that point, I'll propose it for review.

--
keywords: +patch
Added file: http://bugs.python.org/file33696/issue20184_builtin_conversion.diff

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



[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 76a3cc6f3aca by Serhiy Storchaka in branch 'default':
Fixed converting errors in the binascii module (issue20151).
http://hg.python.org/cpython/rev/76a3cc6f3aca

--

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



[issue20133] Derby: Convert the audioop module to use Argument Clinic

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d4099b8a7d0f by Serhiy Storchaka in branch 'default':
Issue #20133: The audioop module now uses Argument Clinic.
http://hg.python.org/cpython/rev/d4099b8a7d0f

--
nosy: +python-dev

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



[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

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


--
dependencies:  -Argument Clinic doesn't handle module level functions with 
module parameter well
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue20133] Derby: Convert the audioop module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

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


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

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



[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

So, are you still claiming there's a bug here?  Or can we close this?

--

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a3e02251bd6 by Serhiy Storchaka in branch 'default':
Issue #20193: The _bz2 module now uses Argument Clinic.
http://hg.python.org/cpython/rev/0a3e02251bd6

--
nosy: +python-dev

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Nadeem. In committed patch fixed the docstring for
BZ2Compressor.__init__, and renamed module name bz2 in clinic declaration is 
renamed to _bz2.

Here is updated patch for the _lzma module which addresses Nadeem's comment and 
renames the lzma module name to _lzma.

Unfortunately this patch is incompatible with current Argument Clinic because 
it uses unspecified default value. Default value of the check parameter in 
LZMACompressor.__init__ depends on the value of other parameter.

For FORMAT_XZ, the default is CHECK_CRC64.  FORMAT_ALONE and FORMAT_RAW do 
not suport integrity checks; for these formats, check must be omitted, or be 
CHECK_NONE.

--
Added file: http://bugs.python.org/file33697/lzma_clinic.patch

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

The logic of the patch is hard to follow.  However, it's still examining the 
size of args, and now it's examining the size of kwargs, and behaving 
differently based on these sizes is exactly what I don't want.

I've attached an example patch of how I would change itertools.repeat if I were 
doing it today, without the benefit of Argument Clinic.  If that approach seems 
reasonable, maybe we can redo it with Argument Clinic and get a signature too.

--
Added file: 
http://bugs.python.org/file33698/larry.sample.itertools.repeat.patch.1.txt

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



[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

You should only put one line of equals signs?  I'll try to remember that in the 
future.  LGTM.  Shall I commit it?

--

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



[issue20346] Argument Clinic: missing entry in table mapping legacy convertors to real AC converters

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

If two issues are created on the tracker for the same issue, surely it's the 
*older* issue that is preserved, and the new one marked as duplicate and closed?

--

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



[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Well, if originally reported behavior is by design, and there is other open 
issue for the module parameter, we can close this.

--

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



[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ba9642fc800 by Serhiy Storchaka in branch 'default':
Issue #20193: The _lzma module now uses Argument Clinic.
http://hg.python.org/cpython/rev/7ba9642fc800

--

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



[issue20346] Argument Clinic: missing entry in table mapping legacy convertors to real AC converters

2014-01-25 Thread Georg Brandl

Georg Brandl added the comment:

Only if the older issue actually has more relevant content, which is not always 
the case.

--
nosy: +georg.brandl

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch for _lzma was applied without converting LZMACompressor.__init__.

Here is a patch for zlib, which doesn't use neither optional groups, nor 
unspecified defaults.  Three builtins, decompress(), decompressobj() and 
Decompress.flush() are left not converted.

--
stage:  - patch review
Added file: http://bugs.python.org/file33699/zlib_clinic_2.patch

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



[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2014-01-25 Thread Julian Taylor

New submission from Julian Taylor:

the pvariance and variance functions take the argument mu and xbar to pass the 
population and sample mean to avoid some recomputation.

I assume the keyword arguments are different because the two means accepted are 
different, but the docstring does not indicate this directly.
It just says mu or xbar is the mean of the data. The module documentation is a 
little clearer but only in the grey box right at the end.

I would propose to change the docstring and module documentation to explicitly 
state that mu is the population mean and xbar is the population mean.
E.g.

- The optional argument mu, if given, should be the mean of
the data.
+ The optional argument mu, if given, should be the population mean of
the data.

etc.

--
messages: 209192
nosy: jtaylor
priority: normal
severity: normal
status: open
title: clarify meaning of xbar and mu in pvariance/variance of statistics module
versions: Python 3.4

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



[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2014-01-25 Thread Julian Taylor

Julian Taylor added the comment:

xbar is the *sample* mean of course

maybe with proper docstrings the two functions could also use the same keyword 
argument?

--

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, previous patch didn't contain generated file.

--
Added file: http://bugs.python.org/file33700/zlib_clinic_2.patch

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file33699/zlib_clinic_2.patch

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-25 Thread Mark Lawrence

Mark Lawrence added the comment:

msg209063 from Larry states My concern is that itertools.repeat doesn't parse 
its arguments like other Python functions.  From my viewpoint the only long 
term option is to bring repeat (and other functions that you may have found 
exhibiting this behaviour during the AC process) into line with other Python 
functions.  If that means a deprecation period and not being able to use AC in 
the short term so be it, or have I again misunderstood the technical aspects 
that you've already discussed, in which case you can all give me a good 
kicking? :)

--
nosy: +BreamoreBoy

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

I think you've understood it.

The problem is, in order to deprecate the behavior, we first must provide the 
new behavior.  (That's official policy, in PEP 5.)  It's untenable to say 
you'll have to stop using 'times=-1' in the future, but you can't use 
'times=None' yet.  And right now I'm pretty sure we shouldn't add times=None 
for 3.4.  Therefore, we can't even deprecate the old behavior yet.

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 900a1ff323bb by Victor Stinner in branch '3.3':
Issue #20311: Revert 033137c12d88, select.epoll.poll() rounds again the timeout
http://hg.python.org/cpython/rev/900a1ff323bb

New changeset caab3e191485 by Victor Stinner in branch 'default':
(Merge 3.3) Issue #20311: Revert 033137c12d88 (02f9db3e684e),
http://hg.python.org/cpython/rev/caab3e191485

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 90354a4c9dde by Victor Stinner in branch 'default':
Issue #20311: Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() and
http://hg.python.org/cpython/rev/90354a4c9dde

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3b8a2281d323 by Victor Stinner in branch 'default':
Issue #20311: selectors: Add a resolution attribute to BaseSelector.
http://hg.python.org/cpython/rev/3b8a2281d323

New changeset 4bc550c66228 by Victor Stinner in branch 'default':
Issue #20311: asyncio: Add a granularity attribute to BaseEventLoop: maximum
http://hg.python.org/cpython/rev/4bc550c66228

--

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



[issue20320] select.select(timeout) and select.kqueue.control(timeout) must round the timeout to the upper bound

2014-01-25 Thread STINNER Victor

STINNER Victor added the comment:

I reverted my changes on poll and epoll: the kernel may round the timeout 
differently because it uses a different clock, so Python cannot guarantee that 
it will wait at least timeout seconds.

My initial concern was a performance issue in asyncio, I fixed the issue 
differently: see issue #20311.

--
resolution:  - invalid
status: open - closed

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread STINNER Victor

STINNER Victor added the comment:

I revert all changes in select an selectors, the timeout is rounded again 
towards zero, as it was before.

I applied my asyncio_granularity.patch:
- selectors.BaseSelector has a new abstract resolution property
- asyncio.BaseEventLoop has a new granularity attribute which is used in 
_run_once() to round timings

I don't like hurry to push changes without review, but I wanted to revert my 
changes on select and selectors and fix the issue in asyncio issue before 
Python 3.4 beta 3.

I'm now waiting for buildbots. Don't hesitate to review my changes on selectors 
(new resolution attribute) and asyncio (new granularity attribute).

For selectors, I chose an abstract attribute to ensure that the resolution is 
defined in subclasses of BaseSelector and because it does not make sense to 
modify the resolution.

For asyncio, it's a classic attribute because a subclass may want to adjust the 
granularity if it overrides the time() method, or for other reasons.

--

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



[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

You didn't give me a test case, and I can't reproduce this.  Either it was 
accidentally fixed already, or there's something else going on in your test 
case.

I'm closing this for now as unreproducable.  If you see the problem again, 
please reopen this issue.

--
resolution:  - works for me
status: open - closed

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



[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2014-01-25 Thread Nick Coghlan

Nick Coghlan added the comment:

More comprehensive patch uploaded - all the non-type callables implemented in 
bltinmodule.c have been converted or classified with a reason for not being 
converted yet (see the new test in test_inspect.py for details, as well as the 
AC 3.4 and AC 3.5 comments in the module itself).

I also cleaned up the docstrings for the builtins I actually changed in the 
patch. There were a few that had never been properly updated for the Py3k 
transition.

There are still a couple of test failures with this version - the doctest tests 
get confused by the fact ord and chr now have a doctest in their docstrings, 
and test_gdb is definitely not in a happy place (that has always been 
temperamental, though).

I also just realised the Unicode character in the new ord and chr docstrings 
could pose a compatibility problem at the C compiler source encoding level, so 
we may have to reconsider that (even though I was rather happy to sneak that 
obscure Monty Python reference in there).

--
Added file: 
http://bugs.python.org/file33701/issue20184_builtin_conversion_v2.diff

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



[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1eec62cf3675 by Ezio Melotti in branch 'default':
#20348: fix headers markup in Argument Clinic howto.  Patch by Moritz Neeb.
http://hg.python.org/cpython/rev/1eec62cf3675

--
nosy: +python-dev

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



[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: larry - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement

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



[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Larry Hastings

New submission from Larry Hastings:

Rollup patch with a bunch of small fixes in it.  Can I get a quick turnaround 
review on this?  I'd like it to go in before today's beta is cut.  Definitely 
the core change has to go in, but that's uncontroversial.

  Core:
  * _PyType_GetDocFromInternalDoc() and
_PyType_GetTextSignatureFromInternalDoc() are now marked
 Py_LIMITED_API.

  Tools:
  * The default filename for the file preset is now:
 clinic/{filename}.h.

  * The class directive syntax has been extended with two new required
arguments: typedef and type_object.  typedef should be the
equivalent C type for this Python class, presented as a
pointer-to-type.  type_object should be an expression that
evaluates to a PyTypeObject * for this Python type.  Example:
class dict PyDictObject * PyDict_Type
This was necessary for the next item.

  * If __new__ or __init__ functions did not use kwargs (or args), the
PyArg_NoKeywords (or PyArg_NoPositional) calls generated are only
run if the type object is an exact match.  (Otherwise subclasses
will not be allowed to start accepting those kinds of arguments.)

  * Argument Clinic now fails if you have required parameters after
optional parameters.

  * Converters now have a new template they can inject code into:
it's called modifiers, and code put there is run in the parsing
function after argument parsing but before the call to the impl.
modifiers is intended for converters that may want dynamic
default values.  An example string you might add:
if ({name} == NULL)\nname = time(NULL);

--
assignee: larry
components: Demos and Tools
files: larry.clinic.rollup.jan.25.diff.1.txt
messages: 209205
nosy: larry, ncoghlan, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Argument Clinic rollup patch, 2014/01/25
type: enhancement
versions: Python 3.4
Added file: 
http://bugs.python.org/file33702/larry.clinic.rollup.jan.25.diff.1.txt

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

The bug you cited is fixed in today's rollup patch, #20390.  (I don't know how 
to denote the dependency between the two issues, maybe someone else can do that 
for me?)

--

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



[issue20231] Argument Clinic accepts no-default args after default args

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

The bug you cited is fixed in today's rollup patch, #20390.  (I don't know how 
to denote the dependency between the two issues, maybe someone else can do that 
for me?)

--

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-25 Thread Mark Lawrence

Mark Lawrence added the comment:

From a user perspective the docs say this itertools.repeat(object[, times]) - 
Make an iterator that returns object over and over again. Runs indefinitely 
unless the times argument is specified.  So to me the use of Times=None in 
the equivalent to section is simply a red herring, as the user often won't 
bother reading this and certainly won't see it from interactive help.  As for 
negative times values I'd say leave it as is, although it someone was to 
suggest deprecating this behaviour and raising a ValueError instead I'd have 
no objections.

--

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



[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Nick Coghlan

Nick Coghlan added the comment:

LGTM, but I'm not familiar with Clinic's own code...

--

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



[issue19023] ctypes docs: Unimplemented and undocumented features

2014-01-25 Thread Adam Knight

Adam Knight added the comment:

Can someone add this in?  What needs to be done to make it happen? Kind of need 
this for a project I'm working on...

--
nosy: +ahknight

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



[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

You're right, this issue does indeed seem to have been resolved since I created 
this issue. I just checked this on Objects/bytesobject.c with the latest 
version and get the desired output. So you've done right to close this issue.


I'd like to note that I most certainly did supply a way to reproduce this 
issue! I described it precisely and concisely. Consider, also, that I was only 
asking if this is a bug since I wasn't sure. If someone had replied this 
sounds like a bug, please supply code for which reproduces this then I would 
have supplied such code.

Just to be sure, I just checked this again with clinic.py from revision 
88635:fbc31e0b0c77 (Tue Jan 21, the day I reported this issue) and I get 
precisely the behavior I described. So the issue did exist at the time when I 
reported it and the test case I supplied is sound.

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Charles-François Natali

Charles-François Natali added the comment:

 If the patch is accepted, my changes on Python 3.3 should also be
reverted.

I'm sorry, but I'm not convinced.
The selector's granularity is an implementation detail, and I don't think
it should be exposed.
Furthermore, it's not a mere function of the C type used to represent the
timeout to the underlying syscall (long, timeval): it also depends on the
operating system, the hardware, etc.

Once again, what's wrong with your initial approach of ceiling the timeout?
It does seem reasonable to round away from zero, to ensure - not taking OS
bugs/limitations - that select() will wait at least the passed timeout.

--

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



[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-25 Thread Larry Hastings

Larry Hastings added the comment:

You didn't supply a test case, nor is there any code checked in that reproduced 
the issue.  I had to make a test case by hand.

--

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



[issue20391] windows python launcher should support explicit 64-bit version

2014-01-25 Thread Thomas Heller

New submission from Thomas Heller:

The windows python launcher supports the '-3.3' resp. '-3.3-32' command line 
switches to ask for 'the best 3.3' version resp. 'the 32-bit 3.3' version, but 
does not support a '-3.3-64' switch to explicitely request the 64-bit version 
of Python.

I suggest that this support should be added.

--
messages: 209215
nosy: theller
priority: normal
severity: normal
status: open
title: windows python launcher should support explicit 64-bit version
type: enhancement

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



[issue20331] Fix various fd leaks

2014-01-25 Thread Charles-François Natali

Charles-François Natali added the comment:

LGTM.

--
nosy: +neologix

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



[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Don't forget to use hg mv to rename existing side files.

--

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



[issue20331] Fix various fd leaks

2014-01-25 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue20392] Inconsistency with uppercase file extensions in MimeTypes.guess_type

2014-01-25 Thread Rodrigo Parra

New submission from Rodrigo Parra:

The functions looks up for the file extension in three maps: types_map, 
suffix_map and encodings_map.

Lookup in types_map is case insensitive (by calling lower() first).
Lookup in both suffix_map and encodings_map is case sensitive.

These can lead to some seemingly counterintuitive results, like:

a)
guess_type(foo.tar) == (application/x-tar, None)
guess_type(foo.TAR) == (application/x-tar, None)

b)
guess_type(foo.tgz) == (application/x-tar, gzip)
guess_type(foo.TGZ) == (None, None)

c)
guess_type(foo.tar.gz) == (application/x-tar, gzip)
guess_type(foo.TAR.GZ) == (None, None)

Lookup should be case insensitive at least for the suffix_map, in which case 
(b) would be solved. The submitted patch implements this change.

As for the encodings_map, I am not so sure, in particular because of the tar.Z 
extension. I found that the compress command expects the uppercase 'Z'. If 
someone is relying in the results of guess_type to call compress, errors could 
occur.

--
components: Library (Lib)
files: case_guess_type.patch
keywords: patch
messages: 209218
nosy: Rodrigo.Parra, tim.golden
priority: normal
severity: normal
status: open
title: Inconsistency with uppercase file extensions in MimeTypes.guess_type
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33703/case_guess_type.patch

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

I'm still seeing the first argument to a __new__ function as groupbyobject * 
instead of PyTypeObject *. This causes the following error (for example):

./Modules/itertoolsmodule.c:112:34: error: no member named 'tp_alloc' in 
'groupbyobject'
gbo = (groupbyobject *)type-tp_alloc(type, 0);

--

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

To clarify my previous comment, I was referring to the first argument passed to 
the generated 'impl' function.

Context: I'm attempting to convert 'itertools.groupby' in 
Modules/itertoolsmodule.c.

--

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

Also, I'm seeing this in the generated code for __new__ methods:

if (({self_name} == {self_type_object}) 

--

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



[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-25 Thread Tal Einat

Tal Einat added the comment:

To make reproducing these bugs easier, I'm attaching my partially converted 
version of Modules/itertoolsmodules.c, which has the buggy generated code 
inside.

Partially converted means that I've only converted some of the functions 
requiring conversion. This file should be in a working state.

--
Added file: http://bugs.python.org/file33704/itertoolsmodule.c

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



[issue20331] Fix various fd leaks

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6548f894b590 by Serhiy Storchaka in branch '2.7':
Issue #20331: Fixed possible FD leaks in various modules:
http://hg.python.org/cpython/rev/6548f894b590

New changeset 2766320bdb10 by Serhiy Storchaka in branch '3.3':
Issue #20331: Fixed possible FD leaks in various modules:
http://hg.python.org/cpython/rev/2766320bdb10

New changeset b30e57756686 by Serhiy Storchaka in branch 'default':
Issue #20331: Fixed possible FD leaks in various modules:
http://hg.python.org/cpython/rev/b30e57756686

--
nosy: +python-dev

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



[issue20331] Fix various fd leaks

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Charles-François.

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

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



[issue20374] Failure to compile with readline-6.3-rc1

2014-01-25 Thread Ned Deily

Ned Deily added the comment:

FYI, removing the cast causes the following new warnings when compiling 3.3 
with gcc-4.2 on OS X 10.5 and 10.6 (haven't checked elsewhere):

Modules/readline.c: In function 'setup_readline':
Modules/readline.c:939: warning: assignment from incompatible pointer type
Modules/readline.c:941: warning: assignment from incompatible pointer type

--

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



[issue20374] Failure to compile with readline-6.3-rc1

2014-01-25 Thread Benjamin Peterson

Benjamin Peterson added the comment:

It doesn't complain on Linux. I suppose if we don't want any warnings, we'd 
have to do something like the originally proposed patch.

--

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



[issue20374] Failure to compile with readline-6.3-rc1

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm surprised that warnings are emitted at lines 939 and 941, but not 944.

I think that instead type casting, the more robust way is to change hook 
functions signatures for on_startup_hook and on_pre_input_hook.

static int
#ifdef _RL_FUNCTION_TYPEDEF /* or may be test libedit macro? */
on_startup_hook(void)
#else
on_startup_hook()
#endif

--

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



[issue15955] gzip, bz2, lzma: add option to limit output size

2014-01-25 Thread Nikolaus Rath

Nikolaus Rath added the comment:

Let me be more precise: 

My suggestion is not to remove `unconsumed_tail` entirely, but I think its 
value needs to be defined only when the end of the compressed stream has been 
reached.

In other words, you could still do:

while not decomp.eof
  # ...
if decomp.unconsumed_tail:
raise RuntimeError('unexpected data after end of compressed stream')

but as long as decomp.eof is True, decomp.unconsumed_tail could (as far as I 
can tell) be None, no matter if there is uncompressed data in the internal 
buffer or not.

--

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



[issue5755] -Wstrict-prototypes is valid for Ada/C/ObjC but not for C++

2014-01-25 Thread Jon Parise

Changes by Jon Parise j...@indelible.org:


--
nosy:  -jon

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



[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is patch for 3.3 which adds alternative parameter name. Now both keyword 
names are allowed, but deprecation warning is emitted if old keyword name is 
used.

 import re
 p = re.compile('')
 p.match()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: Required argument 'string' (pos 1) not found
 p.match('')
_sre.SRE_Match object at 0xb705c598
 p.match(string='')
_sre.SRE_Match object at 0xb705c720
 p.match(pattern='')
__main__:1: DeprecationWarning: The 'pattern' keyword parameter name is 
deprecated.  Use 'string' instead.
_sre.SRE_Match object at 0xb705c758
 p.match('', string='')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: Argument given by name ('string') and position (1)
 p.match('', pattern='')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: Argument given by name ('pattern') and position (1)

--
Added file: http://bugs.python.org/file33705/sre_deprecate_pattern_keyword.patch

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



[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

_PyType_GetDocFromInternalDoc and _PyType_GetTextSignatureFromInternalDoc 
declarations are too long. could you please wrap them around?

First parameter of class methods (e.g. dict.fromkeys) now has a type of object 
(PyDictObject *) instead of PyTypeObject * (or PyDict_Type *).

There is redundant cast in dict___contains__:

register PyDictObject *mp = (PyDictObject *)self;

First parameter of static methods (e.g. str.maketrans) now has a type of object 
(PyUnicodeObject *) instead of void *.

There is redundant cast in unicodedata_UCD_decimal_impl:

PyUnicodeObject *v = (PyUnicodeObject *)unichr;

Perhaps here should be os.path.dirname() instead of os.path.basename():

dirname = os.path.basename(destination.filename)

The 'fail(Can't write to destination ' line is too long. And I think it will 
look better if use string formatting.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Ethan Furman

Ethan Furman added the comment:

Here's a patch for the test.

--
Added file: http://bugs.python.org/file33706/issue20386.stoneleaf.test.patch.01

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

 Please find a better name for the type enum and document the new enums.

Why should new enums be documented and how are they useful?
IMO socket module adopted enum module only to provide a better representation 
of AF_* and SOCK_* constants on repr(), which is fine.
The fact that in order to do that enum module forces you to create a container 
is incidental and should not result in polluting socket module API (which is 
already pretty crowded).
In summary I'd be for renaming those enums to _SocketType and _AddressFamily.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Georg Brandl

Georg Brandl added the comment:

 Why should new enums be documented and how are they useful?

Because they are a new public class(-like object) in the module. When renaming 
them to a non-public name, as you suggest, that could be left out.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

But as a user when are you gonna need to use AddressFamily container?
Before enum we didn't have something like:

AddressFamily = (AF_INET, AF_INET6, ...)

Basically because we didn't need it. Sorry if I'm missing something here.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Georg Brandl

Georg Brandl added the comment:

I'm not saying the enums are necessary (argue about that with Eli), but that if 
they *are* in the module as a public attribute, they *have* to be documented, 
period.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Ethan Furman

Ethan Furman added the comment:

Complete patch with new test, fixed tests, and regression fix.

Doc patch still needed.

--
stage: test needed - patch review
Added file: http://bugs.python.org/file33707/issue20386.stoneleaf.patch.02

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Ethan Furman

Ethan Furman added the comment:

The containers are there to help with discoverability.  If you want to know 
what all the (common) AF values are you can either do

[name for name in dir(socket) if name.isupper() and name.startswith('AF_')]

or

list(socket.AddressFamily)

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread STINNER Victor

STINNER Victor added the comment:

Hi,

2014-01-25 Charles-François Natali rep...@bugs.python.org:
 I'm sorry, but I'm not convinced.
 The selector's granularity is an implementation detail, and I don't think
 it should be exposed.

I disagre, it's not a detail because it causes bugs, knowing the
resolution matters.

 Furthermore, it's not a mere function of the C type used to represent the
 timeout to the underlying syscall (long, timeval): it also depends on the
 operating system, the hardware, etc.

I exposed the resolution of the underlying C structure, I know that it
doesn't guarantee anything. But we did the same thing for clocks with
time.get_clock_info(name).resolution.

At least, if the C structure has a resolution of 1 ms, don't expect to
have a resolution better than 1 ms in practice. It's better than not
knowing it.

The OS limitations can be documented.

 Once again, what's wrong with your initial approach of ceiling the timeout?

It looks like changing the rounding method doesn't solve anything.
selector.select(timeout) may still take less than timeout, so it
doesn't give any guarantee.

IMO adding a granularity to asyncio is a better approach. asyncio can
for example adjusts its granularity at runtime if it see that the
announced selector resolution is wrong. And the granularity also uses
the clock resolution.

Victor

--

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



[issue20393] Docs: mark deprecated items in the TOC

2014-01-25 Thread Zearin

New submission from Zearin:

When exploring the docs for the standard library, it’s frustrating to have an 
idea and look for the answer only to find out that an entire module (or 
package) has been deprecated _after_ I click on it. 

Can we have links to deprecated items on the Standard Library’s TOC page 
flagged?  

I see you’re using multiple CSS classes on some links.  I propose: 

- add a CSS class to flag links to deprecated items
- use something like the following CSS




/*
 * Example 1: color 
 */
.toctree-wrapper a.deprecated {
color: #933;
}

/* 
 * Example 2: badge 
 */
.toctree-wrapper a.deprecated:after {
display: inline-block;
content: deprecated;
margin: 0 1em;
padding: 0 1ex !important;
border-radius:  1ex !important;

font-size: x-small;

background-color: #f66;
color: #933;
}



Of course, since the CSS class '.deprecated' already exists, there's 2 options: 

1. the examples above are rewritten to use a different classname, or 
2. add the following CSS:



/* Reset .deprecated in a toctree context */
.toctree-wrapper a.deprecated {
background: none;
border: none;
padding: 0;
}

/*  insert above example CSS here  */



--
assignee: docs@python
components: Documentation
messages: 209239
nosy: docs@python, zearin
priority: normal
severity: normal
status: open
title: Docs: mark deprecated items in the TOC
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue20393] Docs: mark deprecated items in the TOC

2014-01-25 Thread Serhiy Storchaka

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


--
nosy: +georg.brandl

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Eli Bendersky

Eli Bendersky added the comment:

Yep, the overriding of the type name was inadvertent. Nothing sacred about it, 
so Ethan's SocketKind is just as good.

--

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



[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2014-01-25 Thread Glenn Langford

Glenn Langford added the comment:

Updated patch with a test case, and added a minor note to the docstring to 
clarify behaviour.

The use of sleep() in the test is not great, but it is the most obvious way to 
test and it is consistent with the approach used in other concurrent test cases.

--
Added file: http://bugs.python.org/file33708/issue20369.patch

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch for zlib reverts reverted decompress(), decompressobj() and 
Decompress.flush(). It get rids from DEF_WBITS and use MAX_WBITS instead, 
exposes DEF_BUF_SIZE (former DEFAULTALLOC) to Python level.

--
Added file: http://bugs.python.org/file33709/zlib_clinic_3.patch

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I suppose that zdict=b'' have same effect as not specifying zdict. Am I right?

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-25 Thread Ethan Furman

Ethan Furman added the comment:

How do we feel about SockType instead?  (Just a short round of bike-shedding, 
promise! ;)

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Charles-François Natali

Charles-François Natali added the comment:

  Once again, what's wrong with your initial approach of ceiling the
timeout?

 It looks like changing the rounding method doesn't solve anything.
 selector.select(timeout) may still take less than timeout, so it
 doesn't give any guarantee.

But what problem does it cause if, once in a while, the call takes less
than the passed timeout?
If that's the case, you'll simply perform another loop, an wake up 1ms
later, that's all.

There's a lot of call written this way, and this has never been a problem:
so far, you still didn't give an example of problematic behavior.

--

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



[issue19944] Make importlib.find_spec load packages as needed

2014-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 665f1ba77b57 by Eric Snow in branch 'default':
Issue 19944: Fix importlib.find_spec() so it imports parents as needed.
http://hg.python.org/cpython/rev/665f1ba77b57

--
nosy: +python-dev

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



[issue19944] Make importlib.find_spec load packages as needed

2014-01-25 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - pending
type:  - enhancement

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow

Eric Snow added the comment:

Looks like 3b8a2281d323aa9abf497192b01cf906b98ed3d8 broke the buildbots.

e.g. 
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1533

--
nosy: +eric.snow

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow

Eric Snow added the comment:

FYI: on my local box I saw only the 2 failed tests in test_telnetlib.

--

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



[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow

Eric Snow added the comment:

A better example:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1538

--

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



  1   2   >