[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-21 Thread Larry Hastings

Larry Hastings added the comment:

Argh.  I lost 1.5 day's worth of work on revision 6 of this patch last
night, due to me being tired and over-aggressively cleaning my working
directories.  I will have to reconstruct it from memory, hopefully
Tuesday.  (I basically know what I did, and going through the process
again should be much quicker.)

I have more C fixes by the way:

  * PyTypeObject needs to also expose __text_signature__.  Otherwise
builtin classes can't have signatures.

  * There are a bunch of default docstrings for tp_ etc. slots
(__add__, __call__) that live in typeobject.c.  I'll hand-convert
them to have signatures and reasonable docstrings.

--

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



[issue16655] IDLE list.append calltips test failures

2014-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 779e5511d803 by Terry Jan Reedy in branch '2.7':
Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins.
http://hg.python.org/cpython/rev/779e5511d803

New changeset 4a505a901b2e by Terry Jan Reedy in branch '3.3':
Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins.
http://hg.python.org/cpython/rev/4a505a901b2e

New changeset c4a2d0538441 by Terry Jan Reedy in branch 'default':
Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins.
http://hg.python.org/cpython/rev/c4a2d0538441

--
nosy: +python-dev

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



[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-21 Thread Stefan Behnel

Stefan Behnel added the comment:

 Unless there are objections, I'll try to work on a patch that either 
 documents that PIs are lost, or optionally adds them to the tree when parsing 
 (depending on how difficult that turns out to be).

Please do. It should not be difficult at all to make the parser create PI 
objects (or comments).

Note, however, that this needs to be done in both the Python implementation and 
the parser of celementtree.

--

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



[issue16655] IDLE list.append calltips test failures

2014-01-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

When I moved tests from CallTips.py to test_calltips.py, I reduced but did not 
eliminate the use of builtins. I decided instead to explain in the file why 
there is no substitute for the real thing, and how to fix a simple mismatch 
like that reported here.

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

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



[issue20324] gcc-4.3 support on python-3.3 (libmpdec)

2014-01-21 Thread Dirkjan Ochtman

New submission from Dirkjan Ochtman:

See https://bugs.gentoo.org/show_bug.cgi?id=498640:

What compiler versions are supported for 3.3? We noticed an issue when 
compiling 3.3.3 with gcc 4.3:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: 
build/temp.linux-x86_64-3.3/var/tmp/portage/dev-lang/python-3.3.3/work/Python-3.3.3/Modules/_decimal/libmpdec/mpdecimal.o:
 warning: relocation against `mprime_rdx' in readonly section `.text'.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: 
build/temp.linux-x86_64-3.3/var/tmp/portage/dev-lang/python-3.3.3/work/Python-3.3.3/Modules/_decimal/libmpdec/basearith.o:
 relocation R_X86_64_PC32 against symbol `mprime_rdx' can not be used when 
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../x86_64-pc-linux-gnu/bin/ld: 
final link failed: Bad value

Ruud Koolen redliz...@gentoo.org came up with a patch:

diff -r f7cebf727bc6 Modules/_decimal/libmpdec/constants.c
--- a/Modules/_decimal/libmpdec/constants.c Mon Jan 20 21:59:33 2014 +0200
+++ b/Modules/_decimal/libmpdec/constants.c Mon Jan 20 22:12:50 2014 +0100
@@ -71,6 +71,9 @@
   };
 
   /* magic number for constant division by MPD_RADIX */
+#if defined(__GNUC__)  (__GNUC__  4 || (__GNUC__ == 4  __GNUC_MINOR__  
3))
+ __attribute__((visibility(hidden)))
+#endif
   const mpd_uint_t mprime_rdx = 15581492618384294730ULL;
 
 #elif defined(CONFIG_32)

--
components: Library (Lib)
keywords: 3.3regression
messages: 208630
nosy: djc, skrah
priority: normal
severity: normal
status: open
title: gcc-4.3 support on python-3.3 (libmpdec)
versions: Python 3.3

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



[issue20324] gcc-4.3 support on python-3.3 (libmpdec)

2014-01-21 Thread Georg Brandl

Georg Brandl added the comment:

Should be figured out for 3.3.4

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

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-21 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch for longobject. There are two sites which I couldn't convert. 
The first is the constructor which is complicated. The other one is __round__ 
which clinic explicitly does not support.

--
Added file: http://bugs.python.org/file33587/clinic_longobject.patch

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

2014-01-21 Thread Tal Einat

New submission from Tal Einat:

In Objects/bytes.c, the strip methods need a self converter so that
they get a PyBytesObject* instead of PyObject*. However, having set
this in bytes.strip and cloning that clinic definition for
bytes.lstrip and bytes.rstrip, it appears that the self converter
wasn't set on lstrip and rstrip. Removing the cloning and copying the
argument definitions resolved the issue.

Is this a bug?

--
components: Build, Demos and Tools
messages: 208633
nosy: larry, taleinat
priority: normal
severity: normal
status: open
title: Argument Clinic: self converters are not preserved when clonig functions
type: behavior
versions: Python 3.4

___
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



[issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures

2014-01-21 Thread Larry Hastings

New submission from Larry Hastings:

Sorry this is so long--but I wanted to make my point.  Here's the tl;dr summary.

The problem: The syntax used for Argument-Clinic-generated text
signatures for builtins means CPython mistakenly identifies
hand-written, unparsable pseudo-signatures as legitimate
signatures.  This causes real, non-hypothetical problems.

I think we should change the syntax to something people would
never write by accident.  Here are some suggestions:

*(
*clinic*(
\01 clinic(

--

A quick recap on how signature information for builtins works.

The builtin's docstring contains the signature, encoded as text using
a special syntax on the first line.  CPython callables always have
getters for their __doc__ member; the doc getter function examines
the first line, and if it detects a signature it skips past it and
returns the rest.  CPython's new getter on callables __text_signature__
also look at the internal docstring.  If it detects a signature it
returns it, otherwise it returns None.

inspect.signature then retrieves __text_signature__, and if ast.parse()
parses it, it populates the appropriate Signature and returns that.
And then pydoc uses the Signature object to print the first line of
help().


In #19674 there was some discussion on what this syntax should be.
Guido suggested they look like this:

   functionname(args, etc)\n

He felt it was a good choice, and pointed out that Sphinx autodoc
uses this syntax.  (Not because using this syntax would help
Sphinx--it won't.  Just as a here's how someone else solved
the problem data point.)


__doc__ and __text_signature_ aren't very smart about detecting
signatures.  Here's their test in pseudo-code:
if the first N bytes match the name of the function,
and the N+1th byte is a left parenthesis,
then it's assumed to be a valid signature.

--

First, consider: this signature syntax is the convention docstrings
already use.  Nearly every builtin callable in Python has a hand-written
docstring that starts with functionname(.

Great!, you might think, we get signatures for free, even on functions
that haven't been converted to Argument Clinic!

The problem is, many of these pseudo-signatures aren't proper Python.
Consider the first line of the docstring for os.lstat():

lstat(path, *, dir_fd=None) - stat result\n

This line passes the is it a text signature test?, so __doc__
skips past it and __text_signature__ returns it.  But it isn't
valid actually valid.  ast.parse() rejects it, so inspect.signature
returns nothing.  pydoc doesn't get a valid signature, so it prints
lstat(...), and the user is deprived of the helpful line
handwritten by lstat's author.

That's bad enough.  Now consider the first *two* lines of the
docstring for builtin open():

open(file, mode='r', buffering=-1, encoding=None,\n
 errors=None, newline=None, closefd=True, opener=None) - file object\n

__doc__ clips the first line but retains the second.  pydoc prints
open(...), followed by the second line!  Now we have the problem
reported in #20075: help(open) eats first line.


Both of these problems go away if I add one more check to the
signature-detecting code: does the line end with ')'?  But that's
only a band-aid on the problem.  Consider socket.accept's
docstring:

_accept() - (integer, address info)\n

Okay, so __doc__ and __text_signature__ could count parentheses
and require them to balance.  But then they'd have to handle strings
that contain parentheses, which means they'd also have to understand
string quoting.

And there would *still* be handwritten docstrings that would pass
that test but wouldn't parse properly.  Consider bisect.insort_right:

insort_right(a, x[, lo[, hi]])\n

We could only be *certain* if we gave up on having two parsers.
Write the signature-recognizer code only once, in C, then call that
in __doc__ and __text_signature__ and inspect.signature().  But that
seems unreasonable.

Okay, so we could attack the problem from the other end.  Clean
up all the docstrings in CPython, either by converting to Argument
Clinic or just fixing them by hand.  But that means that
*third-party modules* will still have the mysterious problem.

Therefore I strongly suggest we switch to a syntax that nobody will
ever use by accident.

Have I convinced you?

--
assignee: larry
messages: 208634
nosy: barry, brett.cannon, gennad, gvanrossum, larry, ncoghlan, skrah, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Argument Clinic should use a non-error-prone syntax to mark text 
signatures
type: behavior
versions: Python 3.4

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



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

2014-01-21 Thread Ram Rachum

Ram Rachum added the comment:

Christopher and Serhiy, I would appreciate if you could kindly explain why your 
arguments, while applying to my suggestions, do not apply to the following 
functions:

 - `Path.stat`
 - `Path.owner`
 - `Path.group`
 - `Path.open`
 - `Path.chmod`
 - `Path.lchmod`
 - `Path.unlink`
 - `Path.rmdir`
 - `Path.lstat`
 - `Path.rename`
 - `Path.replace`
 - `Path.symlink_to`

I am quite sick of all those lofty principles being quoted when I want to add 
something to Python, yet I see Python features that break them all the time.

--

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



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

2014-01-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

FWIW, I agree that shortcuts to easily create or read entire files are useful. 
Other path classes (such as Twisted's) often have them.

--
versions:  -Python 3.4

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



[issue20197] Support WebP image format detection in imghdr module

2014-01-21 Thread Antoine Pitrou

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


--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20197
___
___
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-21 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


--
title: Argument Clinic: self converters are not preserved when clonig functions 
- Argument Clinic: self converters are not preserved when cloning functions

___
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



[issue20303] Argument Clinic: optional groups

2014-01-21 Thread Larry Hastings

Larry Hastings added the comment:

Confirmed, and yes it's low priority.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20303
___
___
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-21 Thread STINNER Victor

STINNER Victor added the comment:

Timings on my laptop:

 import time, select
 t0=time.perf_counter(); select.select([], [], [], 1e-6); 
 dt=time.perf_counter()-t0; dt
([], [], [])
0.00012494399561546743
 t0=time.perf_counter(); select.select([], [], [], 0); 
 dt=time.perf_counter()-t0; dt
([], [], [])
4.965400148648769e-05

A call to select.select() with a timeout of 1 microsecond (10^-6) takes 124 
microesconds.

A non-blocking call to select.select() (timeout of 0 microsecond) takes 50 
microseconds.

 Just so it's clear, those bugs are theoretical: whether you pass 1e-7/1e-10 
 or 0 to select/kqueue is exactly the same (entering/leaving the syscall takes 
 some time)...

Yes, the problem of asyncio (explained in issue #20311) is that 
selector.select(timeout) took *less* than timeout seconds even when no new 
event was found, and so the loop restarted again and again.

According to the timings above, selector.select(1e-7) (which calls currently 
select.select() in non blocking mode, with a timeout of 0 second) takes longer 
than 1e-7 second: at least 500e-7 seconds. So yes, the problem cannot be 
reproduced on my current hardware.

It may be fine to only fix these bugs in Python 3.5.

--
versions: +Python 3.5 -Python 3.3, Python 3.4

___
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



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

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Christopher and Serhiy, I would appreciate if you could kindly explain why 
 your arguments, while applying to my suggestions, do not apply to the 
 following functions:

1. Path.stat() wraps only one function, while Path.read() wraps two functions. 
It's signature should be a sum of open() and read() signatures: 
Path.read(encoding, errors, newline, size) (I have omitted some open's 
parameters). This is a little cumbersome.

2. os.stat() requires `import os`, while open() is builtin.

3. If add Path.read(), what about Path.readlines() and Path.readline()?

4. I believe Path.stat() will be used much more often than Path.read().

5. Path.stat() corresponds to low-level os.stat(), but for low-level os.read() 
the high-level corresponding is FileIO.read(). And this corresponding is much 
more universal and useful.

--

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



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

2014-01-21 Thread Ram Rachum

Ram Rachum added the comment:

Serhiy:

Your arguments 1 and 2 are pretty weak. (So what if an import is required? It's 
still 2 lines. I thought that Not every two line function are worth to be 
added to the stdlib.)

Regarding stat being used much more often than read: I disagree. I've done 
whole-file reads much more often than I've done stat. Different people might 
have different habits, but I definitely think that reading an entire file is a 
common operation with files. And we can all agree that other trivial Path 
method like `lstat` are much less common than both stat and whole-file read, 
yet they've earned their place in the stdlib, while we are still arguing 
whether `Path.read` and `path.write` should have a place too.

Regarding `Path.readline` and `Path.readlines`: I don't have an opinion on 
whether they should be implemented or not, since I rarely use them. But I 
definitely think that they have no bearing on the decision of whether to 
include `Path.read` and `Path.write` or not.

Your argument 5 also looks weak to me. It looks to me like you're looking for 
arguments.

--

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



[issue20327] Argument Clinic: setting internal variable names for parsed arguments

2014-01-21 Thread Tal Einat

New submission from Tal Einat:

It would be useful for conversion of existing function to be able to set the 
name of the C variable for arguments which is different than the Python 
argument name.

For example, not being able to do so makes converting bytes.translate much 
harder. In the existing code, the first argument is called 'table' in the docs 
but 'tableobj' in the code. Furthermore, a different variable named 'table' is 
used rather extensively in the function. If clinic could be told to name the C 
variable 'tableobj', then that would be that. Otherwise renaming two variables 
in the code is unaviodable.

--
components: Build, Demos and Tools
messages: 208641
nosy: taleinat
priority: normal
severity: normal
status: open
title: Argument Clinic: setting internal variable names for parsed arguments
type: enhancement
versions: Python 3.4

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



[issue20328] mailbox:

2014-01-21 Thread Jonathan Dowland

Changes by Jonathan Dowland jon+pyt...@alcopop.org:


--
type:  - enhancement

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



[issue20328] mailbox:

2014-01-21 Thread Jonathan Dowland

New submission from Jonathan Dowland:

It would be great if the 'mailbox' library supported a 'remove' or 'delete' 
operation for the mailbox itself as part of its abstract interface. It does 
support removing messages, and the sub-classes for Maildir, MH etc. support 
removing sub-folders (their interface is common but they don't inherit a common 
interface); but removing the actual parent mailbox itself is not yet supported.

--
components: Library (Lib)
messages: 208642
nosy: jmtd
priority: normal
severity: normal
status: open
title: mailbox:
versions: Python 2.7

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



[issue20324] gcc-4.3 support on python-3.3 (libmpdec)

2014-01-21 Thread Stefan Krah

Stefan Krah added the comment:

Do you mean gcc-4.2? The patch uses __GNUC_MINOR__  3.

On the FreeBSD build slave gcc-4.2 works:

   gcc (GCC) 4.2.1 20070831 patched [FreeBSD]


Are you sure that there aren't any gcc patches for this version? It 
looks like a gcc/binutils issue to me.

--

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2014-01-21 Thread Daniel Szoska

Changes by Daniel Szoska d.szo...@steinreichwald.de:


--
nosy: +Daniel.Szoska

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



[issue20321] ImportError when a module is created after a catched ImportError

2014-01-21 Thread Brett Cannon

Brett Cannon added the comment:

I'm not sure why you think the example code as-is should work. The first entry 
on sys.path is the current directory ('' or the absolute path, depending if you 
are running from the interpreter prompt or specifying a file on the 
command-line). Stripping off sys.path[0] guarantees the example code will not 
work.

And as for why adding in '.' works on PyPy and not Python 3.3, it's because you 
didn't call importlib.invalidate_caches() to clear out the directory 
modification, so Python didn't notice that the file was added because the mtime 
granularity for directories it larger than the time it took to have the import 
for it_does_not_exist fail, write the impfile.py file, and to try importing 
again.

--
assignee:  - brett.cannon
resolution:  - invalid
status: open - closed

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



[issue20197] Support WebP image format detection in imghdr module

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Detecting function matches the WebP specification [1].

[1] 
https://developers.google.com/speed/webp/docs/riff_container#webp-file-header

--
stage:  - commit review

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



[issue10614] ZipFile: add a filename_encoding argument

2014-01-21 Thread Laurent Mazuel

Changes by Laurent Mazuel laurent.maz...@gmail.com:


--
nosy: +Laurent.Mazuel

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



[issue20324] gcc-4.2.4 support on python-3.3 (libmpdec)

2014-01-21 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
title: gcc-4.3 support on python-3.3 (libmpdec) - gcc-4.2.4 support on 
python-3.3 (libmpdec)

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



[issue19643] shutil rmtree fails on readonly files in Windows

2014-01-21 Thread Paul Moore

Paul Moore added the comment:

The most obvious solution would be if the onerror argument allowed for retries. 
At the moment, all it can do is report issues, not recover. Suppose that 
returning True from onerror meant retry the operation. Then you could do

def set_rw(operation, name, exc):
os.chmod(name, stat.S_IWRITE)
return True

shutil.rmtree('path', onerror=set_rw)

--
nosy: +pmoore

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



[issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures

2014-01-21 Thread Jeremy Kloth

Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:


--
nosy: +jkloth

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



[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread Laurent Mazuel

New submission from Laurent Mazuel:

Hello,

Considering a zip file which contains utf-8 filenames (as uploaded zip file), 
the following code fails if launched in a Posix shell.

 with zipfile.ZipFile(test_ut8.zip) as fd:
... fd.extractall()
... 
Traceback (most recent call last):
  File stdin, line 2, in module
  File /opt/python/3.3/lib/python3.3/zipfile.py, line 1225, in extractall
self.extract(zipinfo, path, pwd)
  File /opt/python/3.3/lib/python3.3/zipfile.py, line 1213, in extract
return self._extract_member(member, path, pwd)
  File /opt/python/3.3/lib/python3.3/zipfile.py, line 1276, in _extract_member
open(targetpath, wb) as target:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 10-14: 
ordinal not in range(128)

With shell:
$ locale
LANG=POSIX
...

But filesystem is not encoding dependant. On a Unix system, filename are only 
bytes, there is no reason to refuse to unzip a zip file (in fact, unzip 
command line don't fail to unzip the file in a Posix shell).

Since open can take bytes filename, changing the line 1276 from
 open(targetpath)
to:
 open(targetpath.encode(utf-8))

fixes the problem.

zipfile should not care about the encoding of the filename and should use the 
bytes sequence filename extracted directly from the bytes sequence of the 
zipfile. Having ZipInfo.filename as a string (and not bytes) is great for an 
API, but is not needed to open/write a file on the disk. Then, ZipInfo should 
store the direct bytes sequences of filename as a bytes_filename field and 
use it in the open of extract.

In addition, considering the patch of bug 10614, the right patch could use the 
new ZipInfo.encoding field:
 open(targetpath.encode(member.encoding))

--
components: Extension Modules
files: test_ut8.zip
messages: 208648
nosy: Laurent.Mazuel
priority: normal
severity: normal
status: open
title: zipfile.extractall fails in Posix shell with utf-8 filename
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file33589/test_ut8.zip

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



[issue20330] PEP 342 is outdated

2014-01-21 Thread Masami HIRATA

New submission from Masami HIRATA:

Although PEP 342 says foo(yield 42) is legal, Lib/test/test_grammar.py says:
# Requires parentheses as call argument
def g(): f((yield 1))
check_syntax_error(self, def g(): f(yield 1))

BTW, It seems that foo(yield 42) written in ECMAScript 6 is OK.

--
assignee: docs@python
components: Documentation
messages: 208650
nosy: docs@python, msmhrt
priority: normal
severity: normal
status: open
title: PEP 342 is outdated
versions: Python 3.3

___
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



[issue20328] mailbox:

2014-01-21 Thread R. David Murray

R. David Murray added the comment:

Conceptually the problem with this is that if you use the object to delete the 
folder, you now have an object with no folder...that is,
an invalid object.  Do we have any other stdlib examples of objects with a 
'delete()' method...looks like bdb has a deleteMe on breakpoint objects, but it 
isn't clear that it tries to deal with what happens if a breakpoint object that 
has been deleted is accessed again.  There are also some in idlelib/tk, which I 
haven't looked at.

So, I guess the issue is to work out what the semantics of the object would be 
if delete has been called, and make sure it actually makes sense to have a 
delete method.

--
components: +email
nosy: +barry, r.david.murray
versions: +Python 3.5 -Python 2.7

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



[issue20295] imghdr add openexr support

2014-01-21 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +serhiy.storchaka

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



[issue20297] concurrent.futures.as_completed() installs waiters for already completed Futures

2014-01-21 Thread Glenn Langford

Glenn Langford added the comment:

Uploading proposed new version of as_completed() for review. Note the following 
changes:

- does not install waiters for Futures which are completed
- locks only one Future at a time to improve concurrency (rather than locking 
all Futures at once); traverses Futures in the order given, as no need to sort 
into a canonical order
- immediately yields each completed Future, without waiting to lock and examine 
other Futures
- fixes locking bug in waiter removal

--
Added file: http://bugs.python.org/file33590/as_completed_proposed.py

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-01-21 Thread Brett Cannon

Brett Cannon added the comment:

Here is fcntl converted. I didn't do fcntl.ioctl as it has a crazy set of 
possible signatures which I simply didn't want to deal with.

--
Added file: http://bugs.python.org/file33591/fcntl_derby.diff

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



[issue19643] shutil rmtree fails on readonly files in Windows

2014-01-21 Thread R. David Murray

R. David Murray added the comment:

See issue 8523 for a discussion of changing the way onerror behaves.  I think 
it is addressing this same use case, but I didn't reread it in detail.

--

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



[issue19643] shutil rmtree fails on readonly files in Windows

2014-01-21 Thread Paul Moore

Paul Moore added the comment:

It's similar. But the problem is that it only returns a list of errors, it 
doesn't let you address the error *while the rmtree is in progress*.

The key thing is that if you can fix the problem in onerror, you can avoid 
needing to restart the whole tree walk, which is the key aspect of rmtree.

As things stand, you can use the set_rw function I showed above, and run the 
rmtree twice:

shutil.rmtree('path', onerror=set_rw)
shutil.rmtree('path')

The first run fixes the error and then the second one deletes the remaining 
files. But this is clearly inefficient, and makes the limitations of report 
errors to the user who can then address them fairly obvious.

--

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



[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread R. David Murray

R. David Murray added the comment:

If you live in a current-posix world, this might make sense.  However, one can 
also argue that the filename should be *transcoded* from the tarfile encoding 
to the local FS filename encoding, which I believe is what we are currently 
doing.  Which, if you are using POSIX as the locale, will fail a lot.  If you 
use a sensible modern locale that includes utf-8, you wouldn't have a problem.

Unfortunately, the reality is probably that sometimes you want one behavior and 
sometimes you want the other :(

Encoding using member.encoding is probably wrong, though.  If you are trying to 
preserve the original bytes, is is probably best do so, and not assume that the 
tarfile encoding field is valid.

I'm adding Victor Stinner to nosy: he's thought about these issues much more 
deeply than I have.  The answer may be that we will only support transcoding 
filenames in our tarfile module...and certainly it looks like doing anything 
else, even if we want to, would be a new feature.

--
nosy: +haypo, r.david.murray

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



[issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures

2014-01-21 Thread Guido van Rossum

Guido van Rossum added the comment:

You have convinced me.

--

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



[issue19643] shutil rmtree fails on readonly files in Windows

2014-01-21 Thread R. David Murray

R. David Murray added the comment:

OK, rereading that issue, I disagree with Tarek and I think that the patch on 
that issue is ill-advised as it looks like it changes behavior in a 
non-backward-compatible way.

If you changed your set_rw onerror handler to a rm_ro_file error handler, would 
things work?  That is, have the handler delete the file?

Adding a 'retry' capability is interesting, but would be a non-trivial change 
in logic, and should be addressed in a new issue, not this one.

--

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



[issue9694] argparse required arguments displayed under optional arguments

2014-01-21 Thread Martin d'Anjou

Martin d'Anjou added the comment:

How about calling required arguments required arguments?

required arguments:
  --reqarg REQARG, -r REQARG
This is required
optional arguments:
  -h, --helpshow this help message and exit
  --optarg OPTARG, -o OPTARG
This is optional

Clear and unambiguous. With this approach the user does not have to bloat the 
help to state This is required.

We're having the same discussion over at github regarding argparse4j:
https://github.com/tatsuhiro-t/argparse4j/issues/26#issuecomment-32894297

--
nosy: +Martin.d'Anjou

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



[issue20330] PEP 342 is outdated

2014-01-21 Thread R. David Murray

R. David Murray added the comment:

Most PEPs are historical documents once they are final, so I don't think there 
is actually anything to fix here.  But I could be wrong.

--
nosy: +r.david.murray

___
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



[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-21 Thread Stefan Krah

Stefan Krah added the comment:

I've been looking into this, and the only option provided by the Android NDK 
involves cross-compiling Python on a regular machine. This would require some 
custom commands before and in between the builds, to build a host Python first, 
then cross-compile the Android Python, and then start the emulator, transfer 
the binaries there and run the tests over adb. Can buildbot provide 
functionality so this can be configured on-slave, or would it require setting 
up a seperate master?

I'm not sure. Antoine, do you think this is possible?

--
nosy: +pitrou

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



[issue20321] ImportError when a module is created after a catched ImportError

2014-01-21 Thread berdario

berdario added the comment:

yes, sorry... I tried to simplify and generalize it too much (I tried to 
avoid creating a new directory in the test, assuming that the same behavior 
could make sense by only creating a new module in the current directory)

I'll reupload the correct version of the failing code, and I'll try to 
understand importlib.invalid_caches before eventually reopening it

--
Added file: http://bugs.python.org/file33592/bbug.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20321
___
___
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-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch fixes potential fd leaks in various modules.

--
components: Library (Lib)
files: fd_leaks.patch
keywords: patch
messages: 208664
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fix various fd leaks
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33593/fd_leaks.patch

___
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



[issue19643] shutil rmtree fails on readonly files in Windows

2014-01-21 Thread Paul Moore

Paul Moore added the comment:

Looks like that works. At least in my case - I just did

def del_rw(action, name, exc):
os.chmod(name, stat.S_IWRITE)
os.remove(name)
shutil.rmtree(path, onerror=del_rw)

Something more robust might check if name is a directory and os.rmdir that - I 
didn't need it for my case though.

Thanks.

--

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



[issue20321] ImportError when a module is created after a catched ImportError

2014-01-21 Thread berdario

Changes by berdario berda...@gmail.com:


Removed file: http://bugs.python.org/file33582/bbug.py

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



[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I've been looking into this, and the only option provided by the
 Android NDK involves cross-compiling Python on a regular machine. This
 would require some custom commands before and in between the builds,
 to build a host Python first, then cross-compile the Android Python,
 and then start the emulator, transfer the binaries there and run the
 tests over adb. Can buildbot provide functionality so this can be
 configured on-slave, or would it require setting up a seperate
 master?

The master can ask the slave to execute arbitrary commands. So, as long
as you implement the necessary steps as well-known commands executable
by the slave, you can then tell me how to insert them inside the build
process.

However, the only point of setting up an Android buildbot would be if:
1) Python actually builds correctly on Android
2) someone monitors the buildbot for failures and tries to act on them

--

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



[issue20324] gcc-4.2.4 support on python-3.3 (libmpdec)

2014-01-21 Thread Stefan Krah

Stefan Krah added the comment:

This is the gcc bug:

   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861


I rather agree with this comment:

   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861#c3

If a distro still maintains 4.2.x, the toolchain should be fixed
(like FreeBSD apparently did).

--

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



[issue20321] ImportError when a module is created after a catched ImportError

2014-01-21 Thread berdario

berdario added the comment:

Ok, the bug is unrelated with timings and the finder caches apparently

--
resolution: invalid - 
status: closed - open
versions:  -3rd party, Python 2.7

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-01-21 Thread Brett Cannon

Brett Cannon added the comment:

Here is pyexpat converted. Couldn't do ErrorString as the 'l' format isn't 
supported; issue #20332.

--
Added file: http://bugs.python.org/file33594/pyexpat_derby.diff

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



[issue20332] Argument Clinic does not support the 'l' format

2014-01-21 Thread Brett Cannon

New submission from Brett Cannon:

'l' is long for PyArg_ParseTuple().

--
assignee: larry
components: Build
messages: 208667
nosy: brett.cannon, larry
priority: normal
severity: normal
status: open
title: Argument Clinic does not support the 'l' format
versions: Python 3.4

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



[issue19990] Add unittests for imghdr module

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In general the patch LGTM, but additional tests can be added.

Needed various tests for imghdr.what() arguments:

* First argument is bytes, int or None.
* First argument is a name of non-existent file.
* First argument is text stream.
* First argument is output stream.
* First argument is closed stream.
* First argument is non-seekable stream.
* Second argument is bytearray.
* Second argument is str.
* Second argument is None.

Try to insert test function which handles one of already supported format at 
the front of imghdr.test.

--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
stage:  - patch review
versions: +Python 2.7, Python 3.3

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



[issue20333] argparse subparser usage message hides main parser usage

2014-01-21 Thread Martin d'Anjou

New submission from Martin d'Anjou:

Consider the following code:

#!/usr/bin/env python3
import argparse

# create the top-level parser
parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument('--file', help='A filename', required=True)
subparsers = parser.add_subparsers(help='sub-command help')

# create the parser for the a command
parser_a = subparsers.add_parser('a', help='a help')
parser_a.add_argument('bar', type=int, help='bar help')

# create the parser for the b command
parser_b = subparsers.add_parser('b', help='b help')
parser_b.add_argument('--baz', choices='XYZ', help='baz help')

The help for subparser a is obtained with: parser.parse_args([a,--help])

usage: PROG a [-h] bar

positional arguments:
  bar bar help

optional arguments:
  -h, --help  show this help message and exit

When the user follows the help, the user gets it wrong:
parser.parse_args([a,10])

usage: PROG [-h] --file FILE {a,b} ...
PROG: error: argument --file is required

The correct way to use the subparser is:
parser.parse_args([--file,file,a,10])

But the problem is that the original help message is not telling the user that 
this is the correct way. When asking for the a subparser help, the usage 
message should also reveal the main parser arguments. Continuing with the 
example, something like this should be appropriate:

usage: PROG [-h] --file FILE a [-h] bar

This is how the argparse Java port works.

--
components: Library (Lib)
messages: 208670
nosy: Martin.d'Anjou
priority: normal
severity: normal
status: open
title: argparse subparser usage message hides main parser usage
type: enhancement
versions: Python 3.3

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



[issue20334] make inspect Signature hashable

2014-01-21 Thread Yury Selivanov

New submission from Yury Selivanov:

inspect.Signature and inspect.Parameter are immutable structures, and it makes 
sense to make them hashable too.

Patch is attached.

--
components: Library (Lib)
files: hashable_signature_01.patch
keywords: patch
messages: 208671
nosy: brett.cannon, larry, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: make inspect Signature hashable
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33595/hashable_signature_01.patch

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



[issue20321] ImportError when a module is created after a catched ImportError

2014-01-21 Thread berdario

Changes by berdario berda...@gmail.com:


Added file: http://bugs.python.org/file33596/bug_with_invalidatecaches.py

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



[issue20334] make inspect Signature hashable

2014-01-21 Thread Yury Selivanov

Yury Selivanov added the comment:

Fair enough.

--

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



[issue20321] ImportError when a module is created after a catched ImportError

2014-01-21 Thread Brett Cannon

Brett Cannon added the comment:

It actually is a caching issue, but not with the caches in the finder but the 
cache *of* finders. Because you inserted LIBDIR before it existed, import 
noticed it didn't exist and so put None into sys.path_importer_cache[LIBDIR] 
(or imp.NullImporter prior to Python 3.3). If you del 
sys.path_importer_cache[LIBDIR] just before trying to import impfile then it 
works. If you leave the directory around but clear out its contents then 
importlib.invalidate_caches() would have been needed.

As you have noticed, dynamically mucking around import is rather delicate. 
There are various caches and tricks used in order to speed it up since it is 
such a common operation. If you are trying to just load a single file that you 
dynamically wrote you can load the file directly using 
http://docs.python.org/3/library/importlib.html#importlib.machinery.SourceFileLoader
 (or if you need to support Python 2.7 as well, 
http://docs.python.org/2.7/library/imp.html#imp.load_module).

Do let me know if you are trying to just load a single file. I'm contemplating 
adding a utility function to help with that use-case in importlib.

--

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



[issue20334] make inspect Signature hashable

2014-01-21 Thread Brett Cannon

Brett Cannon added the comment:

This is a new feature so it can't go into Python 3.4.

--
versions: +Python 3.5 -Python 3.4

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



[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-01-21 Thread Serhiy Storchaka

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


--
nosy: +serhiy.storchaka

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



[issue20271] urllib.parse.urlparse() accepts wrong URLs

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What should be correct behavior? Raise an exception, return '[::1]spam' as 
hostname, or left all as is?

--

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



[issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace

2014-01-21 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage: patch review - committed/rejected

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



[issue20333] argparse subparser usage message hides main parser usage

2014-01-21 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +bethard, paul.j3

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



[issue19870] Backport Cookie fix to 2.7 (httponly / secure flag)

2014-01-21 Thread Berker Peksag

Berker Peksag added the comment:

Here's a backport of issue 16611 for 2.7.

--
keywords: +patch
nosy: +berker.peksag
stage:  - patch review
versions:  -Python 3.3
Added file: http://bugs.python.org/file33597/issue19870.diff

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



[issue20324] gcc-4.2.4 support on python-3.3 (libmpdec)

2014-01-21 Thread Georg Brandl

Georg Brandl added the comment:

OK, thanks for the quick response.  Relaxing to normal priority, please close 
as required.

--
priority: release blocker - normal

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



[issue20324] gcc-4.2.4 support on python-3.3 (libmpdec)

2014-01-21 Thread Dirkjan Ochtman

Dirkjan Ochtman added the comment:

Given this, WONTFIXing this seems reasonable to me, FWIW.

--

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



[issue19863] Missing function attributes in 2.7 docs.

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM, but may be write Py3k compatible names at first place?

--
stage:  - commit review
type:  - behavior

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



[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2014-01-21 Thread Zachary Ware

Zachary Ware added the comment:

Larry Hastings wrote:
 Does your proposed solution work properly when docstrings are turned
 off?  Try undefining WITH_DOC_STRINGS.  I bet you need to make the
 size 1 in that case.

For certain values of properly, yes.  It builds with no warnings or errors on 
Windows, but I don't know how it does on memory usage.  It's easy enough to 
define PyDoc_VAR_WITH_SIZE alongside PyDoc_STR and use '1' instead of 'size' 
when WITH_DOC_STRINGS is undefined, though.

 Also, the length must be len(f.docstring) + 1, to account for the
 trailing \0.

I thought so as well, but testing both ways showed no difference.  To provoke a 
difference, I defined length as len(f.docstring) - 1, which threw a compiler 
warning about an overflow.  Adding 1 is probably safer, though.

 Also, error C2133 doesn't look like it's applicable.  On line 71 it's
 not being stored in a structure.  Dumb MSVC.

I can't argue that one :)

 Also PyDoc_SIZEDVAR is a bad name.  PyDoc_SIZED_VAR would be an
 improvement, but I think PyDoc_VAR_WITH_SIZE is the name you want
there.

Fair enough.

 And, I'm still not a +1 on this approach.  Can you propose something
 else?

I gave the 4 alternatives I could think of; I'll keep thinking and throw out 
anything else I come up with.

 Finally, I will note that the buffer preset would work just fine in
 this file, if you dumped the buffer just above the PyMethodDef array.

Indeed; winsound is just a convenient testbed since it's such a small module, 
but the problem will affect any module that can really benefit from the 
two-pass output system.

--

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



[issue20324] gcc-4.2.4 support on python-3.3 (libmpdec)

2014-01-21 Thread Georg Brandl

Georg Brandl added the comment:

Thanks.

--
resolution:  - wont fix
status: open - closed

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



[issue20024] Py_BuildValue() can call Python code with an exception set

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

I have searched the sources and have not found any use of Py_BuildValue() which 
can be used for test. Py_BuildValue() can fail only due to memory error. It can 
also can fail with non-UTF8 string, but all uses of Py_BuildValue() with a 
string in a tuple proceeds only ASCII strings.

--
stage: test needed - commit review

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



[issue19863] Missing function attributes in 2.7 docs.

2014-01-21 Thread Serhiy Storchaka

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


--
assignee: docs@python - mark.dickinson

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



[issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures

2014-01-21 Thread Stefan Krah

Stefan Krah added the comment:

Larry Hastings rep...@bugs.python.org wrote:
 I think we should change the syntax to something people would
 never write by accident.  Here are some suggestions:
 
 *(
 *clinic*(
 \01 clinic(

I like the original def (...)\n approach from #19674.  If that is not
possible for some reason, *( is fine, too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20326
___
___
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-21 Thread Serhiy Storchaka

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


--
assignee:  - zach.ware

___
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



[issue20075] help(open) eats first line

2014-01-21 Thread Stefan Krah

Stefan Krah added the comment:

See also #20326.

--
nosy: +skrah

___
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



[issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What if the __text_signature__ and __doc__ getter will call ast.parse() 
(actually compile()) on signature candidate? If it fails, then builtin has no 
signature, the __text_signature__ getter returns '', and the __doc__ getter 
returns all original docstring.

--
nosy: +serhiy.storchaka

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



[issue20187] The Great Argument Clinic Conversion Derby Meta-Issue

2014-01-21 Thread Tal Einat

Tal Einat added the comment:

Never mind my previous comment; I realize it would create to much of a mess. 
Sorry for the noise.

--

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



[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2014-01-21 Thread Tal Einat

Tal Einat added the comment:

While converting Objects/stringlib/transmogrify.h as part of issue20180 (Derby 
#11), some changes to Objects/bytesobject.c and Objects/bytearrayobject.c were 
required. Those changes are included in the relevant patch attached to that 
issue.

--
nosy: +taleinat

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20181
___
___
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-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Actually, several other methods also have wrong parameter name, source 
instead of string.

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file33598/sre_pattern_string_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



[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-21 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file33509/sre_pattern_string_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



[issue20187] The Great Argument Clinic Conversion Derby Meta-Issue

2014-01-21 Thread Tal Einat

Tal Einat added the comment:

I've been working on converting unicode, bytes and bytearray, but their files 
are separated into Derby groups #10, #11 and #12. Could we create a new issue 
and move the relevant files to it?

The files I'd like to move:

From Derby #10 (issue20179):
Objects/bytes_methods.c
Objects/bytesobject.c

From Derby #11 (issue20180):
Objects/unicodeobject.c
Objects/stringlib/find.h
Objects/stringlib/transmogrify.h

From Derby #12 (issue 20181):
Objects/bytearrayobject.c: 13 sites

--
nosy: +taleinat

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20187
___
___
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-21 Thread Serhiy Storchaka

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


--
nosy: +mrabarnett

___
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



[issue20301] Correct docs for default access argument for DeleteKeyEx

2014-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset da35a4e724e5 by Zachary Ware in branch '3.3':
Issue #20301: Mention the correct KEY_* value as the default
http://hg.python.org/cpython/rev/da35a4e724e5

New changeset 3baee069c5ff by Zachary Ware in branch 'default':
Issue #20301: Merge with 3.3
http://hg.python.org/cpython/rev/3baee069c5ff

--
nosy: +python-dev

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



[issue20301] Correct docs for default access argument for DeleteKeyEx

2014-01-21 Thread Zachary Ware

Zachary Ware added the comment:

Fixed, thanks for the report!

--
assignee: docs@python - zach.ware
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue20024] Py_BuildValue() can call Python code with an exception set

2014-01-21 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for the review Serhiy.

--
resolution:  - fixed
status: open - closed

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



[issue19936] Executable permissions of Python source files

2014-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Gregory, is it intentional that Modules/_ctypes/libffi/build-ios.sh, 
Modules/_ctypes/libffi/libtool-ldflags, Modules/_ctypes/libffi/msvcc.sh and 
Modules/_ctypes/libffi/src/arm/gentramp.sh have no executable bits? They all 
have executable bits in mainstream libffi-3.0.13 distribution.

--
nosy: +gregory.p.smith

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



[issue20024] Py_BuildValue() can call Python code with an exception set

2014-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29b4eb47f65e by Victor Stinner in branch 'default':
Issue #20024: Py_BuildValue() now saves/restores the current exception before
http://hg.python.org/cpython/rev/29b4eb47f65e

--
nosy: +python-dev

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



[issue20024] Py_BuildValue() can call Python code with an exception set

2014-01-21 Thread STINNER Victor

STINNER Victor added the comment:

parsermodule.patch was applied as 91cb83f895cf (Python 3.3) and cd952e92c180 
(3.4).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20024
___
___
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-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ce7295393c2 by Victor Stinner in branch 'default':
Issue #20311: EpollSelector now also rounds the timeout towards zero, as
http://hg.python.org/cpython/rev/7ce7295393c2

--

___
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



[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2014-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb7565c212f1 by Serhiy Storchaka in branch '3.3':
Issue #2382: SyntaxError cursor ^ now is written at correct position in most
http://hg.python.org/cpython/rev/eb7565c212f1

New changeset ea34b2b0b8ae by Serhiy Storchaka in branch 'default':
Issue #2382: SyntaxError cursor ^ now is written at correct position in most
http://hg.python.org/cpython/rev/ea34b2b0b8ae

--
nosy: +python-dev

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



[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2014-01-21 Thread Tal Einat

Tal Einat added the comment:

Attached patch for AC conversion of Objects/bytesobject.c and 
Objects/bytearrayobject.c.

This is one patch because there are changes that must be done in 
bytes_methods.h and bytes_methods.c that affect both of bytesobject.c and 
bytearrayobject.c. Those changes are in this patch as well.

All methods were converted except for two groups:

1) the various find methods which use the common argument parsing function 
'stringlib_parse_args_finds_byte'
2) 'new' and 'init' methods

Also note that both of these classes use some common function implementations 
found under 'stringlib'. However, since that code is in separate files, I'll 
upload the conversion patches to the relevant issue (and write an appropriate 
comment here).

--
keywords: +patch
Added file: http://bugs.python.org/file33599/bytes_and_bytearray.patch

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



[issue20327] Argument Clinic: setting internal variable names for parsed arguments

2014-01-21 Thread Zachary Ware

Zachary Ware added the comment:

This is a duplicate of issue20227; I'm adding you to the nosy of that one, Tal.

--
nosy: +zach.ware
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - Argument Clinic: rename arguments in generated C?

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



[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-21 Thread Zachary Ware

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


--
nosy: +taleinat

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



[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2014-01-21 Thread Tal Einat

Tal Einat added the comment:

See nearly complete conversion of Objects/bytearrayobject.c in patch attached 
to issue20179.

--

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



[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2014-01-21 Thread Serhiy Storchaka

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


--
assignee: serhiy.storchaka - 
stage: patch review - needs patch

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



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

2014-01-21 Thread Serhiy Storchaka

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


--
nosy: +ncoghlan

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



[issue16630] IDLE: Calltip fails if __getattr__ raises exception

2014-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d55d1cbf5f9a by Terry Jan Reedy in branch '2.7':
Issue #16630: Make Idle calltips work even when __getattr__ raises.
http://hg.python.org/cpython/rev/d55d1cbf5f9a

New changeset 2fe0b2dcc98c by Terry Jan Reedy in branch '3.3':
Issue #16630: Make Idle calltips work even when __getattr__ raises.
http://hg.python.org/cpython/rev/2fe0b2dcc98c

--
nosy: +python-dev

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



[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-21 Thread Tal Einat

Tal Einat added the comment:

+1 for this. It would save a bit of manual conversion work, and would 
significantly reduce the size and complexity of the resulting patches.

--

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



[issue16630] IDLE: Calltip fails if __getattr__ raises exception

2014-01-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I added test_attribute_exception with two subtests for each of two nasty 
classes. The resulting failures were fixed in CallTips.py by replacing all 
ob.__call__ references with one reference inside try_except that saved the 
method for possible later use.

--
assignee: serhiy.storchaka - terry.reedy
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue7883] CallTips.py _find_constructor does not work

2014-01-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

THanks for reporting this. #12520 tripled the number of tests in CallTips.py 
and #20122 moved them to test_calltips.py. I think they cover this case and the 
tests proposed. #16630 added a few more tests and patched CallTips.py to make 
them pass. If you find any other cases that fail with the current bugfix 
releases, report them on a new issue.

--
assignee:  - terry.reedy
resolution: fixed - out of date
stage: test needed - committed/rejected
status: open - closed

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



[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2014-01-21 Thread Larry Hastings

Larry Hastings added the comment:

If in C you define
static char a[5] = abcde
C suppresses the trailing '\0'.  That it continued to work okay was a lucky 
break--you must not have looked in many docstrings, or you lucked out and they 
happened to be padded with zeroes.

--

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



[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2014-01-21 Thread Larry Hastings

Larry Hastings added the comment:

I had to throw it in a struct to prevent gcc from rearranging the variables.  
But this demonstrates the problem--when it prints the string, it doesn't stop 
at the end.

-
#include stdio.h

typedef struct
{
int a;
char b[8];
int c;
} abc_t;

int main(int argc, char *argv[])
{
abc_t abc = {-1, abcdefgh, -1};
printf(abc %i%s%i\n, abc.a, abc.b, abc.c);
return 0;
}
-

--

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



  1   2   >