[issue25201] lock of multiprocessing.Value is not a keyword-only argument

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

I’m not familiar with this module, but I believe “lock” is indeed keyword-only. 
If you were to try a positional argument, it would be picked up as part of 
*args:

>>> multiprocessing.Value("I")  # Default to 0, lock=True

>>> multiprocessing.Value("I", False)  # False == 0, still lock=True

>>> multiprocessing.Value("I", lock=False)
c_uint(0)

--
nosy: +martin.panter

___
Python tracker 

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



[issue25190] Define StringIO seek offset as code point offset

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

I see the _pyio implementation wraps BytesIO with UTF-8 encoding. Perhaps it 
would be okay to change to UTF-32 encoding (a fixed-length Unicode encoding). 
That would use more memory, but the C implementation seems to use a Py_UCS4 
buffer already. Then you could reimplement seek(), tell(), and truncate() by 
detaching and rebuilding the TextIOWrapper over the top. Not super efficient, 
but perhaps that does not matter for the _pyio implementation.

The fact that it is so hard to do this (random write access to a large Unicode 
buffer) in native Python could be another argument to support this in the 
default StringIO implementation :)

--

___
Python tracker 

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



[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

I don't care so much of issues introduced by LibreSSL, I don't understand why 
they broke the API. For me, it doesn't seem right to have a version different 
if it's a number or if it's a string: OPENSSL_VERSION_NUMBER should be 
consistent with OPENSSL_VERSION_INFO.

If you propose a patch for Python and it fixes test_ssl, I will apply it :-)

--

___
Python tracker 

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



[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f13a5b5a2824 by Victor Stinner in branch '3.4':
Issue #25138: test_socket.test_idna() uses support.transient_internet() instead
https://hg.python.org/cpython/rev/f13a5b5a2824

New changeset a7baccf0b1c2 by Victor Stinner in branch '3.5':
Merge 3.4 (test_socket, issue #25138)
https://hg.python.org/cpython/rev/a7baccf0b1c2

New changeset d8dd06ab00e4 by Victor Stinner in branch 'default':
Merge 3.5 (test_socket, issue #25138)
https://hg.python.org/cpython/rev/d8dd06ab00e4

--
nosy: +python-dev

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Technically, I think that it's possible to put bytes in an URL using %HH 
format. I didn't check if we can retrieve the "raw bytes".

--
nosy: +haypo

___
Python tracker 

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



[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Nick Coghlan added the comment:
> +1 - after the further discussion, addressing this downstream as a patch 
> specifically to the pthread backend sounds good to me.

Cool, I like when we agree :-)

@Flavio Grossi: Sorry for you, but it's time to upgrade to Python 3.
Twisted made great progress on Python 3 support. For Apache Thrift,
maybe you can help them to port the library to Python 3?

--

___
Python tracker 

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



[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

> Looking at this more closely, the check seems to be there just to check if 
> basic DNS lookups are working. It was added for Issue 12804. One option might 
> be to replace it with a support.transient_internet() handler: (...)

Oh good idea. This context manager sets also a timeout to 30 seconds which can 
help to skip the test only platforms with flacky internet connections.

By the way, I also saw the test failing randomly on the Windows 8.1 buildbot. I 
hope that support.transient_internet() will also skip the tes on this case.

I close the issue since the initial issue is fixed.

Thanks Martin for the hint ;)

--
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



[issue25118] OSError in os.waitpid() on Windows [3.5.0 regression]

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +3.5regression

___
Python tracker 

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



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +3.5regression

___
Python tracker 

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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +3.5regression

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +3.5regression

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

Seems to be caused by the Python directory being non-decodable; the current 
working directory does not matter. What is going on is “pydoc” is trying to 
make a link to a module’s source code, such as

/usr/lib/python3.4/pydoc.py

For non-decodable paths, the following would work in Firefox:

/home/serhiy/py/cpy�thon-3.5/Lib/pydoc.py

but since URL percent encoding already uses UTF-8, this scheme isn’t foolproof 
(e.g. a UTF-8 sequence when the locale is ASCII would be ambiguous). A simpler 
and more consistent way forward would be an error handler substituting 
something like this, decoding the surrogate escape code with the “replace” 
handler, with the HTML link suppressed:

/home/serhiy/py/cpy�thon-3.5/Lib/pydoc.py (invalid filename encoding)

--
nosy: +martin.panter

___
Python tracker 

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



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-21 Thread Stefan Behnel

Stefan Behnel added the comment:

LGTM

--
nosy: +scoder

___
Python tracker 

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



[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +3.5regression

___
Python tracker 

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



[issue16893] Generate Idle help from Doc/library/idle.rst

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 855484b55da3 by Terry Jan Reedy in branch '2.7':
Issue #16893: Add idlelib.help.copy_strip() to copy-rstrip Doc/.../idle.html.
https://hg.python.org/cpython/rev/855484b55da3

New changeset df987a0bc350 by Terry Jan Reedy in branch '3.4':
Issue #16893: Add idlelib.help.copy_strip() to copy-rstrip Doc/.../idle.html.
https://hg.python.org/cpython/rev/df987a0bc350

New changeset f08437278049 by Terry Jan Reedy in branch '3.5':
Issue #16893: Add idlelib.help.copy_strip() to copy-rstrip Doc/.../idle.html.
https://hg.python.org/cpython/rev/f08437278049

New changeset 09ebed6a8cb8 by Terry Jan Reedy in branch 'default':
Issue #16893: Add idlelib.help.copy_strip() to copy-rstrip Doc/.../idle.html.
https://hg.python.org/cpython/rev/09ebed6a8cb8

--

___
Python tracker 

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



[issue25201] lock of multiprocessing.Value is not a keyword-only argument

2015-09-21 Thread Berker Peksag

Berker Peksag added the comment:

I didn't test it carefully. It was a mistake on my part :) But I think the 
function signature could be clearer by changing that part to "*, lock=True".

--
resolution:  -> not a bug
stage: needs patch -> 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



[issue25210] Special-case NoneType() in do_richcompare()

2015-09-21 Thread Ezio Melotti

New submission from Ezio Melotti:

do_richcompare() has a comment (at Objects/object.c:689) that reads:

/* XXX Special-case None so it doesn't show as NoneType() */

This refers to the following error message:

>>> 3 < None
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unorderable types: int() < NoneType()

This is a common error that comes up while ordering/sorting, and NoneType() is 
potentially confusing, so I find the request reasonable.
If the consensus is favourable, it should be implemented, if not, the comment 
should be removed.

--
components: Interpreter Core
keywords: easy
messages: 251288
nosy: ezio.melotti
priority: low
severity: normal
stage: test needed
status: open
title: Special-case NoneType() in do_richcompare()
type: enhancement
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



[issue24841] Some test_ssl network tests fail if svn.python.org is not accessible.

2015-09-21 Thread Berker Peksag

Berker Peksag added the comment:

The attached patch should fix the test failures.

--
keywords: +patch
stage: needs patch -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file40542/issue24841.diff

___
Python tracker 

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



[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2cf85e2834c2 by Victor Stinner in branch 'default':
Issue #24870: Reuse the new _Py_error_handler enum
https://hg.python.org/cpython/rev/2cf85e2834c2

New changeset aa247150a8b1 by Victor Stinner in branch 'default':
Issue #24870: Add _PyUnicodeWriter_PrepareKind() macro
https://hg.python.org/cpython/rev/aa247150a8b1

--

___
Python tracker 

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



[issue25201] lock of multiprocessing.Value is not a keyword-only argument

2015-09-21 Thread Davin Potts

Davin Potts added the comment:

Berker: It looks to me like the docs are indeed in sync with the code on Value 
in that lock really is a keyword-only argument.  It looks like it's been that 
way since at least 2.7 (I didn't look at earlier).  There are enough other 
things in the multiprocessing.sharedctypes, maybe it was one of the others that 
caught your attention instead?

I wished that block/blocking had turned out to be a keyword-only argument in 
multiprocessing.Lock as part of issue23484, which I immediately thought of when 
reading this issue.

--

___
Python tracker 

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



[issue25209] Append space after completed keywords

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

I agree with adding a space in some cases, but not others. E.g. "pass" would 
only need a space if you wanted to add a comment, "return" often takes no 
argument, "lambda" may need an immediate colon (lambda: x). See 
 for 
a whitelist of keywords that I thought should always have spaces, but beware 
this list may not be up to date (no “await” nor “async” for instance).

BTW I don’t agree with the default of forcing an open bracket “(” for 
callables; consider decorators, subclassing, deferred function calls, etc, 
where that bracket may not be wanted.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-21 Thread Simeon Warner

Simeon Warner added the comment:

Path looks fine and seems to work as expected -- Simeon

--

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
title: with-statement doesn't release file handle after exception -> Windows: 
with-statement doesn't release file handle after exception on "No space left on 
device" error

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

It looks like fpsetmask() was deprecated since many years, and that 
fedisableexcept() is available since FreeBSD 5.3. Since we try to support 
FreeBSD 9, it's fine to drop support of FreeBSD < 5.3.

I'm concerned by the "CAVEATS" section below. Should we put "#pragma STDC 
FENV_ACCESS ON" in all .c file using a C double?

@skrah: I saw this pragma in Modules/_decimal/libmpdec/mpdecimal.c. Any idea if 
applying this patch is fine?

Maybe we can start by applying it to the default branch?

If this patch is required to support arm64, I think that it's ok to apply it to 
2.7, 3.4 and 3.5 since we still accept changes to fix platform compatibility 
issues.

http://www.unix.com/man-page/freebsd/3/fpsetmask/
---
DESCRIPTION
 The routines described herein are deprecated.  New code should use the 
functionality provided by fenv(3).
---

http://www.unix.com/man-page/freebsd/3/fenv/
---
HISTORY
 The  header first appeared in FreeBSD 5.3.  It supersedes the 
non-standard routines defined in  and documented in fpgetround(3).

CAVEATS
 The FENV_ACCESS pragma can be enabled with
   #pragma STDC FENV_ACCESS ON
---

--
nosy: +haypo, skrah

___
Python tracker 

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



[issue25194] Register of Financial Interests for core contributors

2015-09-21 Thread Ezio Melotti

Ezio Melotti added the comment:

> Wouldn't it be better to put the emphasis on a) core devs who do this 
> in their free time, b) core devs who would be available for hired work, 
> and c) showing off which companies indirectly support Python via 
> employing core devs and giving them time to do core dev work as part of 
> their job ?

I still think that a) and c) should be separate from b).  Core devs might be 
contributing in their free time (i.e. a) or as part as their job (i.e. c), and 
on top of this they might or might not be available for hired work (i.e. b).

> Essentially replacing "disclosure" and "financial interests" with 
> "motivation" and "support".

Agreed.  Perhaps even "affiliation" could be used, even though that doesn't 
imply that the affiliated company supports CPython.

--

___
Python tracker 

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



[issue25186] Don't duplicate _verbose_message in importlib._bootstrap and _bootstrap_external

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-21 Thread Simeon Warner

Simeon Warner added the comment:

s/Path/Patch/

--

___
Python tracker 

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



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We could use url = urllib.parse.quote_from_bytes(os.fsencode(path)) on Posix 
systems, but I heart that on Windows os.fsencode() can irreversible spoil file 
names (replace unencodable characters with '?'). On other side, I'm not sure 
that Windows unicode path can't contain lone surrogates. In this case we should 
use the 'surrogatepass' error handler (at least it allow to restore the path in 
principle).

Here is a patch that tries to handle undecodable and unencodable paths. Need to 
test it on Windows.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file40534/pydoc_undecodabple_path.patch

___
Python tracker 

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



[issue25183] python -m inspect --details fails in nondecodable directory

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25122] test_eintr randomly fails on FreeBSD

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3184c43627f5 by Victor Stinner in branch '3.5':
Issue #25122: test_eintr: the FreeBSD fix will be released in FreeBSD 10.3
https://hg.python.org/cpython/rev/3184c43627f5

--

___
Python tracker 

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



[issue25185] Inconsistency between venv and site

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue22729] `wait` and `as_completed` depend on private api

2015-09-21 Thread Ben Mather

Ben Mather added the comment:

Sorry for slow response.  I completely missed your reply.

I was working on a project that used a concurrent.futures thread pool but also 
needed to listen to responses from a chip-and-pin card reader.

Payment sessions operated in three phases:
  - check with card reader that payment is possible
  - save payment to database as if it has happened (always best to undercharge 
in the case of an error)
  - ask the payment provider to commit the payment

Up until confirmation is received, it is entirely possible to cancel the 
session.
Once confirmation is received the session starts trying to commit and you can 
only really wait for it to finish and then roll back (or break everything).

This maps pretty well to the interface of future (though with very different 
plumbing and with work happening before cancellation stops working) and it made 
sense to try to write it so that it could interoperate with futures 
representing tasks running on the thread pool.

I tried to add a method which returned a plain concurrent.futures.Future object 
but couldn't find a way to hook into the cancel method without introducing 
loads of race conditions.

Really it just seemed wrong that I had an object that quacked like a duck but 
wasn't a duck because real ducks communicated over a hidden side channel.

The card reader library is open source and mostly functional.  The class is in:

https://github.com/bwhmather/python-payment-terminal/blob/develop/payment_terminal/drivers/bbs/payment_session.py

I'm sure there are other places where this sort of interoperability would be 
useful.

--

___
Python tracker 

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



[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-09-21 Thread takayuki

takayuki added the comment:

This bug seems to remain in Python 3.5.0.

How to reproduce:

1. Save the attached cgitest.py into cgi-bin directory and changed it to 
executable file by "chmod +x cgitest.py"

2. Run CGIHTTPRequestHandler
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import http.server
>>> http.server.test(HandlerClass=http.server.CGIHTTPRequestHandler)

3. Visit http://localhost:8000/cgi-bin/cgitest.py by any browser.

4. Input "a/b/c//d//e///f///g" to form named "p".

5. The continuous slash letters are trimed and "a/b/c/d/e/f/g" is given to 
cgitest.py.

--

___
Python tracker 

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



[issue25202] with-statement doesn't release file handle after exception

2015-09-21 Thread Lauri Kajan

New submission from Lauri Kajan:

Hi all,

I found out that handle to a file opened with with-statement is not released in 
all cases.

I'm trying to delete a file when space on a disk is filled (0 bit left) by 
writing this file. I catch the IOError 28 to figure this out.
I write the file within the with-statement that is wrapped with try except. In 
the except block I try to delete the file but the handle to the file is not 
released.

In the following code fill-file can't be deleted because the file is still open.
I have described the problem also in stackoverflow [1].

# I recommend filling the disk almost full with some better tool.
import os
import errno

fill = 'J:/fill.txt'
try:
with open(fill, 'wb') as f:
while True:
n = f.write(b"\0")
except IOError as e:
if e.errno == errno.ENOSPC:
os.remove(fill)

This gives the following traceback:

Traceback (most recent call last):
  File "nospacelef.py", line 8, in 
n = f.write(b"\0")
IOError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nospacelef.py", line 8, in 
n = f.write(b"\0")
IOError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nospacelef.py", line 11, in 
os.remove(fill)
WindowsError: [Error 32] The process cannot access the file because it is being 
used by another process: 'J:/fill.txt'



[1] 
http://stackoverflow.com/questions/32690018/cant-delete-a-file-after-no-space-left-on-device

--
components: IO
messages: 251225
nosy: Lauri Kajan
priority: normal
severity: normal
status: open
title: with-statement doesn't release file handle after exception
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



[issue25207] ICC compiler warnings

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 170cd0104267 by Victor Stinner in branch 'default':
Issue #25207, #14626: Fix my commit.
https://hg.python.org/cpython/rev/170cd0104267

--

___
Python tracker 

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



[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 170cd0104267 by Victor Stinner in branch 'default':
Issue #25207, #14626: Fix my commit.
https://hg.python.org/cpython/rev/170cd0104267

--

___
Python tracker 

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



[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

Yes it also seems to apply to Python 3.

Perhaps you forgot your test script, so I made my own. After running

python3 -m http.server --cgi

The response from the following URL has no double slashes to be seen:

http://localhost:8000/cgi-bin/test.py//x//y//?k=aa%2F%2Fbb&//q//p//=//a//b//

I am not a CGI expert, but I suspect the query string bits should have double 
slashes, but maybe the PATH_INFO is right not to (see RFC 3875).

--
nosy: +martin.panter
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40541/test.py

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

Serhiy’s patch essentially uses the local filesystem encoding and then percent 
encoding, rather than the current behaviour of strict UTF-8 encoding and 
percent encoding. This is similar to what the “pathlib” make_uri() methods do, 
so maybe we could let “pathlib” do the work instead.

This draft RFC discusses encoding “file:” URLs:

https://tools.ietf.org/html/draft-ietf-appsawg-file-scheme-03#section-4

It suggests leaving Unicode characters alone (in IRIs) if possible, or using 
UTF-8 and percent encoding even if the filesystem uses a non-UTF-8 encoding. 
Perhaps we could leave the filename in the HTML as Unicode characters without 
percent encoding, and only percent encode the undecodable (surrogate-escaped) 
bytes.

This “IRI” scheme is also recommended by 
, 
which says on Windows, “in file URIs, percent-encoded octets are interpreted as 
a byte in the user’s current codepage”. This contradicts the draft RFC and the 
“pathlib” implementation, which both use UTF-8.

--

___
Python tracker 

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



[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-21 Thread Brett Cannon

Brett Cannon added the comment:

As soon as someone finds the time to make the change we can switch. While this 
is a necessary requirement to change the workflow it isn't gated by it either.

--

___
Python tracker 

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



[issue25206] PEP 498: Minor mistakes/outdateness

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

Also in the first example, the colon (format specifier) and exclamation mark 
(conversion) are in the wrong order. It should either be

f"{expr3:!s}" → format(expr3, "!s")

or

f"{expr3!s:}" → format(str(expr3), "")

--
nosy: +martin.panter

___
Python tracker 

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



[issue25205] setattr accepts invalid identifiers

2015-09-21 Thread Martin Panter

Martin Panter added the comment:

Previous report: Issue 14029

--
nosy: +martin.panter

___
Python tracker 

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



[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I prepared the code for the UTF-8 optimization.

@Serhiy: would you like to rebase your patch  faster_surrogates_hadling.patch?

Attached utf8.patch is a less optimal implementation which only changes 
PyUnicode_DecodeUTF8Stateful(). Maybe it's enough?

I would like to see a benchmark here to choose the good compromise between 
performance and code complexity.

--
Added file: http://bugs.python.org/file40540/utf8.patch

___
Python tracker 

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



[issue24861] deprecate importing components of IDLE

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e9edb95ca8b6 by Terry Jan Reedy in branch '2.7':
Issue #24861: add Idle news items and correct previous errors.
https://hg.python.org/cpython/rev/e9edb95ca8b6

New changeset 5087ca9e6002 by Terry Jan Reedy in branch '3.4':
Issue #24861: add Idle news item and correct previous errors.
https://hg.python.org/cpython/rev/5087ca9e6002

--

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-21 Thread Brett Cannon

Brett Cannon added the comment:

Ah, OK. As I said I had not run it so I wasn't sure of the actual outcome. =)

As for keyword-only arguments/parameters, see 
https://www.python.org/dev/peps/pep-3102/ . They are a Python 3 feature.

--

___
Python tracker 

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



[issue16893] Generate Idle help from Doc/library/idle.rst

2015-09-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

NEWS entries are done.

I added a function, copy_strip, to help.py to rstrip (in bytes mode) idle.html 
as it copies to help.html.  (I changed the name to better remember which is 
which.)  In my .bat file, with Doc as current directory, I use
  ..\pcbuild\python_d.exe -c "from idlelib.help import copy_strip; copy_strip()"
I could change the if __name__ block so that
  ..\pcbuild\python_d.exe -m idlelib.help copy_strip
would work.  Either way, I would like to add 'idlehelp' to makefiles.  But not 
tonight.

--

___
Python tracker 

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



[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Is that something that might happen 'soon' or only when the whole workflow is 
redone?

--

___
Python tracker 

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



[issue1731717] race condition in subprocess module

2015-09-21 Thread Vitaly

Vitaly added the comment:

Is this issue fixed in python 2.7.10? I am experiencing strange race conditions 
in code that combines threads with multiprocessing pool, whereby a thread is 
spawned by each pool worker. Running on latest Mac OS X.

--
nosy: +vitaly

___
Python tracker 

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



[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c430259873e by Victor Stinner in branch 'default':
Issue #24870: Optimize the ASCII decoder for error handlers: surrogateescape,
https://hg.python.org/cpython/rev/3c430259873e

--
nosy: +python-dev

___
Python tracker 

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



[issue24870] Optimize coding with surrogateescape and surrogatepass error handlers

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

I pushed a change to optimize the ASCII decoder.

Attached bench.py script: microbenchmark on the ASCII decoder. My results 
follows.

Common platform:
Platform: Linux-4.1.5-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two
Bits: int=32, long=64, long long=64, size_t=64, void*=64
Timer: time.perf_counter
CFLAGS: -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes
CPU model: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
Python unicode implementation: PEP 393
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)

Platform of campaign before:
Timer precision: 57 ns
Date: 2015-09-21 23:48:00
SCM: hg revision=73867bf953e6 branch=default date="2015-09-21 22:40 +0200"
Python version: 3.6.0a0 (default:73867bf953e6, Sep 21 2015, 23:47:35) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]

Platform of campaign after:
Timer precision: 55 ns
Date: 2015-09-21 23:52:55
Python version: 3.6.0a0 (default:bb0f55f1ec22+, Sep 21 2015, 23:52:43) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]
SCM: hg revision=bb0f55f1ec22+ tag=tip branch=default date="2015-09-21 23:06 
+0200"

--+-+---
ignore|  before |  after
--+-+---
256 x 10**1 bytes |  314 us (*) | 5.25 us (-98%)
256 x 10**3 bytes | 31.9 ms (*) |  509 us (-98%)
256 x 10**2 bytes | 3.13 ms (*) | 50.2 us (-98%)
256 x 10**4 bytes |  315 ms (*) | 5.12 ms (-98%)
--+-+---
Total |  351 ms (*) | 5.69 ms (-98%)
--+-+---

--+-+---
replace   |  before |  after
--+-+---
256 x 10**1 bytes |  352 us (*) | 6.32 us (-98%)
256 x 10**3 bytes | 35.2 ms (*) |  608 us (-98%)
256 x 10**2 bytes | 3.52 ms (*) | 60.9 us (-98%)
256 x 10**4 bytes |  354 ms (*) | 6.19 ms (-98%)
--+-+---
Total |  393 ms (*) | 6.87 ms (-98%)
--+-+---

--+-+---
surrogateescape   |  before |  after
--+-+---
256 x 10**1 bytes |  369 us (*) | 5.92 us (-98%)
256 x 10**3 bytes | 36.8 ms (*) |  570 us (-98%)
256 x 10**2 bytes | 3.69 ms (*) | 56.9 us (-98%)
256 x 10**4 bytes |  371 ms (*) | 5.79 ms (-98%)
--+-+---
Total |  412 ms (*) | 6.43 ms (-98%)
--+-+---

--+-+
backslashreplace  |  before |   after
--+-+
256 x 10**1 bytes |  357 us (*) |  361 us
256 x 10**3 bytes | 35.1 ms (*) | 36.1 ms
256 x 10**2 bytes | 3.52 ms (*) | 3.59 ms
256 x 10**4 bytes |  357 ms (*) |  365 ms
--+-+
Total |  396 ms (*) |  405 ms
--+-+

-+--+---
Summary  |   before |  after
-+--+---
ignore   |   351 ms (*) | 5.69 ms (-98%)
replace  |   393 ms (*) | 6.87 ms (-98%)
surrogateescape  |   412 ms (*) | 6.43 ms (-98%)
backslashreplace |   396 ms (*) | 405 ms
-+--+---
Total| 1.55 sec (*) |  424 ms (-73%)
-+--+---

--
Added file: http://bugs.python.org/file40539/bench.py

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-21 Thread Yury Selivanov

Yury Selivanov added the comment:

the patch lgtm

--

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

@Lauri: What is your Python version? Can you retry your test with Python 3.5?

--
nosy: +haypo

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread eryksun

eryksun added the comment:

Lauri changed the version from 3.4 to 3.2, and I was able to reproduce the 
problem in 3.2.5:

C:\Temp>py -3.2 --version
Python 3.2.5
C:\Temp>py -3.2 nospace.py
removing fill.txt
Traceback (most recent call last):
  File "nospace.py", line 8, in 
n = f.write(b"\0")
IOError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nospace.py", line 8, in 
n = f.write(b"\0")
IOError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nospace.py", line 12, in 
os.remove(fill)
WindowsError: [Error 32] The process cannot access the file because it is 
being used by another process: 'T:\\fill.txt'

It's a sharing violation, since the file handle isn't closed and wasn't opened 
with FILE_SHARE_DELETE.

There's no problem in 3.4 or 3.5 since it properly closes the file handle even 
if flush() fails:

C:\Temp>py -3.4 --version
Python 3.4.3
C:\Temp>py -3.4 nospace.py
removing fill.txt

C:\Temp>py -3.5 --version
Python 3.5.0
C:\Temp>py -3.5 nospace.py
removing fill.txt

--

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread Zachary Ware

Changes by Zachary Ware :


--
superseder:  -> file descriptor not being closed with context manager on 
IOError when device is full

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Stefan Krah

Stefan Krah added the comment:

Regarding volatile: gcc/clang seem to honor *some* changes to
the control word. At least in libmpdec both compilers have
always left the settings 80bit-prec/ROUND_CHOP intact, even
though it's not the default.

Let's rewrite Python in asm to avoid these issues. :)

--

___
Python tracker 

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



[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-21 Thread Brett Cannon

Brett Cannon added the comment:

It should be mentioned in this issue that the core-workflow mailing list 
decided on having NEWS entries being attached to the related issue in the issue 
tracker. This was then presented to python-committers and no one objected to 
the idea.

--

___
Python tracker 

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



[issue23972] Asyncio reuseport

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Hum, the latest patch was not reviewed yet :-(

--
nosy: +ysionneau

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-21 Thread Brett Cannon

Brett Cannon added the comment:

I left some comments on the Python 3.6 version of the patch. I don't know if we 
should apply such a change to Python 2.7 or 3.5, though, as it is a new feature 
of regrtest and thus runs the risk of breaking stuff. Then again, we have said 
that anything in the test package has not backwards-compatibility guarantees.

--

___
Python tracker 

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



[issue24779] Python/ast.c: decode_unicode is never called with rawmode=True

2015-09-21 Thread Eric V. Smith

Changes by Eric V. Smith :


--
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



[issue24779] Python/ast.c: decode_unicode is never called with rawmode=True

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5230115de64d by Eric V. Smith in branch 'default':
Issue #24779: Remove unused rawmode parameter to unicode_decode.
https://hg.python.org/cpython/rev/5230115de64d

--
nosy: +python-dev

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread Lauri Kajan

Lauri Kajan added the comment:

Thanks for these.
I'll see what I could do to upgrade our python version.

Sorry for not finding the old issue. Didn't find the right search terms.

--

___
Python tracker 

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



[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-09-21 Thread desbma

desbma added the comment:

Additional advantage of calling sendfile from shutil.copyfile: other fonctions 
in shutil module would automatically benefit from the use of senfile because 
they call copyfile directly (copy, copy2) or indirectly (copytree).

So for example, the performance of shutil.copytree should be improved for free 
for directory trees containing big files.

--

___
Python tracker 

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



[issue25203] Incorrect handling MemoryError in readline.set_completer_delims

2015-09-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

MemoryError raised in readline.set_completer_delims() turns the readline 
library to incorrect state.

$ (ulimit -v 20; ./python;)
Python 3.6.0a0 (default:e33b4c18af59+, Sep 17 2015, 17:05:17) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
>>> readline.get_completer_delims()
' \t\n`~!@#$%^&*()-=+[{]}\\|;:\'",<>/?'
>>> readline.set_completer_delims(' '*10**8)
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> readline.get_completer_delims()
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 1: invalid 
continuation byte

Proposed patch fixes the issue.

--
components: Extension Modules
files: readline_set_completer_delims.patch
keywords: patch
messages: 251239
nosy: serhiy.storchaka, twouters
priority: normal
severity: normal
stage: patch review
status: open
title: Incorrect handling MemoryError in readline.set_completer_delims
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40535/readline_set_completer_delims.patch

___
Python tracker 

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



[issue25114] asyncio: add ssl_object extra info

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f451651038c by Victor Stinner in branch '3.5':
Issue #25114: Adjust versionchanged in the doc
https://hg.python.org/cpython/rev/2f451651038c

--

___
Python tracker 

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



[issue25114] asyncio: add ssl_object extra info

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

I pushed my change to Python 3.4, 3.6 and 3.6 and Github.

The strange thing is the put a different "versionchanged" tag in the doc: 
version 3.4.4 in the 3.4 branch, version 3.5.1 in the 3.5 and default branches.

--
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



[issue23630] support multiple hosts in create_server/start_server

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

I pushed the change to Python 3.4, 3.5, 3.6 and asyncio at Github.

Thanks Yann for your nice enhancement of asyncio! It put your name in CPython 
"acks" and asyncio author list.

I modified the patch a little bit (3 lines), how the hosts variable was 
initialized. That's all :-)

--
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



[issue25181] Tests failed in nondecodable directory

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25182] python -v crashes in nonencodable directory

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25193] itertools.accumulate should have an optional initializer argument

2015-09-21 Thread Mark Dickinson

Mark Dickinson added the comment:

A couple of observations:

1. Haskell's (rough) equivalents would be `mapAccumL` and `mapAccumR`, which do 
take an initializer [1].  The signature for both functions is something like:

(acc -> b -> (acc, c)) -> acc -> [b] -> (acc, [c]).

2. In the particular case of NumPy, I've found np.cumsum a pain to use on 
multiple occasions because of the missing left-hand point in the result.  
Grepping through a couple of recent (real-world) projects produces code like:

summed_widths = cumsum(hstack(([0], widths[:-1])))

and

cumulative_segments = np.insert(np.cumsum(segment_lengths), 0, 0.0)

where that extra missing value is having to be inserted either in the input 
list or the output list. OTOH, none of those projects is natural fit for 
itertools, so changing itertools wouldn't help them directly.

[1] https://www.haskell.org/hoogle/?hoogle=mapAccumL

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread Lauri Kajan

Changes by Lauri Kajan :


--
versions: +Python 3.2 -Python 3.4

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7859e7e7071 by Victor Stinner in branch '3.4':
Issue #25114, asyncio: add ssl_object extra info to SSL transports
https://hg.python.org/cpython/rev/d7859e7e7071

--
nosy: +python-dev

___
Python tracker 

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



[issue25114] asyncio: add ssl_object extra info

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
title: asynico: add ssl_object extra info -> asyncio: add ssl_object extra info

___
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-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 682623e3e793 by Victor Stinner in branch '3.4':
Issue #23630, asyncio: host parameter of loop.create_server() can now be a
https://hg.python.org/cpython/rev/682623e3e793

--
nosy: +python-dev

___
Python tracker 

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



[issue25124] No single .msi available for 3.5 release

2015-09-21 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +loewis, skrah

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Stefan Krah

Stefan Krah added the comment:

In theory we should set FENV_ACCESS whenever the control word is
changed (C99):

"If part of a program tests floating-point status flags, sets
floating-point control modes, or runs under non-default mode
settings, but was translated with the state for the FENV_ACCESS
pragma "off", the behavior is undefined."


In practice gcc ignores the pragma, icc and cl.exe use it, not
sure about clang.

--

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

FYI in Python/pytime.c, I put a lot of "volatile double" when tests started to 
fail on some platforms. It's inefficient, but it's easier than teaching how to 
disable optimizations on each different compiler :-p

--

___
Python tracker 

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



[issue25202] Windows: with-statement doesn't release file handle after exception on "No space left on device" error

2015-09-21 Thread eryksun

eryksun added the comment:

See issue 16597. This wasn't fixed for 3.2, so it won't close the file if 
flush() fails. You'll either have to work around this or upgrade to 3.3+.

--
nosy: +eryksun
resolution:  -> out of date
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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Stefan Krah

Stefan Krah added the comment:

Ok, clang does not support it either:

https://llvm.org/bugs/show_bug.cgi?id=10409

--

___
Python tracker 

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



[issue25194] Register of Financial Interests for core contributors

2015-09-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

I like the idea, but the phrasings "disclosure" and "financial interests" sound 
too negative, IMO.

Wouldn't it be better to put the emphasis on a) core devs who do this in their 
free time, b) core devs who would be available for hired work, and c) showing 
off which companies indirectly support Python via employing core devs and 
giving them time to do core dev work as part of their job ?

Essentially replacing "disclosure" and "financial interests" with "motivation" 
and "support".

See e.g. the list of supporting companies we have for infrastructure 
(https://www.python.org/psf/league/) as example in a different area.

--
nosy: +lemburg

___
Python tracker 

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



[issue6331] Add unicode script info to the unicode database

2015-09-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue6331] Add unicode script info to the unicode database

2015-09-21 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue25114] asyncio: add ssl_object extra info

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 32e3a9e46f70 by Victor Stinner in branch '3.4':
Issue #25114: Fix test_asyncio
https://hg.python.org/cpython/rev/32e3a9e46f70

--

___
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-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42e7334e0e4c by Victor Stinner in branch '3.4':
Issue #23630: Fix test_asyncio on Windows
https://hg.python.org/cpython/rev/42e7334e0e4c

New changeset 840942a3f6aa by Victor Stinner in branch '3.5':
Merge 3.4 (Issue #23630, fix test_asyncio)
https://hg.python.org/cpython/rev/840942a3f6aa

New changeset 1f979a573f8d by Victor Stinner in branch 'default':
Merge 3.5 (Issue #23630, fix test_asyncio)
https://hg.python.org/cpython/rev/1f979a573f8d

--

___
Python tracker 

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



[issue25207] ICC compiler warnings

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a138a1131bae by Victor Stinner in branch 'default':
Issue #25207, #14626: Fix ICC compiler warnings in posixmodule.c
https://hg.python.org/cpython/rev/a138a1131bae

--
nosy: +python-dev

___
Python tracker 

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



[issue25207] ICC compiler warnings

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 73867bf953e6 by Victor Stinner in branch 'default':
ssue #25207: fix ICC compiler warning in msvcrtmodule.c
https://hg.python.org/cpython/rev/73867bf953e6

--

___
Python tracker 

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



[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2015-09-21 Thread eryksun

eryksun added the comment:

> local_encoding = locale.getdefaultlocale()[1]

Use locale.getpreferredencoding().

> b = eval('b' + ascii(result))
> result = b.decode(local_encoding)

It's simpler and more reliable to use 'latin-1' and 'mbcs' (ANSI). For example:

result = result.encode('latin-1').decode('mbcs')

If setlocale(LC_CTYPE, "") is called before importing the time module, then 
tzname is already correct. In this case, the above is either harmless or raises 
a UnicodeEncodeError that can be handled. OTOH, your approach silently corrupts 
the value:

>>> result = 'Střední Evropa (běžný čas)'
>>> b = eval('b' + ascii(result))
>>> b.decode('1251')
'St\\u0159ednн Evropa (b\\u011b\\u017enэ \\u010das)'

Back to the issue. In review, on initial import of the time module, if the CRT 
is using the default "C" locale, we have this inconsistency in which the time 
functions encode/decode tzname as ANSI and mbstowcs decodes tzname as Latin-1. 
(Plus strftime in the new CRT calls wcsftime, which adds another transcoding 
layer to compound the mojibake goodness.)

If time.tzset is implemented on Windows, then at startup an application can set 
the locale (specifically LC_CTYPE for tzname, and LC_TIME for strftime) and 
then call time.tzset(). 

Example with Russian system locale:

Initially we're in the "C" locale and the CRT's tzname is in ANSI. time.tzname 
incorrectly decodes this as Latin-1 since that's what mbstowcs uses in the "C" 
locale:

>>> time.tzname[0]
'\xc2\xf0\xe5\xec\xff \xe2 \xf4\xee\xf0\xec\xe0\xf2\xe5 UTC'

The way the CRT's strftime is implemented compounds the problem:

>>> time.strftime('%Z')
'A?aiy a oi?iaoa UTC'

It's implemented by calling the wide-character function, wcsftime. Just like 
Python, this gets a wide-character string by calling mbstowcs on the ANSI 
tzname. Then the CRT's strftime encodes the wide-character string back as a 
best-fit ANSI string, and finally time.strftime decodes the result as Latin-1 
via mbstowcs. The result is mutated mojibake:

>>> time.tzname[0].encode('mbcs', 'replace').decode('latin-1')
'A?aiy a oi?iaoa UTC'

Ironically, Python stopped calling wcsftime on Windows because of these 
problems, but changes to the code since then, plus the new CRT, have brought 
the problem back, and worse. See my comment in issue 10653, msg243660.

Fix this by setting the locale and calling _tzset:

>>> import ctypes, locale
>>> locale.setlocale(locale.LC_ALL, '')
'Russian_Russia.1251'
>>> ctypes.cdll.ucrtbase._tzset()
0
>>> time.strftime('%Z')
'Время в формате UTC'

If time.tzset were implemented on Windows, calling it would reload the 
time.tzname tuple.

--
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



[issue25207] ICC compiler warnings

2015-09-21 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86-64%20Windows%20Server%202012R2%20ICC%203.x/builds/109/steps/compile/logs/warnings%20%2832%29

 
2>C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj(418,5):
 warning : Toolset Intel C++ Compiler 16.0 is not used for official builds. 
Your build may have errors or incompatibilities.
 2>..\Modules\posixmodule.c(4612): warning #3199: "defined" is always false 
in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Modules\posixmodule.c(4612): warning #3199: "defined" is always false 
in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Modules\posixmodule.c(4774): warning #3199: "defined" is always false 
in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Modules\posixmodule.c(4774): warning #3199: "defined" is always false 
in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Modules\_winapi.c(1083): warning #1478: function "GetVersion" 
(declared at line 110 of "C:\Program Files (x86)\Windows 
Kits\8.1\Include\um\sysinfoapi.h") was declared deprecated 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Objects\obmalloc.c(841): warning #170: pointer points outside of 
underlying object 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Objects\obmalloc.c(841): warning #170: pointer points outside of 
underlying object 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\PC\winreg.c(885): warning #810: conversion from "void *" to 
"DWORD={unsigned long}" may lose significant bits 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\PC\msvcrtmodule.c(544): warning #592: variable "st" is used before 
its value is set 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 2>..\Python\sysmodule.c(830): warning #1478: function "GetVersionExA" 
(declared at line 433 of "C:\Program Files (x86)\Windows 
Kits\8.1\Include\um\sysinfoapi.h") was declared deprecated 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
19>..\PC\_msi.c(1035): warning #810: conversion from 
"LPCTSTR={LPCSTR={const CHAR={char} *}}" to "int" may lose significant bits 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\_msi.vcxproj]
19>..\PC\_msi.c(1036): warning #810: conversion from 
"LPCTSTR={LPCSTR={const CHAR={char} *}}" to "int" may lose significant bits 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\_msi.vcxproj]
19>..\PC\_msi.c(1037): warning #810: conversion from 
"LPCTSTR={LPCSTR={const CHAR={char} *}}" to "int" may lose significant bits 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\_msi.vcxproj]
19>..\PC\_msi.c(1038): warning #810: conversion from 
"LPCTSTR={LPCSTR={const CHAR={char} *}}" to "int" may lose significant bits 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\_msi.vcxproj]
19>..\PC\_msi.c(1039): warning #810: conversion from 
"LPCTSTR={LPCSTR={const CHAR={char} *}}" to "int" may lose significant bits 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\_msi.vcxproj]
 
C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj(418,5):
 warning : Toolset Intel C++ Compiler 16.0 is not used for official builds. 
Your build may have errors or incompatibilities.
 ..\Modules\posixmodule.c(4612): warning #3199: "defined" is always 
false in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 ..\Modules\posixmodule.c(4612): warning #3199: "defined" is always 
false in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 ..\Modules\posixmodule.c(4774): warning #3199: "defined" is always 
false in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 ..\Modules\posixmodule.c(4774): warning #3199: "defined" is always 
false in a macro expansion in Microsoft mode 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 ..\Modules\_winapi.c(1083): warning #1478: function "GetVersion" 
(declared at line 110 of "C:\Program Files (x86)\Windows 
Kits\8.1\Include\um\sysinfoapi.h") was declared deprecated 
[C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\pythoncore.vcxproj]
 ..\Objects\obmalloc.c(841): warning #170: pointer 

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a138a1131bae by Victor Stinner in branch 'default':
Issue #25207, #14626: Fix ICC compiler warnings in posixmodule.c
https://hg.python.org/cpython/rev/a138a1131bae

--

___
Python tracker 

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



[issue25205] setattr accepts invalid identifiers

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Even if it's not well document, it's legit and supported by CPython, but it may 
not be supported by other Python implementation (ex: PyPy).

--
nosy: +haypo

___
Python tracker 

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



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I don't understand if we should apply or not the patch :-/

--

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-21 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

The patch does not display dots, as they are not that intuitive and users 
cannot make an estimate of the time left or the position in the training phase. 
Instead, the regrtest.py, will display the progress as [X/Y], like the default 
version, but without any warnings, failed tests, skipped tests. Also the start 
and end report are suppressed.

I don't understand what do you mean by "keyword-only parameter". I added a new 
flag (-P/--pgo) and propagated it along all the functions that need it. Another 
approach would have been to use a global variable, lets say "pgo" and use it 
directly. This is closer to what you had in mind?

--

___
Python tracker 

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



[issue25206] PEP 498: Minor mistakes/outdateness

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

"""
For example, this code:

 f'abc{expr1:spec1}{expr2!r:spec2}def{expr3:!s}ghi'

Might be be evaluated as:

 'abc' + format(expr1, spec1) + format(repr(expr2)) + 'def' + 
format(str(expr3)) + 'ghi'
"""

format(repr(expr2)) should be format(repr(expr2), spec2)



"""
>>> f'x={x'
  File "", line 1
SyntaxError: missing '}' in format string expression
"""

Actually implemented exception message is:
SyntaxError: f-string: expecting '}'



"""
>>> f'x={!x}'
  File "", line 1
!x
^
SyntaxError: invalid syntax
"""

Actually implemented exception message is:
SyntaxError: f-string: invalid conversion character: expected 's', 'r', or 'a'

--
assignee: eric.smith
messages: 251250
nosy: Arfrever, eric.smith
priority: normal
severity: normal
status: open
title: PEP 498: Minor mistakes/outdateness

___
Python tracker 

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



[issue25205] setattr accepts invalid identifiers

2015-09-21 Thread W deW

New submission from W deW:

An identifier is defined by 

identifier ::=  (letter|"_") (letter | digit | "_")*

setattr accepts identifiers that do not meet this criterion:


Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class C(object): pass
...
>>> o=C()
>>> setattr(o, "$$$", True)
>>>  dir(o)
['$$$', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', 
'__getattribute__', '__hash__', '__in
module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__sizeof__', '__str__', '__su
__', '__weakref__']
>>> o.$$$
  File "", line 1
o.$$$
  ^
SyntaxError: invalid syntax
>>>


--
components: Interpreter Core
messages: 251248
nosy: W deW
priority: normal
severity: normal
status: open
title: setattr accepts invalid identifiers
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue25204] Confusing (?) warning when run deprecated module as script

2015-09-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python -Wa Lib/imp.py
sys:1: PendingDeprecationWarning: the imp module is deprecated in favour of 
importlib; see the module's documentation for alternative uses

"sys:1:" is output when the stacklevel argument is larger then the deep of the 
stack.

Following patch stops raising just below the surface.

$ ./python -Wa Lib/imp.py
Lib/imp.py:33: PendingDeprecationWarning: the imp module is deprecated in 
favour of importlib; see the module's documentation for alternative uses
  PendingDeprecationWarning, stacklevel=2)

However I'm not sure that the current behavior is incorrect.

--
components: Extension Modules, Library (Lib)
files: warnings_surface.patch
keywords: patch
messages: 251247
nosy: brett.cannon, eric.snow, haypo, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Confusing (?) warning when run deprecated module as script
Added file: http://bugs.python.org/file40536/warnings_surface.patch

___
Python tracker 

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



[issue25204] Confusing (?) warning when run deprecated module as script

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25206] PEP 498: Minor mistakes/outdateness

2015-09-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 831276834e4b by Eric V. Smith in branch 'default':
Partial fix for issue 25206: Fixed format() call.
https://hg.python.org/peps/rev/831276834e4b

--
nosy: +python-dev

___
Python tracker 

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



[issue25205] setattr accepts invalid identifiers

2015-09-21 Thread eryksun

eryksun added the comment:

To clarify using a unicode name in 2.x, it has to be encodable using the 
default encoding, sys.getdefaultencoding(). Normally this is ASCII.

--

___
Python tracker 

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



  1   2   >