[issue22758] Regression in Python 3.2 cookie parsing

2015-09-02 Thread Berker Peksag

Changes by Berker Peksag :


--
stage:  -> commit review

___
Python tracker 

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



[issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor

2015-09-02 Thread Benedikt Reinartz

Changes by Benedikt Reinartz :


--
versions: +Python 2.7, Python 3.2, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread flying sheep

flying sheep added the comment:

of course if there is a chance that some specific config file exists at a known 
location, it’s the only sane choice to try and look for it there iff it isn’t 
in its preferred location.

e.g. fontconfig made that switch some time ago: it used to be ~/.fonts.conf, 
now it’s ${XDG_CONFIG_HOME-$HOME/.config}/fontconfig/fonts.conf

the library will look at the new position and if it can’t find anything there, 
it looks at the old one.

but for new config files we should follow standards. on windows and OSX there 
are different ones: see the current discussion on python-ideas for specifics 
and problems. but on linux the only standard for this which i know is 
XDG-base-directories, so we should follow that for new config files.

--

___
Python tracker 

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



[issue24979] Allow timezone offsets greater than 24 hours

2015-09-02 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +belopolsky

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

Larry Hasting wrote:
>> too late for 3.5.0
> How's that?

Well, for example... my change broke all buildbots.

I don't think that it's good idea to rush to fix Python 3.5 :-) This part of 
Python (handling timestamps, especially the rounding mode) is complex, I prefer 
to check for all buildbots and wait for some feedback from users (wait at least 
2 weeks).

I reverted my change, another function must be changed:

$ python2 -c 'import datetime; print(datetime.timedelta(microseconds=0.5))'
0:00:00.01
$ python3 -c 'import datetime; print(datetime.timedelta(microseconds=0.5))'
0:00:00

datetime.timedelta must also use the ROUND_HALF_UP method, as Python 2, instead 
of ROUND_HALF_EVEN (datetime.py uses the round() function).

$ python2 -c 'import datetime; print(datetime.timedelta(microseconds=1.5))'
0:00:00.02
$ python3 -c 'import datetime; print(datetime.timedelta(microseconds=1.5))'
0:00:00.02

I have to rework my patch to use ROUND_HALF_UP in datetime.timedelta(), 
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp(), and 
update test_datetime.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30454ef98e81 by Victor Stinner in branch 'default':
Backed out changeset b690bf218702
https://hg.python.org/cpython/rev/30454ef98e81

New changeset 700303850cd7 by Victor Stinner in branch 'default':
Issue #23517: Fix _PyTime_ObjectToDenominator()
https://hg.python.org/cpython/rev/700303850cd7

New changeset 03c97bb04cd2 by Victor Stinner in branch 'default':
Issue #23517: Reintroduce unit tests for the old PyTime API since it's still
https://hg.python.org/cpython/rev/03c97bb04cd2

--

___
Python tracker 

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



[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Erik Cederstrand

Erik Cederstrand added the comment:

The going's a bit tough here. I've spent at least 10 times as long on this bug 
than it took me to work around the fact that Python doesn't support ISO week 
number round-trip. Python puts a smile on my face every day and I enjoy giving 
back where I can. But after four years, the smile is getting a bit stiff when I 
look at this enhancement request. 

I'm hereby offering a scrumptious, mouth-watering, virtual, blackberry mousse 
gateau with a honey-roasted almond meringue cake bottom to the person who gets 
this enhancement committed. In good open-source spirit, everyone who 
contributed along the way is entitled to a healthy serving and eternal 
gratitude from me.

Bon appetit!

--

___
Python tracker 

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



[issue24977] shutil copy to non-existant directory

2015-09-02 Thread eryksun

eryksun added the comment:

Do you mean the dst path has a trailing slash, but the directory doesn't exist? 
shutil.copy doesn't check for a trailing slash, so it attempts to open dst as a 
regular file. On Linux, and probably most POSIX systems, this results in an 
EISDIR (is a directory) error. On Windows the error is ERROR_INVALID_NAME, 
which the CRT maps to EINVAL (invalid argument).

--
components: +Library (Lib)
nosy: +eryksun
versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24979] Allow timezone offsets greater than 24 hours

2015-09-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

BTW, the specific issue that OP complains about is not a datetime issue: 
apparently pytz has an even tighter restriction on timezone offsets.

I am going to close this as a third party issues, but those who support 
relaxing datetime.timezone restriction to ±24h range are invited to participate 
in issue 5288 discussion.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed
superseder:  -> tzinfo objects with sub-minute offsets are not supported (e.g. 
UTC+05:53:28)

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-02 Thread Tim Tisdall

New submission from Tim Tisdall:

Currently https://docs.python.org/3.6/library/socket.html#socket-families only 
says "Certain other address families (AF_BLUETOOTH, AF_PACKET, AF_CAN) support 
specific representations." and there's a comment in the docs saying "document 
them!"...  So, I'm documenting the AF_BLUETOOTH.

I'm not sure about which versions this should be added to except for 3.6 so I'm 
listing the pertinent issues when changes were made: 

issue929192 seems to be where the current address format was added for L2CAP, 
RFCOMM, and SCO

issue1432399 seems to be where HCI was added

issue5510 seems to be where the alternate address format for HCI was added for 
NetBSD and DragonFlyBSD

It seems SCO used to accept a regular string but at 23ab586c427a it was changed 
to use a `bytes`...  I'm not sure the issue behind that.


This is my first contribution to CPython so I figured a patch to the docs would 
be easiest.  Please let me know if I'm doing anything wrong!

--
assignee: docs@python
components: Documentation
files: bluetooth_socket_docs.patch
keywords: patch
messages: 249554
nosy: Tim.Tisdall, docs@python
priority: normal
severity: normal
status: open
title: document AF_BLUETOOTH socket address formats
Added file: http://bugs.python.org/file40320/bluetooth_socket_docs.patch

___
Python tracker 

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



[issue2786] Names in function call exception should have class names, if they're methods

2015-09-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue4322.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread Yury Selivanov

Yury Selivanov added the comment:

Yann, I'll commit this as soon as 3.5.0 and 3.4.4 are out.

--

___
Python tracker 

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



[issue24979] Allow timezone offsets greater than 24 hours

2015-09-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

The timezone offset range restriction is not arbitrary.  It was discussed in 
issue 5094 (see msg107059 and responses to it.)

Nevertheless, there is an open proposal to remove all restrictions on offset 
values and allow it to be an arbitrary timedelta.  See issue 5288, msg248468.

I think we should consolidate this issue with #5288.

--
nosy: +tim.peters

___
Python tracker 

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



[issue21590] Systemtap and DTrace support

2015-09-02 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue13405] Add DTrace probes

2015-09-02 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0eb8c182131e by Victor Stinner in branch 'default':
Issue #23517: datetime.timedelta constructor now rounds microseconds to nearest
https://hg.python.org/cpython/rev/0eb8c182131e

--

___
Python tracker 

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



[issue14350] Strange Exception from copying an iterator

2015-09-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Actually the tp_new field of list iterator class is NULL. Unpickler raises 
other error in such case (see issue24900 for example).

UnpicklingError: NEWOBJ class argument has NULL tp_new

Backported to 2.7 the part of the patch for issue22995 fixes this issue.

>>> copy.copy(iter([]))
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython-2.7/Lib/copy.py", line 88, in copy
rv = reductor(2)
TypeError: can't pickle listiterator objects

--
dependencies: +Restrict default pickleability
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric

David Unric added the comment:

Oops, this was the strict version. The lazy method call version behaves exactly 
like property getter.

So there is probably no implementation bug, but not too well thought out 
decision design, making debugging AttributeError exceptions in properties 
difficult and quite misleading.

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread John Leitch

Changes by John Leitch :


Added file: http://bugs.python.org/file40327/scan_eol_Buffer_Over-read.py

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread John Leitch

New submission from John Leitch:

Python 3.5 suffers from a vulnerability caused by the behavior of the 
scan_eol() function. When called, the function gets a line from the buffer of a 
BytesIO object by searching for a newline character starting at the position in 
the buffer.

However, if the position is set to a value that is larger than the buffer, this 
logic will result in a call to memchr that reads off the end of the buffer:

/* Move to the end of the line, up to the end of the string, s. */
start = PyBytes_AS_STRING(self->buf) + self->pos;
maxlen = self->string_size - self->pos;
if (len < 0 || len > maxlen)
len = maxlen;

if (len) {
n = memchr(start, '\n', len);


In some applications, it may be possible to exploit this behavior to disclose 
the contents of adjacent memory. The buffer over-read can be observed by 
running the following script:

import tempfile
a = tempfile.SpooledTemporaryFile()
a.seek(0b1)
a.readlines()

Which, depending on the arrangement of memory, may produce an exception such as 
this:

0:000> g
(698.188): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=fff8a14c ebx=0a0a0a0a ecx= edx=05bb1000 esi=061211b0 edi=89090909
eip=61c6caf2 esp=010af8dc ebp=010af914 iopl=0 nv up ei ng nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010292
python35!memchr+0x62:
61c6caf2 8b0amov ecx,dword ptr [edx]  ds:002b:05bb1000=
0:000> k1
ChildEBP RetAddr  
010af8e0 61b640f1 python35!memchr+0x62 
[f:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\memchr.asm @ 125]


To fix this issue, it is recommended that scan_eol() be updated to check that 
the position is not greater than or equal to the size of the buffer. A proposed 
patch is attached.

--
files: scan_eol_Buffer_Over-read.patch
keywords: patch
messages: 249584
nosy: JohnLeitch, brycedarling
priority: normal
severity: normal
status: open
title: scan_eol() Buffer Over-read
type: security
versions: Python 3.5
Added file: http://bugs.python.org/file40326/scan_eol_Buffer_Over-read.patch

___
Python tracker 

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



[issue24707] Assertion failed in pymonotonic_new

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

I removed the assertion. Thanks for your report!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue24990] Foreign language support in turtle module

2015-09-02 Thread Al Sweigart

Al Sweigart added the comment:

I volunteer to produce the patch.

I know Bryson's "Teach Your Kids to Code" book (which features Python's turtle 
module) hasn't been translated to other languages yet. It would be nice to get 
this committed sooner rather than later. I'm open to ideas for expanding 
documentation of turtle to other languages.

--

___
Python tracker 

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



[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

> Revision c1396d28c440 looks like it may help. Possibly with the 3.5+ 
> assertWarns() half of the problem; I’ll have to have a closer look later.

Oh, I wasn't aware of this issue. Good to know that I contributed to it :-)

--
nosy: +haypo

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo, serhiy.storchaka

___
Python tracker 

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



[issue24990] Foreign language support in turtle module

2015-09-02 Thread Al Sweigart

New submission from Al Sweigart:

I'd like to propose adding foreign language names for the names in the turtle 
module. This would effectively take this code:

import turtle
t = turtle.Pen()
t.pencolor('green')
t.forward(100)

...and have this code in French be completely equivalent:

import turtle
t = turtle.Plume()
t.couleurplume('vert')
t.avant(100)

(Pardon my google-translate French.)

This would be built into the turtle module (the "turtle" name itself would be 
unchanged). They would be available no matter what the OS's localization 
settings were set to.

This, of course, is terrible way for a software module to implement 
internationalization, which usually does not apply to the source code names 
itself. But I'd like to explain why the turtle module is different.

The turtle module is not used for professional software development, but 
instead as a teaching tool for children. While professional developers are 
expected to obtain proficiency with English, the same does not apply to school 
kids who are just taking a small computer programming unit. Having the turtle 
module available in their native language would remove a large barrier and let 
them focus on the core programming concepts that turtle provides.

The popular Scratch tool has a similar internationalized setup and also has 
LOGO-style commands, so the translation work is already done.

Technically, it would be possible to mix multiple natural languages in the same 
program. This would be a bad practice, but I also don't see it as a common one.

The color strings (e.g. 'green') are tk-dependent, but this can be worked 
around in the turtle module without requiring changes to tk.

--
components: Library (Lib)
messages: 249586
nosy: Al.Sweigart
priority: normal
severity: normal
status: open
title: Foreign language support in turtle module
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Christoph Gohlke

Christoph Gohlke added the comment:

> Do you know where that time is being spent?

The incremental linker.

> I'd guess it's probably O(N**2) with the number of obj file

Doesn't seem so. For example the pyrxp 2.1 package contains only 23 C files and 
takes minutes to link. Most packages compile and link reasonably fast.

--

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Steve Dower

Steve Dower added the comment:

It may be possible to dynamically link the Fortran library in a similar 
fashion, though it depends on what code the compiler generates. For Python's 
purposes, statically linking it probably isn't a bad idea.

I'll have to check out whether the FLS limitation still applies, but it seems 
likely. I wasn't aware of it.

--

___
Python tracker 

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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-02 Thread Cory Benfield

Cory Benfield added the comment:

Martin: as noted in the comments on this issue, I believed the specific test 
case did not match any of the problems people were encountering: it was just 
the least bad way to trigger the specific flow that was being encountered.

In practice for these issues it's likely some other error condition is 
involved. Regardless, Python 2.7 claims to support HTTP/0.9, which certainly 
allows for proxies to not send a status line, so the test case is a reasonable 
example of what should be supported by httplib.

I'll take another run at this patch to see if I can clean it up.

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Simpler test case, which might find a place somewhere like 
/Lib/test/test_memoryio.py:

>>> from io import BytesIO
>>> b = BytesIO()
>>> b.seek(1)
1
>>> b.readlines()  # Should return an empty list
Segmentation fault (core dumped)
[Exit 139]

The patch looks like the right approach. Just watch out for the indentation 
(tabs vs spaces).

However I don’t see why we need the GET_BYTES_SIZE() macro or the (size_t) 
casting. Would it be okay comparing PyBytes_GET_SIZE() directly to self->pos? 
They are both meant to be Py_ssize_t.

The bug looks like it was introduced by Serhiy’s changes in Issue 15381.

--
nosy: +martin.panter

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread John Leitch

John Leitch added the comment:

We based our fix on the check in write_bytes:

if (endpos > (size_t)PyBytes_GET_SIZE(self->buf)) {
if (resize_buffer(self, endpos) < 0)
return -1;
}

I see now that our casting was extraneous. As for the macro, it was suspected 
that similar issues may be present and we wanted to write reusable code, but 
this also seems unnecessary now that it's known the cast is unneeded.

Early tomorrow I'll take some time to create a revised patch.

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
priority: normal -> high
versions: +Python 3.6

___
Python tracker 

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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-02 Thread Cory Benfield

Cory Benfield added the comment:

Ok, new patch now attached.

--
Added file: http://bugs.python.org/file40328/readline_2.patch

___
Python tracker 

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



[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Okay so I take back my first proposal of restoring the filters in the test 
suite, which would bring us back to 
.

Also, my second proposal of setting a flag doesn’t look so easy either. The 
“_warnings” C module caches the filters list in a static variable between 
module reloads, so it is not so easy to keep a flag recording whether the 
“warnings” Python module needs to initialize it. I started on a patch, but 
discovered I would have to make uncomfortable changes to the C module.

So unless anyone has any better ideas, I think Alex’s patch is as good and 
practical enough. And yes Victor’s change does fix the other half of the 
problem.

--

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Christoph Gohlke

Christoph Gohlke added the comment:

I have now recompiled hundreds of Python packages and C/C++/Fortran libraries 
with the `/MT /GL /LTCG /NODEFAULTLIB:libucrt.lib ucrt.lib` flags. Many 
packages test OK, only few crashes.

Some more findings:

The /MT flag forces to also statically link the Intel Fortran runtime library.

Some libraries, e.g. OpenCV and Boost DLLs, can not be built with those flags 
(must be /MD).

Although most packages pass unittests (numpy, scipy, matplotlib, etc.), running 
real world scripts, Pandas unit tests, or simple scripts in IPython notebook, 
fail semi-randomly with "ImportError: DLL load failed: A dynamic link library 
(DLL) initialization routine failed". This is reproducible with Python 
3.5.0rc2, 64 and 32 bit, on Windows 10 and 7, 64 bit. It seems to be related to 
the number of extensions and DLLs loaded into the process. This needs more 
testing. Is there still a limit of how many DLLs, which are statically-linked 
to the CRT, can be loaded?




--

___
Python tracker 

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



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, can you check this Idle-Mac patch?

I presume the same code is used elsewhere.  It might be nice to encapsulate it 
sometime, though I am not sure where to put a context-bind function.

--
nosy: +ned.deily
stage:  -> patch review

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Larry, please pull @restart.diff into 3.5.0.  I have already applied it to 2.7, 
3.4, 3.5.1, and 3.6, so I will null merge from 3.5.0 into 3.5.1 and 3.6.

Reason.  Aside from Raymond's request above, I was reminded about a week ago 
that a) when Idle runs in one process, running a file from the editor does 
*not* cause a restart, and b) we might want to add the option to not restart 
even when running with two processes.  So I agree with Raymond that Idle should 
say RESTART (or the equivalent) when restarting the execution process and not 
say it when not, and that 3.5.0 should be consistent with other releases, and 
not make a change that is reverted in 3.5.1.

--
nosy: +benjamin.peterson, larry
priority: normal -> release blocker

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Brett :-)

--

___
Python tracker 

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



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

'Goto source line' works on Win7.  Show stackframe does not do anything that I 
can see, and seems perhaps redundant.

--

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Steve Dower

Steve Dower added the comment:

The FLS limit is definitely still there, and it still seems to be 127, which 
would explain the issues.

Best fix I have for this is to build with /MD and force vcruntimeXXX.dll to 
always be copied alongside builds. That will solve the installation issue and 
the DLL limit, at the cost of complicating licensing and bundling for packages. 
(The DLL *should* only be loaded once, even if it appears in multiple 
locations.)

I don't think this is necessarily a release blocker though. It may just be 
better for specific packages to do it - e.g. numpy could include whichever 
vcruntime DLL was used to at least satisfy all of its PYDs on any Python 
version. If someone happens to have matched builds of numpy/scipy/pandas (which 
seems fairly likely) and they're all /MD and bundle vcruntime then that's one 
FLS index for a decent number of DLLs.

A "better" solution might involve a pip extension that can detect which VC 
redist version is required when extracting a wheel and download/install it for 
the user (I considered proposing this closer to Python's core, but it really 
needs to be at download/install time and not load time).

Package distros and "packs" are likely to be in a position to distribute the 
dependencies they need and can avoid it. Unfortunately, I don't see a way to do 
that from core without effectively restricting the VC version for most people. 
Hopefully one day I'll get to deal with some easy problems... :)

--

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-02 Thread Zachary Ware

Zachary Ware added the comment:

As far as I can tell, this patch fixes the issue and doesn't break anything.  
Independent verification of that assertion would be lovely :)

For the record, I was able to reproduce the issue on one of the Windows Server 
2012 R2 machines after installing ICC 16.0.  Weirdly, after that installation, 
the problem reproduces with both ICC 15.0 and 16.0.  I'm not sure why it 
compiled with ICC 15.0 before installing 16.0, although guessing from what the 
16.0 installer was saying it replaced 15's VS 2015 integration with its own, so 
15's may have had some bug in this area.

--
keywords: +patch
priority: low -> normal
stage: test needed -> patch review
Added file: http://bugs.python.org/file40329/_decimal_fp_precise_pragma.diff

___
Python tracker 

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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

I still don’t think the test case is a reasonable example. According to 
, HTTP 0.9 only supported 
GET, not CONNECT, and doesn’t include any header fields in the protocol (such 
as your X-Foo: bar). It would make more sense to me to adjust the check at 
 to also 
check for version == "HTTP/0.9". That would probably eliminate the need to mess 
too much with the details of the LineAndFileWrapper class.

But if you wanted to parse the CONNECT response as a HTTP 0.9 response, I think 
you should not try to parse any header, because that will tend to skip over the 
start of the actual response.

Also, I assume the change to “configure” is unrelated.

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 69ea73015132 by Terry Jan Reedy in branch '2.7':
Issue #21192: Change 'RUN' back to 'RESTART' when running editor file.
https://hg.python.org/cpython/rev/69ea73015132

New changeset 130a3edcac1d by Terry Jan Reedy in branch '3.4':
Issue #21192: Change 'RUN' back to 'RESTART' when running editor file.
https://hg.python.org/cpython/rev/130a3edcac1d

--

___
Python tracker 

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



[issue24912] The type of cached objects is mutable

2015-09-02 Thread Nick Coghlan

Nick Coghlan added the comment:

I've reviewed the patch, and it looks good to me. Key additions:

* truly immutable types (instances of which may be cached) are now explicitly 
checked in the test suite to ensure they don't support __class__ assignment, 
even to a subclass

* the check for non-heaptypes in __class__ assignment has been restored, with a 
hardcoded whitelist to bypass that check. The only type on the whitelist for 
3.5 is PyModuleType.

Thus, this patch will also serve to protect any extension types that were 
relying on the non-heaptype check to prevent __class__ assignment.

The patch also includes a long block comment before the restored check for 
non-heap types that explains the history and links out to this issue.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric

David Unric added the comment:

This looks a bit inconsistent. See following version with "manual" getter 
definition:

class MyClass(object):
def __init__(self, *args, **kwargs):
# setting access to getter by attribute
# without use of property decorator
self.__dict__['myproperty'] = self._myproperty()

def __getattr__(self, name):
print('__getattr__ <<', name)
raise AttributeError(name)
return 'need know the question'

def _myproperty(self):
print(self.missing_attribute)
return 42

my_inst = MyClass()
print(my_inst.myproperty)

# Produces (expected) output
__getattr__ << missing_attribute
Traceback (most recent call last):
  File "a.py", line 55, in 
my_inst = MyClass()
  File "a.py", line 33, in __init__
self.__dict__['myproperty'] = self._myproperty()
  File "a.py", line 48, in _myproperty
print(self.missing_attribute)
  File "a.py", line 37, in __getattr__
raise AttributeError(name)
AttributeError: missing_attribute


I'd expect the original version using property decorator would behave the same 
way. Possible issue in property class implementation ?

--

___
Python tracker 

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



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9df8543d7bc by Yury Selivanov in branch '3.5':
Issue #24975: Fix AST compilation for PEP 448 syntax.
https://hg.python.org/cpython/rev/e9df8543d7bc

New changeset ea79be5b201e by Yury Selivanov in branch '3.5':
Merge 3.5 heads (issue #24975)
https://hg.python.org/cpython/rev/ea79be5b201e

New changeset 1dcd7f257ed8 by Yury Selivanov in branch 'default':
Merge 3.5 (issue #24975)
https://hg.python.org/cpython/rev/1dcd7f257ed8

--
nosy: +python-dev

___
Python tracker 

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



[issue24985] Python install test fails - OpenSSL - "dh key too small"

2015-09-02 Thread John Nagle

New submission from John Nagle:

Installing Python 3.4.3 on a new CentOS Linux release 7.1.1503 server.
Started with source tarball, did usual ./configure; make; make test
SSL test fails with "dh key too small".  See below.

OpenSSL has recently been modified to reject short keys, due to a security 
vulnerability. See
  http://www.ubuntu.com/usn/usn-2639-1/
and see here for an analysis of the issue on a Python install:
  http://www.alexrhino.net/jekyll/update/2015/07/14/dh-params-test-fail.html

Apparently the "dh512.pem" file in the test suite is now obsolete, because the 
minimum length dh key is now 768.

The question is, does this break anything else?  Google for "dh key too small" 
and various other projects report problems. 


==
ERROR: test_dh_params (test.test_ssl.ThreadedTests)
--
Traceback (most recent call last):
  File 
"/home/sitetruth/private/downloads/python/Python-3.4.3/Lib/test/test_ssl.   
py", line 2728, in test_dh_params
chatty=True, connectionchatty=True)
  File 
"/home/sitetruth/private/downloads/python/Python-3.4.3/Lib/test/test_ssl.   
py", line 1866, in server_params_test
s.connect((HOST, server.port))
  File "/home/sitetruth/private/downloads/python/Python-3.4.3/Lib/ssl.py", line 
   846, in connect
self._real_connect(addr, False)
  File "/home/sitetruth/private/downloads/python/Python-3.4.3/Lib/ssl.py", line 
   837, in _real_connect
self.do_handshake()
  File "/home/sitetruth/private/downloads/python/Python-3.4.3/Lib/ssl.py", line 
   810, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSL_NEGATIVE_LENGTH] dh key too small (_ssl.c:600)

--
Ran 99 tests in 12.012s

FAILED (errors=1, skipped=4)
test test_ssl failed
make: *** [test] Error 1

==

--
components: Installation
messages: 249566
nosy: nagle
priority: normal
severity: normal
status: open
title: Python install test fails - OpenSSL - "dh key too small"
versions: Python 3.4

___
Python tracker 

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



[issue23639] Not documented special names

2015-09-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Clarify documentation of __getinitargs__, __self__ on built-in 
functions is not as documented

___
Python tracker 

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



[issue14776] Add SystemTap static markers

2015-09-02 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue4111] Add Systemtap/DTrace probes

2015-09-02 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Larry Hastings

Larry Hastings added the comment:

Merged.  Please forward-merge to 3.5.1 and 3.6, thanks!

--

___
Python tracker 

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



[issue24986] It should be possible to build successfully without external libraries

2015-09-02 Thread Zachary Ware

Zachary Ware added the comment:

This also changes the behavior of the '-e' flag on build.bat a bit, leaving off 
'-e' means there will be no attempt to build the modules that require external 
sources even if the sources are already there.  Adding '-e' means building 
those modules will be attempted, subject to the '--no-' flags.

--

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-02 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

I'm attaching a patch to update the stdtypes.rst documentation according to our 
discussion. I've replaced the table explanation to "equivalent to adding s to 
itself n times" and added a link to the FAQ entry.

I'm not sure, however, where to put the FAQ link. Should it be directly in the 
table? In this patch, I've put it after the last line of note #2.

--
keywords: +patch
Added file: http://bugs.python.org/file40321/issue23406_doc_stdtypes.patch

___
Python tracker 

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



[issue22699] cross-compilation of Python3.4

2015-09-02 Thread William Scullin

Changes by William Scullin :


--
type: resource usage -> compile error

___
Python tracker 

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



[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks Nick and Larry for code reviews and merge!

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

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-02 Thread Larry Hastings

Larry Hastings added the comment:

Assigning to Brett, who has agreed to do the merge to 3.5.0 that Raymond has 
declined to do.

--
assignee: larry -> brett.cannon
nosy: +brett.cannon

___
Python tracker 

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



[issue23965] test_ssl failure on Fedora 22

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

test_ssl is still failing on Fedora 22. I updated Nick's patch (I worked on the 
default branch). With the patch, test_ssl pass. I didn't try it on other 
platforms.

--
nosy: +haypo
Added file: 
http://bugs.python.org/file40324/issue23965_handle_legacy_ssl_peers_disallowed-2.diff

___
Python tracker 

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



[issue23965] test_ssl failure on Fedora 22

2015-09-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

As I already said, patch looks fine assuming you've checked it doesn't break 
mainstream platforms :)

--

___
Python tracker 

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



[issue24986] It should be possible to build successfully without external libraries

2015-09-02 Thread Zachary Ware

New submission from Zachary Ware:

We do have the option of leaving out all extension modules 
("/p:IncludeExtensions=false"), but it would be nice to be able to build 
everything that doesn't require external libs.

This also be adds an option to skip only Tkinter (analogous to 
"/p:IncludeSSL=false"), as that's what I actually need at the moment :).  I'm 
not adding options for every external project individually, as most of them are 
not a big deal, but OpenSSL, Tcl/Tk/Tix, and (on 2.7) bsddb take a long time to 
compile and might be nice to leave out when they're not needed (so I also added 
the ability to leave out bsddb on 2.7).

Leaving out 3.4 as its project files are not amenable to this kind of change, 
and 3.4's days are numbered anyway.

--
assignee: zach.ware
components: Build, Windows
files: 2.7_external_build_handling.diff
keywords: patch
messages: 249567
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: It should be possible to build successfully without external libraries
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40322/2.7_external_build_handling.diff

___
Python tracker 

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



[issue24986] It should be possible to build successfully without external libraries

2015-09-02 Thread Zachary Ware

Changes by Zachary Ware :


Added file: http://bugs.python.org/file40323/3.5_external_build_handling.diff

___
Python tracker 

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



[issue24987] subprocess.Popen with shell=True doesn't create socket

2015-09-02 Thread asduj

New submission from asduj:

I want to run the next command

subprocess.Popen("soffice --accept='socket,host=localhost,port=8100;urp;'", 
shell=True)

to make soffice listen localhost:8100. It is work in python 2.7.9, but doesn't 
in python 3.4.3. I control it by

netstat -a | grep 8100

--
components: Library (Lib)
messages: 249576
nosy: asduj
priority: normal
severity: normal
status: open
title: subprocess.Popen with shell=True doesn't create socket
versions: Python 3.4

___
Python tracker 

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



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-02 Thread Mark Roseman

New submission from Mark Roseman:

Right menu button to invoke context menu (as well as alternative control-click) 
not set up correctly for Mac in the debugger. Patch attached.

--
components: IDLE
files: debug-mac-context-menu.patch
keywords: patch
messages: 249582
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: debugger context menus not working on Mac
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40325/debug-mac-context-menu.patch

___
Python tracker 

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



[issue24707] Assertion failed in pymonotonic_new

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4c90b4a4fffa by Victor Stinner in branch '3.5':
Issue #24707: Remove assertion in monotonic clock
https://hg.python.org/cpython/rev/4c90b4a4fffa

--
nosy: +python-dev

___
Python tracker 

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



[issue24987] subprocess.Popen with shell=True doesn't create socket

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Can you explain what is working in Python 2.7 that is not working in 3.4? Do 
you have an exception, error message, relevant netstat output, etc. What 
platform?

I don’t have Open Office on this computer, but I tried the following (Linux) 
command lines and both did what I expected:

"echo --accept='socket,host=localhost,port=8100;urp;'"
"sleep 3 && echo done"

--
nosy: +martin.panter
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue4322] function with modified __name__ uses original name when there's an arg error

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Issue 2786 currently proposes to pass __qualname__; if accepted that might also 
satisfy this report.

--
dependencies: +Names in function call exception should have class names, if 
they're methods
nosy: +martin.panter

___
Python tracker 

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



[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2015-09-02 Thread Georges Racinet

Georges Racinet added the comment:

Hi, I have the same symptoms and noticed by accident that you can somewhat 
workaround it by running pyvenv twice:

  pyvenv /path/to/env && pyvenv --system-site-packages /path/to/env

The first provides pip, the second does not destroy it.
At least this works on my Debian 8 installation

--
nosy: +gracinet

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Left some review comments. The positioning of the link to the FAQ entry seems 
sensible to me, just that the markup could be better :)

--
nosy: +martin.panter
stage: needs patch -> patch review
versions: +Python 3.6

___
Python tracker 

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



[issue24707] Assertion failed in pymonotonic_new

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

It occurred on more time on the same buildbot:
http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/2569/steps/test/logs/stdio

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patch and the archeological research. I made some minor grammar 
nitpicks in the code review.

Documentation typically gets applied to all the open branches. In this case 
3.4–3.6 should be applicable. Maybe 2.7 also if you are interested; it may need 
a modified patch though, with different notices about the versions things were 
introduced.

Sounds like most of these addresses were added in 2.4, so no need for a “New in 
version” notice unless you add a 2.7 doc patch. But it maybe be useful to 
mention that the BSD support was added in 3.2.

Regarding revision 23ab586c427a (“Renamed PyString to PyBytes”, 2008), I 
haven’t checked, but you will probably find that was made before Python 3 was 
released, so it is just one of those differences between Python 2 and 3.

--
nosy: +martin.panter
stage:  -> patch review
versions: +Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

Revision c1396d28c440 looks like it may help. Possibly with the 3.5+ 
assertWarns() half of the problem; I’ll have to have a closer look later.

--

___
Python tracker 

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



[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric

David Unric added the comment:

Thanks for the comprehensive response.

I did suspected the 2nd call is caused how it has been described in paragraph 
4. And you are probably right. Only think exception instance raised in 
__getattr__ should not lead to its another call but propagated to outer level, 
ie. should not get continue in getter in this example.

--

___
Python tracker 

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



[issue24983] Wrong AttributeError propagation

2015-09-02 Thread eryksun

eryksun added the comment:

> exception instance raised in __getattr__ should not lead 
> to its another call but propagated to outer level

In this case the next outer level is your descriptor implementation. You have 
to ensure it doesn't leak the AttrubuteError. Otherwise the associated 
__getattribute__ call is implicitly raising AttributeError, and [by design][1] 
Python must default to calling __getattr__.

[1]: https://docs.python.org/3/reference/datamodel.html#object.__getattribute__

--
nosy: +eryksun
stage:  -> resolved

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 59185ef69166 by Victor Stinner in branch 'default':
Issue #23517: test_time, skip a test checking a corner case on floating point
https://hg.python.org/cpython/rev/59185ef69166

--

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-02 Thread Stefan Krah

Stefan Krah added the comment:

Also note that ICC <= 11.0 did not handle __GNUC__ inline asm
correctly, see the comment:

  Modules/_decimal/libmpdec/umodarith.h:391

I've disabled asm for Linux/ICC in setup.py.


I don't know how the situation is with MASM inline asm, but I'd
recommend to test at least a couple of exact multiplications
and divisions with operands of about 10 digits (the asm is
only used for bignums).

There is already one bignum test in test_decimal that *should*
catch any oddities, but testing a bit more can't hurt.

--

___
Python tracker 

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



[issue24982] shutil.make_archive doesn't archive empty directories

2015-09-02 Thread R. David Murray

R. David Murray added the comment:

See also issue 22219.  I think we should fix this in shutil as well.

--
nosy: +r.david.murray, serhiy.storchaka
stage:  -> needs patch
versions: +Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Ashley Anderson

Ashley Anderson added the comment:

Haha, thanks Erik. It seems you know my tastes enough to not offer a 
chocolate-based reward. =)

I was actually set to "ping" to request a patch review today, as it's been one 
month since my last submission. Please let me know if I need to update the 
patch against the current `tip`.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

> The only remaining question is is it OK that we can specify more than one 
> host but only one port?  Guido, Victor?

I can be convenient to have a single Server object with *all* listening 
sockets. So I like the idea of supporting multiple ports. It's very cheap to 
support it.

--

___
Python tracker 

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



[issue24983] Wrong AttributeError propagation

2015-09-02 Thread Martin Panter

Martin Panter added the comment:

First of all, I think your a.py line 74 corresponds to the top-level print() 
call. My version of the output:

>>> print(my_inst.myproperty)
__getattr__ << missing_attribute
__getattr__ << myproperty
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in __getattr__
AttributeError: myproperty

This is a bit tricky, but I _think_ this is working as it is meant to. I think 
your central problem is an unhandled AttributeError is leaking:

1. Evaluating “my_inst.myproperty” invokes your myproperty() getter method.

2. That function tries to evaluate “self.missing_attribute”, which invokes your 
__getattr__() method.

3. __getattr__() raises AttributeError for “missing_attribute”.

4. myproperty() does not handle the AttributeError, so it leaks. I’m not sure 
if the documentation is clear on this, but a property getter raising 
AttributeError signals that the property attribute does not exist, even though 
this AttributeError was originally referring to “missing_attribute”.

5. Python thinks that the “myproperty” property doesn’t exist, so it falls back 
to __getattr__().

6. __getattr__() raises AttributeError for “myproperty”.

Hopefully that makes sense and you can see it is working somewhat sensibly :)

--
nosy: +martin.panter
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor

2015-09-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch for issue22995 disallows default pickling objects with tp_new == NULL.

--
nosy: +alexandre.vassalotti, pitrou, serhiy.storchaka

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df074eb2a5be by Victor Stinner in branch 'default':
Issue #23517: Try to fix test_time on "x86 Ubuntu Shared 3.x" buildbot
https://hg.python.org/cpython/rev/df074eb2a5be

--

___
Python tracker 

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



[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric

New submission from David Unric:

Hello,

it seems python interpreter improperly handles AttributeError exception raised 
in __getattr__ method, after called by unresolved attribute inside a property.

Bellow is a simple Python2 example of a class which defines __getattr__ method 
and a property, where is non-existing attribute accessed:

from __future__ import print_function

class MyClass(object):
def __getattr__(self, name):
print('__getattr__ <<', name)
raise AttributeError(name)
return 'need know the question'

@property
def myproperty(self):
print(self.missing_attribute)
return 42

my_inst = MyClass()
print(my_inst.myproperty)

# produces following output
__getattr__ << missing_attribute
__getattr__ << myproperty
Traceback (most recent call last):
  File "a.py", line 84, in 
main()
  File "a.py", line 74, in main
print('==', my_inst.myproperty)
  File "a.py", line 36, in __getattr__
raise AttributeError(name)
AttributeError: myproperty


By the documentation 
https://docs.python.org/2/reference/datamodel.html#object.__getattr__ , if 
class defines __getattr__ method, it gets called at AttributeError exception 
and should return a computed value for name, or raise (new) AttributeError 
exception.

The misbehavior is in 2nd call of __getattr__, with 'myproperty' as an argument.

- self.myproperty does exist, no reason to call __getattr__ for it
- AttributeError exception raised in __getattr__ should be propagated to the 
outer stack, no recurrence in the same

--
components: Interpreter Core
messages: 249533
nosy: dunric
priority: normal
severity: normal
status: open
title: Wrong AttributeError propagation
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The XDG standard seems to focus on desktop GUI applications and that's also 
where it's mostly used. Python has it's own installation scheme, which is 
documented at the top of sysconfig.py and which we've had ever since distutils 
became part of the stdlib.

For user installs, this bases all installations under the PYTHONUSERBASE dir, 
which defaults to ~/.local/ on Unix.

So user installs go into ~/.local/pythonX.X/ (I also have a 
~/.local/python/X.X/ - not sure where that came from).

Python also uses ~/.pypirc for PyPI, ~/.python-eggs for setuptools, 
~/.python_history for readline history.

The installation scheme currently doesn't define a dir for config files, only 
for "data" files, so adding one would probably be wise.

Since we already own ~/.local/pythonX.X/, why not put config files in there ?

For some extra Unix touch, we could use ~/.local/pythonX.X/etc/ and then move 
the cache bits to a ./var/ subdir (by defining another new "cache" entry for 
the schemes).

--

___
Python tracker 

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



[issue24297] Lib/symbol.py is out of sync with Grammar/Grammar

2015-09-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf7ef3bd9a09 by Victor Stinner in branch 'default':
Issue 24297: Fix test_symbol on Windows
https://hg.python.org/cpython/rev/bf7ef3bd9a09

--

___
Python tracker 

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



[issue24929] _strptime.TimeRE should not enforce range in regex

2015-09-02 Thread R. David Murray

R. David Murray added the comment:

A unit test in test_strptime.

--

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread Steve Dower

Changes by Steve Dower :


--
nosy: +steve.dower

___
Python tracker 

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



[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

Since the consensus on python-dev looks more to keep the provisional API for 
asyncion in Python 3.5, I propose to even modify Python 3.4 to not add too many 
"if python >= 3.5..." checks in asyncio source code.

If you really prefer to keep Python 3.4 unchanged, we should at least add the 
feature in Python 3.5.1, having to wait for Python 3.6 is too long, no?

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread Yury Selivanov

Yury Selivanov added the comment:

> I can be convenient to have a single Server object with *all* listening 
> sockets. So I like the idea of supporting multiple ports. It's very cheap to 
> support it.

I like the idea too, but I'm not sure how to redesign the function's signature 
to accept multiple hosts & ports.  We have a separate param for 'port', and 
this patch allows to pass an array of hosts in 'host' argument.  Should we 
allow passing an array of (host, port) tuples in 'host' with 'None' in 'port'?  
This would be one ugly method...

> Since the consensus on python-dev looks more to keep the provisional API for 
> asyncion in Python 3.5, I propose to even modify Python 3.4 to not add too 
> many "if python >= 3.5..." checks in asyncio source code.

asyncio is provisional in 3.4 (and now in 3.5 too), so we can just keep 
updating it in bugfix releases.

> If you really prefer to keep Python 3.4 unchanged, we should at least add the 
> feature in Python 3.5.1, having to wait for Python 3.6 is too long, no?

This was before we reinstated asyncio as provisional in 3.5.

But before committing this change, let's agree if we want this API to accept 
multiple ports when you specify more than one host.

We also need to create a dev branch on github/asyncio, so that it's easier for 
us to sync PyPI package with CPython releases.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread Yann Sionneau

Yann Sionneau added the comment:

About the function's signature to accept multiple hosts & ports, we could 

- accept host and port arguments being sequences and then we bind to all 
host:port combinations. Like if len(host) == N and len(port) == M, we bind to 
N*M sockets.

or

- accept host and port arguments being sequences and allow repetitions and bind 
to host:port couples from zip(host, port).

I think the first is "clean", but the second allows more flexibility.
Like for instance binding to IP1:port1 IP2:port2 but not IP1:port2

--

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread flying sheep

flying sheep added the comment:

hi mark, i’ve just lengthily replied to you on python-ideas.

in short: nope! many command line tools that are relatively new (among them 
your examples git and pip) honor the specs, my ~/.cache, ~/.config, and 
~/.local/share is full of things belonging to libraries, cli tools, my DE, and 
of course also GUI applications.

please let’s continue this discussion on python-ideas if you’re still not 
convinced ☺

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

> Let's not extend the API with support for multiple ports. Nobody has asked 
> for it, and clearly the API design is not so simple.

Ok. Anyway, the user of the API call call create_server() multiple times, even 
with the current code. So it's fine.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread STINNER Victor

STINNER Victor added the comment:

"So I like the idea of supporting multiple ports. It's very cheap to support 
it."

Oh, I had an example in my head: listening on tcp/80 for HTTP and tcp/443 for 
HTTPS... but it doesn't work. The problem is that the proposed API doesn't 
allow to specify a protocol factory per port. For such use case, you have to 
handle multiple servers.

Anyway, I still like the idea of listening to multiple hosts and/or multiple 
ports. It's a common requirement to start a server.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Let's not extend the API with support for multiple ports. Nobody has asked for 
it, and clearly the API design is not so simple.

--

___
Python tracker 

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




[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread Yury Selivanov

Yury Selivanov added the comment:

> - accept host and port arguments being sequences and then we bind to all 
> host:port combinations. Like if len(host) == N and len(port) == M, we bind to 
> N*M sockets.

I can't think of a real life example for this.  But if you need that, you can 
always implement that on top of function that accepts multiple (host,port) 
pairs.

> - accept host and port arguments being sequences and allow repetitions and 
> bind to host:port couples from zip(host, port).

I'm not sure I like this either.  This breaks one value `(h,p)` into two 
values, and passes them in separate collections to separated arguments.  Too 
complex.

My proposal is to allow the following:

   create_server(protofac, [(h1,p1),(h2,p2)])

--

___
Python tracker 

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