[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

self.raw_requestline is read from self.rfile:

self.raw_requestline = self.rfile.readline(65537)

self.rfile is either socket stream

self.rfile = self.connection.makefile('rb', self.rbufsize)

or in-memory bytes stream

self.rfile = BytesIO(self.packet)

In both cases it is binary stream and produces bytes. I don't see a bug in the 
stdlib, it can be a bug in user code which sets self.rfile or 
self.raw_requestline to invalid value.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-19 Thread Georg Brandl

Changes by Georg Brandl :


--
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as globals in setup_context() is NULL. I suppose it is 
PyThreadState_Get()->interp->sysdict. interp->sysdict is cleared in 
PyInterpreterState_Clear(). Other code is executed after setting 
interp->sysdict to NULL (clearing interp->sysdict content, interp->builtins, 
interp->builtins_copy and interp->importlib) and this potentially can emit 
warnings.

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue19720] suppress context for some exceptions in importlib?

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, suppressing context was introduced for such cases.

Here is a patch.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch -> patch review
Added file: http://bugs.python.org/file37226/importlib_suppress_context.patch

___
Python tracker 

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



[issue19867] pickletools.OpcodeInfo.code is a string

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But isn't it is backward incompatible change?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2014-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +Python 2.7, 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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +dstufft, eric.araujo
stage:  -> needs patch

___
Python tracker 

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



[issue20296] PyArg_ParseTuple 2.X docs mention int for "t#", but "Py_ssize_t" for "w#", etc.

2014-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +easy
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-11-19 Thread Carlos Ralli

Carlos Ralli added the comment:

Is it possible to use this patch for python2.7 ?

--
nosy: +Carlos.Ralli

___
Python tracker 

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



[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-11-19 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

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



[issue22696] Add a function to know about interpreter shutdown

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

An indirect way how to know about interpreter shutdown -- test existing of the 
path attribute in sys (issue20603).

--

___
Python tracker 

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



[issue22515] Implement partial order on Counter

2014-11-19 Thread Ram Rachum

Ram Rachum added the comment:

Hi everyone,

Just wanted to follow up here that I've created my own dedicated bag class.

Documentation: https://combi.readthedocs.org/en/stable/bags.html

Install using `pip install combi`

It's packed with features. There are a ton of arithmetic operations defined and 
the comparisons methods we talked about in this issue. There are also frozen 
and ordered variants.

--

___
Python tracker 

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



[issue20604] Missing invalid mode in error message of socket.makefile.

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your patch Franck. But it would be more useful to output all mode 
argument, not only wrong character. And it should be wrapped in a tuple to 
prevent subtle formatting error.

--
nosy: +serhiy.storchaka
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue20604] Missing invalid mode in error message of socket.makefile.

2014-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
type: enhancement -> behavior

___
Python tracker 

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



[issue20604] Missing invalid mode in error message of socket.makefile.

2014-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 34c7be03259b by Serhiy Storchaka in branch '3.4':
Issue #20604: Added missed invalid mode in error message of socket.makefile().
https://hg.python.org/cpython/rev/34c7be03259b

New changeset d5b36edeecdb by Serhiy Storchaka in branch 'default':
Issue #20604: Added missed invalid mode in error message of socket.makefile().
https://hg.python.org/cpython/rev/d5b36edeecdb

--
nosy: +python-dev

___
Python tracker 

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



[issue21872] LZMA library sometimes fails to decompress a file

2014-11-19 Thread Peter

Changes by Peter :


--
nosy: +maubp

___
Python tracker 

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



[issue20604] Missing invalid mode in error message of socket.makefile.

2014-11-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage:  -> 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



[issue1294959] Problems with /usr/lib64 builds.

2014-11-19 Thread Piotr Dobrogost

Changes by Piotr Dobrogost :


--
nosy: +piotr.dobrogost

___
Python tracker 

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



[issue19949] Explicitly skip or mask skipped/disabled tests in test_xpickle

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping. I had added comments on Rietveld.

--

___
Python tracker 

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



[issue20736] test_socket: testSendmsgDontWait needlessly skipped on Linux

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> commit review
versions:  -Python 3.3

___
Python tracker 

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



[issue20736] test_socket: testSendmsgDontWait needlessly skipped on Linux

2014-11-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fb06c8ccfd41 by Serhiy Storchaka in branch '3.4':
Issue #20736: testSendmsgDontWait in test_socket no longer skipped on Linux.
https://hg.python.org/cpython/rev/fb06c8ccfd41

New changeset 23ab1197df0b by Serhiy Storchaka in branch 'default':
Issue #20736: testSendmsgDontWait in test_socket no longer skipped on Linux.
https://hg.python.org/cpython/rev/23ab1197df0b

--
nosy: +python-dev

___
Python tracker 

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



[issue20736] test_socket: testSendmsgDontWait needlessly skipped on Linux

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report and patch David.

--
resolution:  -> fixed
stage: commit 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



[issue20885] Little Endian PowerPC64 Linux

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

libffi was updated to v3.1 in issue22176. This release adds support for the 
Linux AArch64 and POWERPC ELF ABIv2 little endian architectures.

--
nosy: +serhiy.storchaka
resolution:  -> out of date

___
Python tracker 

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



[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you provide tests?

--
assignee:  -> serhiy.storchaka
nosy: +pje, serhiy.storchaka
stage:  -> test needed

___
Python tracker 

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



[issue22900] decimal.Context Emin, Emax limits restrict functionality without adding benefits

2014-11-19 Thread Jure Erznožnik

New submission from Jure Erznožnik:

At some point since Python 2.7, the EMin, Emax members got more restrictive 
bounds. Emin cannot go above 0 and Emax cannot go below 0.

I would argue against this logic:
.prec specifies total precision
.Emin and .Emax effectively limit possible locations of decimal point within 
the given precision. Since they don't specify / enforce EXACT position of the 
decimal point, what's the point of limiting them?

Without restrictions, setting Emin = Emax = some positive number effectively 
restricts number of decimal places to exactly that positive number without a 
need for separate (and expensive) .quantize() calls.

Removing this restriction provides an option to use decimal as true fixed-point 
arithmetic.

--
components: Extension Modules
messages: 231374
nosy: Jure.Erznožnik
priority: normal
severity: normal
status: open
title: decimal.Context Emin, Emax limits restrict functionality without adding 
benefits
type: behavior
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



[issue22900] decimal.Context Emin, Emax limits restrict functionality without adding benefits

2014-11-19 Thread Nick Coghlan

Nick Coghlan added the comment:

I would expect this to be a difference between the original pure Python 
implementation and the current C accelerated implementation.

The constraint is in alignment with the General Decimal Arithmetic 
Specification that the decimal module aims to implement, which requires that 
Emin and Emax define a balanced range about zero. (That is, Emin = -Emax +/- 1)

The fact the pure Python implementation didn't enforce that constraint was an 
implementation detail - other implementations (including the cdecimal module, 
which was incorporated into the standard library to provide CPython's C 
accelerated version in Python 3.3) are free to enforce it.

--
nosy: +ncoghlan, skrah
resolution:  -> not a bug
stage:  -> 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



[issue17852] Built-in module _io can loose data from buffered files at exit

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In 3.4+ the example script always writes string "bar" to file "foo". Tested by 
running it in a loop hundreds times. Cleaning up at shutdown was enhanced in 
3.4.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-11-19 Thread Carlos Ralli

Carlos Ralli added the comment:

Sorry, I've got nothing. Did you forget the attachment or mail body ?

2014-11-19 11:08 GMT+01:00 Berker Peksag :

>
> Changes by Berker Peksag :
>
>
> --
> nosy: +berker.peksag
> stage:  -> patch review
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue20885] Little Endian PowerPC64 Linux

2014-11-19 Thread Berker Peksag

Berker Peksag added the comment:

Can we close this and issue22176 then?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-11-19 Thread R. David Murray

R. David Murray added the comment:

Andreas: I would prefer to avoid a dependency on the ipaddress module.  I would 
suggest adding an address_family constructor argument that defaults to None, 
where a value of None would mean "just pass the server_address to bind (or 
getaddrinfo?) and find out what the resulting family is".  I'm not exactly a 
socket programming expert, though, so there may be a reason I'm not aware of 
that that won't work well.

Carlos: no, this is a new feature, so it can go into 3.5 only at this point.

--

___
Python tracker 

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 Thread bru

New submission from bru:

`test.test_uuid.test_find_mac` relies on `ifconfig` binary presence, which is 
on its way out. This makes the test fail on more and more Linux installations.
Using `env` (for example) is more reliable. `ip` could also be used since it's 
the replacement to `ifconfig`, but an always-present binary such as `env` makes 
it work in all cases.
This is what the (trivial) patch does.

The same reasoning applies to `uuid.getnode`: if 'Unix dll' source is not 
available it will try to get a MAC address 'ifconfig' which will fail, and the 
fallback will be `_random_getnode` (but that's another issue).

--
components: Tests
files: fix_uuid_find_mac_test.patch
keywords: patch
messages: 231380
nosy: bru
priority: normal
severity: normal
status: open
title: test.test_uuid.test_find_mac fails because of `ifconfig` deprecation
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file37227/fix_uuid_find_mac_test.patch

___
Python tracker 

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

It would be nice to switch to "ip link". The ip command became the new standard 
on Linux. I don't know if the ip command is available on other operating 
systems.

--

___
Python tracker 

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



[issue22902] Use 'ip' for uuid.getnode()

2014-11-19 Thread bru

New submission from bru:

Only linux, `uuid.getnode()` will use the Unix ddl, then ifconfig, then random. 
`ifconfig` is disappearing in favour of `ip` (from iproute2), which should be 
used.
This patch ads `_ip_getnode` getter to `uuid.getnode()`

--
components: Library (Lib)
files: uuid_find_mac_with_ip.patch
keywords: patch
messages: 231382
nosy: bru
priority: normal
severity: normal
status: open
title: Use 'ip' for uuid.getnode()
versions: Python 3.4
Added file: http://bugs.python.org/file37228/uuid_find_mac_with_ip.patch

___
Python tracker 

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 Thread bru

bru added the comment:

According to http://en.wikipedia.org/wiki/Iproute2 "ip" is Linux-only.
I opened an issue with a patch that brings "ip link list" to "uuid.getnode()": 
http://bugs.python.org/issue22902

--

___
Python tracker 

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



[issue22902] Use 'ip' for uuid.getnode()

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

IMO such change can wait for Python 3.5.

--
nosy: +haypo, serhiy.storchaka
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

(Only Python 2.7, 3.4 and 3.5 accepted bug fixes; other versions only accept 
security fixes.)

--
versions:  -Python 3.2, Python 3.3, Python 3.6

___
Python tracker 

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



[issue20885] Little Endian PowerPC64 Linux

2014-11-19 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue19720] suppress context for some exceptions in importlib?

2014-11-19 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue17852] Built-in module _io can loose data from buffered files at exit

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Is anyone interested to work on the "maintain a list of open file objects" idea?

I consider that Python 3 does its best to flush data at exit, but it's not a 
good practice to rely on the destructors to flush data. I mean, there is no 
warranty that files will be written in the correct order and that files will 
stay consistent. It's much safer to explicitly call the clode() method.

By the way, Python 3 now emits ResourceWarning warnings when files are 
destroyed without being explicitly closed. I enhanced the code handling 
warnings during Python shutdown to show these warnings in more use cases, but 
it is still not perfect. I opened the issue #21788 as a reminder that the code 
can still be enhanced.

For the "maintain a list of objects" idea, I expect race conditions with 
threads, signals and processes (fork). We already have known issues with locks 
+ fork. I expect even more issues if we maintain a list of open files.

I propose to close the issue as "wontfix". Python 3 does its best, but please 
call explicitly the close() method!

Maybe the undefined behaviour should be documented (with a warning?) in the 
buffered writer of the io module, and maybe also in the open() function?

--

___
Python tracker 

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



[issue20296] PyArg_ParseTuple 2.X docs mention int for "t#", but "Py_ssize_t" for "w#", etc.

2014-11-19 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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-19 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

How the test fail? Could you provide test output?

--

___
Python tracker 

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



[issue22902] Use 'ip' for uuid.getnode()

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--

___
Python tracker 

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

It looks like the problem is that raising the PyExc_RecursionErrorInst 
singleton creates a traceback object which contains frames. The singleton keeps 
the frames alive longer than expected.

I tried to write a script to raise this singleton, but it looks like the local 
variables of the frames are not deleted, even if frames are deleted (by 
_PyExc_Fini).

You may try to finish my attached runtimerror_singleton.py script.

--
Added file: http://bugs.python.org/file37229/runtimerror_singleton.py

___
Python tracker 

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I also wrote a draft of patch fixing the issue, but I was unable to 
reproduce the issue. See attached warn.patch (not tested).

--
keywords: +patch
Added file: http://bugs.python.org/file37230/warn.patch

___
Python tracker 

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



[issue17852] Built-in module _io can loose data from buffered files at exit

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm +1 on closing this. Agree with Charles-François that it's never been 
guaranteed by the Python specification. Pythonic way to work with files is to 
use the "with" statement, or, if you need long living file stream, careful 
close files in the "finally" block or in __exit__ method of some class which is 
used as context manager. Non-observance of this rule can be considered as a bug 
(see issue22831).

--

___
Python tracker 

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



[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

You should only add the filename if the error if a FileNotFound exception, not 
for any OSError, and only if exec() was called. It looks like the variable 
child_exec_never_called indicates if exec() was called.

--
nosy: +haypo

___
Python tracker 

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-19 Thread bru

bru added the comment:

I realize that I was not working against the tip... The patch I offered does 
not apply since revision 88068, which fixes the test by skipping it when 
"ifconfig" isn't available. Therefore this issue is invalid.

However I think that "test_find_mac" should always should not be skipped but 
use any other binary instead.


(Context: I'm trying to start contributing by fixing tests/'easy' bugs; I 
should have updated by cpython repo beforehand...)

--

___
Python tracker 

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



[issue22825] Modernize TextFile

2014-11-19 Thread Éric Araujo

Éric Araujo added the comment:

Thank you for your effort!  Note that distutils uses try:... finally: 
fp.close(), so it tries to avoid the FD leak issues.

--

___
Python tracker 

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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Éric Araujo

Éric Araujo added the comment:

Does this cause a warning to be printed out when it should not?  Or did you 
find this by reading the code?

[I think I remember this code being changed in the (now defunct) distutils2 
project.]

--
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

The former. I copy/pasted the code block to show from where the warning message 
was being printed.

--

___
Python tracker 

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



[issue19949] Explicitly skip or mask skipped/disabled tests in test_xpickle

2014-11-19 Thread Zachary Ware

Zachary Ware added the comment:

Sorry, I haven't had a chance to get back to this one.

--

___
Python tracker 

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



[issue22903] unittest creates non-picklable errors

2014-11-19 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Just got this:

_pickle.PicklingError: Can't pickle : attribute lookup ModuleImportFailure on 
unittest.loader failed

unittest should use regular exception classes instead.

--
messages: 231398
nosy: ezio.melotti, michael.foord, pitrou, rbcollins
priority: normal
severity: normal
status: open
title: unittest creates non-picklable errors
versions: 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



[issue22903] unittest creates non-picklable errors

2014-11-19 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue22903] unittest creates non-picklable errors

2014-11-19 Thread R. David Murray

R. David Murray added the comment:

They aren't "real" exceptions, though, if I understand correctly.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread Akira Li

Akira Li added the comment:

It would be inconsitent to provide filename only if exec is called e.g.:

   >>> import subprocess
   subprocess.call("not used", cwd="nonexistent")
   FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent'

The error message shows the filename (cwd) despite exec not being 
called therefore it would be logical to provide non-None `filename` 
attribute here too.

If we ignore the backward compatibility issue I've mentioned in msg231297 
then the current code:

if errno_num == errno.ENOENT:
if child_exec_never_called:
# The error must be from chdir(cwd).
err_msg += ': ' + repr(cwd)
else:
err_msg += ': ' + repr(orig_executable)
raise child_exception_type(errno_num, err_msg)

could be replaced with:

if errno_num == errno.ENOENT:
if child_exec_never_called:
# The error must be from chdir(cwd).
filename = cwd
else:
filename = orig_executable
raise child_exception_type(errno_num, err_msg, 
filename)
raise child_exception_type(errno_num, err_msg)


[1] https://hg.python.org/cpython/file/23ab1197df0b/Lib/subprocess.py#l1443

--

___
Python tracker 

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



[issue22904] make profile-opt fails to update _sysconfigdata.py during the rebuild

2014-11-19 Thread Gregory P. Smith

New submission from Gregory P. Smith:

1) Checkout a 3.4 tree.  Mine was at revision d244e1770f1b.
2) ./configure
3) make -j14 profile-opt
4) ./python -m test.regrtest -v test_distutils

FAIL: test_sysconfig_module (distutils.tests.test_sysconfig.SysconfigTestCase)
--
Traceback (most recent call last):
  File "/.../oss/cpython/3.4/Lib/distutils/tests/test_sysconfig.py", line 131, 
in test_sysconfig_module
sysconfig.get_config_var('CFLAGS'))
AssertionError: '-Wno[38 chars] -Wall -Wstrict-prototypes  -fprofile-use 
-fprofile-correction' != '-Wno[38 chars] -Wall -Wstrict-prototypes'

This can be traced to the built _sysconfigdata.py file which contains the 
command line passed CFLAGS from the build_all_use_profile target's sub-make vs 
the distutils.sysconfig module's Makefile parsing which finds the PY_CFLAGS 
value from the Makefile itself.

One of either stripping the profile-opt related flags out when generating 
_sysconfigdata.py or explicitly generating a good _sysconfigdata.py file 
outside of the sub-make's with the profiling generate or use flags seems like a 
good idea.  The latter is likely easier; just regenerate _sysconfigdata.py 
after the sub-make.

--
assignee: gregory.p.smith
messages: 231401
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: make profile-opt fails to update _sysconfigdata.py during the rebuild
type: behavior
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



[issue22904] make profile-opt fails to update _sysconfigdata.py during the rebuild

2014-11-19 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Should _sysconfigdata.py contain these flags for reference, implying that it is 
this test or distutils.sysconfig implementation which is really wrong?

--

___
Python tracker 

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



[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

2014-11-19 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
title: make profile-opt fails to update _sysconfigdata.py during the rebuild -> 
make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

___
Python tracker 

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



[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

2014-11-19 Thread Gregory P. Smith

Gregory P. Smith added the comment:

attaching a proposed workaround in the unittest.

--
keywords: +patch
Added file: 
http://bugs.python.org/file37231/issue22904-test-workaround-gps01.diff

___
Python tracker 

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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Éric Araujo

Éric Araujo added the comment:

Can you give us steps to reproduce the issue?

--

___
Python tracker 

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



[issue7427] BadStatusLine is hell to debug

2014-11-19 Thread Martin Panter

Martin Panter added the comment:

As far as I can tell, the “line” attribute isn’t documented anyway. But Issue 
8450 is opened about improving the exception when the connection is closed.

--
nosy: +vadmium

___
Python tracker 

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



[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Joe Julian

Changes by Joe Julian :


--
nosy: +Joe.Julian

___
Python tracker 

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



[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2014-11-19 Thread Martin Panter

Martin Panter added the comment:

I suggest this is the same situation as Issue 6785, and is not a bug in Python. 
However it might be reasonable to allow forcing a HTTP client connection to 
version 1.0, which could be used as a workaround.

--

___
Python tracker 

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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

I don't have access to the code anymore that repro'ed this issue. I just 
remember writing a setup script for a module I was working on, and when 
'install' was run, it would print this error message.

It's pretty easy to see in code what the problem is though. In install_data.py, 
warn_dir is set to '1' in initialize_options(), but it's value is never 
altered. So regardless of what is or isn't passed in, the warning will always 
be printed.

--

___
Python tracker 

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



[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Dan Mick

Dan Mick added the comment:

Hi; I'm the original author of the code in the Ceph CLI.  

The reason it does what it does is that the Python CLI calls into librados 
(Ceph, through ctypes) to connect to the cluster; that connection can block for 
various reasons, so it's spawned in a thread; after a timeout or ^C, we desire 
to exit, but if we've got a non-daemon thread stuck in Ceph, and no way to 
cancel it from the threading module, sys.exit() will also block waiting for the 
Ceph thread to finally give up.  If, however, we set that thread as a daemon 
thread, it doesn't block the sys.exit() (that being, I thought, the whole point 
of daemon threads).

I confess I don't fully understand the change in 7741d0dd66ca, but it does seem 
to have the side effect of not actually allowing exit while there are 
outstanding daemon threads not hitting Python.

--
nosy: +dmick

___
Python tracker 

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



[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Joe Julian

Joe Julian added the comment:

I suspect the underlying problem is that the fix expects the daemon threads to 
hit a point where they try to acquire the GIL and that's not going to happen 
with these librados threads; they stay in librados.

--

___
Python tracker 

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



[issue8450] httplib: false BadStatusLine() raised

2014-11-19 Thread Martin Panter

Martin Panter added the comment:

See also Issue 3566, which also brings up the false BadStatusLine exception, 
and suggests some kind of retry logic.

Whatever exception it is, it could be documented better. In Issue 66621, the 
poster thought it should be an IncompleteRead exception.

--
nosy: +vadmium

___
Python tracker 

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



[issue8450] httplib: false BadStatusLine() raised

2014-11-19 Thread Martin Panter

Martin Panter added the comment:

Sorry the IncompleteRead reference was meant to be Issue 666219

--

___
Python tracker 

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



[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2014-11-19 Thread Martin Panter

Martin Panter added the comment:

I don’t think the peek hack needs to go into to the standard library. It is 
just a workaround for code using the current library, to differentiate an empty 
status line due to EOF from any other kind of “bad” status line. This is what 
Issue 8450, “False BadStatusLine” is about.

--

___
Python tracker 

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



[issue22905] Returned mail: see transcript for details

2014-11-19 Thread Ned Deily

Changes by Ned Deily :


Removed file: http://bugs.python.org/file37232/readme.exe

___
Python tracker 

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



[issue22905] Returned mail: see transcript for details

2014-11-19 Thread Ned Deily

Changes by Ned Deily :


--
Removed message: http://bugs.python.org/msg231412

___
Python tracker 

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



[issue22905] spam

2014-11-19 Thread Ned Deily

Changes by Ned Deily :


--
nosy:  -glynnc
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
title: Returned mail: see transcript for details -> spam

___
Python tracker 

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



[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-19 Thread STINNER Victor

STINNER Victor added the comment:

I wnated to say that args[0] is not the right filename if exec() was not
called. Yes, there is also cwd for example. The logic to choose the
filename should be done in the child.

--

___
Python tracker 

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