[issue24984] document AF_BLUETOOTH socket address formats

2015-09-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset da9b26670e44 by Martin Panter  in branch '3.4':
Issue #24984: Document AF_BLUETOOTH socket address formats
https://hg.python.org/cpython/rev/da9b26670e44

New changeset 4ce8450da22d by Martin Panter  in branch '3.5':
Issue #24984: Merge 3.4 into 3.5
https://hg.python.org/cpython/rev/4ce8450da22d

New changeset ec4ba0cb1ce0 by Martin Panter  in branch 'default':
Issue #24984: Merge 3.5 into 3.6
https://hg.python.org/cpython/rev/ec4ba0cb1ce0

--
nosy: +python-dev

___
Python tracker 

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



[issue25038] test_os.TestSendfile.test_keywords() introduced a regression

2015-09-08 Thread STINNER Victor

New submission from STINNER Victor:

The change e42e2bd47168 introduced a regression, test_os started to fail on 
FreeBSD. What is the rationale of the change? For example, test_os pass in the 
previous build on the same buildbot.

I don't know if it makes sense to pass None to headers and/or trailers.

Please revert the change or fix the test. ((But we must continue to test 
headers=None and trailers=None, even if these parameters now raise a TypeError).

==
ERROR: test_keywords (test.test_os.TestSendfile)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_os.py", line 
2334, in test_keywords
headers=None, trailers=None, flags=0)
TypeError: sendfile() headers must be a sequence or None

--
messages: 250292
nosy: haypo, martin.panter
priority: normal
severity: normal
status: open
title: test_os.TestSendfile.test_keywords() introduced a regression
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-08 Thread Anthon van der Neut

Anthon van der Neut added the comment:

The problem lies in the recursive call to _vformat which might consume fields 
without name ({}) and increment auto_arg_index, but that
incremented value was not returned to the parent.

Since the line became longer than pep8 allowed I wrapped all of the method call 
arguments to the next line, hope that that's ok.

The patch is against the mercurial repository and works for 3.4.1 upwards.

--
keywords: +patch
Added file: http://bugs.python.org/file40419/25034.patch

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-08 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks, Brett. Since I am not wrapping the warning, the default stacklevel 
seems to work on all versions.

Still to do: 1. Something in the docs (all branches), but with an eye toward 
other deprecations coming later.

2. Actually remove file in 3.6 branch, but only after ImportError does not 
crash Python when running without a console (ie, with sys.stderr == None)).  An 
future issue to fix this will be a dependency.

--
versions: +Python 3.6 -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



[issue24991] Define instance mutability explicitly on type objects

2015-09-08 Thread Nick Coghlan

Nick Coghlan added the comment:

Also adding Trent Nelson to the nosy list, as I believe this capability could 
potentially be relevant to PyParallel.

The reason I say that is that if instance mutability (or the lack thereof) 
becomes a first class language concept, then we may be able to adopt a Rust 
style model where mutability can be made *thread relative*.

Thread relative immutability would be trickier than global immutability, but 
hopefully still feasible.

--
nosy: +trent

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55b62e2c59f8 by Terry Jan Reedy in branch '2.7':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/55b62e2c59f8

New changeset c51514826126 by Terry Jan Reedy in branch '3.4':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/c51514826126

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

FYI: we're making a new release (right now!) with the patch applied, that 
should go out tomorrow.

If anyone spots anything important in the patch, I still really want to hear 
about it, but hopefully having something installable means we'll get at least a 
few days of testing before locking it in.

All my apologies for waiting until the last minute before giving up on the 
crusade to avoid including the versioned files in Python. The timing is 
unfortunate, but I'm sure we're going to have the best compatibility story 
possible right now. So thanks for indulging me, and I hope I haven't put too 
many people through too much anguish.

--

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-08 Thread John Leitch

John Leitch added the comment:

All appears well.

--

___
Python tracker 

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



[issue12849] Cannot override 'connection: close' in urllib2 headers

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

Just closed Issue 25037 about a server that omits the chunk length headers when 
“Connection: closed” is used.

I wonder if it would be such a bad idea to just remove the “Connection: closed” 
flag. It was added in 2004 in revision 5e7455fb8db6, but I do not agree with 
the reason given in the commit message and comment. Adding the flag is only 
really a courtesy to the server, saying it can drop the connection once it 
sends the response. Removing it in theory shouldn’t change anything about how 
the client parses the HTTP response, but in practice it seems it may improve 
compatibility with buggy servers.

--
status: pending -> open

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Larry Hastings

Changes by Larry Hastings :


--
stage:  -> patch review

___
Python tracker 

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



[issue25030] io.[Text]IOBase.seek doesn't take keyword parameter

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

I will try to commit your patch today when I up to it.

Maybe the “draft” status of that PEP is out of date. The slash (/) indicator is 
already being used in some places in pydoc, e.g.

$ pydoc object.__eq__
Help on wrapper_descriptor in object:

object.__eq__ = __eq__(self, value, /)
Return self==value.

--
assignee: docs@python -> martin.panter
stage:  -> commit review
title: io. -> io.[Text]IOBase.seek doesn't take keyword parameter

___
Python tracker 

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



[issue25037] ValueError: invalid literal for int() with base 16: b'[\r\n'

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

FYI maybe your workaround of clearing HTTPResponse.chunked will work at the 
moment, but it would break if the server ever gets fixed and starts sending 
proper chunked responses.

--

___
Python tracker 

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



[issue25037] ValueError: invalid literal for int() with base 16: b'[\r\n'

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

It looks like this is a fault in the server. It does not appear to support 
Connection: close over HTTP 1.1, which is what Python’s “urllib.request” module 
uses. I think you will either have to get the server fixed, or work around the 
problem by using the low level “http.client” module, where you can avoid 
sending a “Connection: close” header field.

However see also Issue 12849, where various other people (including myself at 
one stage) have found this “Connection: close” flag triggers various server 
problems.

HTTP responses from the server with and without the “close” flag:


## HTTP 1.1 without Connection: close → good chunked response ##
POST /dataminer/rest/public/api/markets/dayahead/lmp/daily HTTP/1.1
Host: dataminer.pjm.com
Content-Type: application/json
Content-Length: 80

{"startDate": "2015-07-01", "endDate": "2015-07-01", "pnodelist": [135389795]}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=edge
Cache-Control: no-cache
Expires: -1
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
X-Request-UUID: 09513fea-ac35-41ea-bf1b-b69357f42594
Transfer-Encoding: chunked
Server: Microsoft-IIS/7.5
Date: Wed, 09 Sep 2015 04:12:34 GMT
Pragma: no-cache
Content-Type: application/json
Transfer-Encoding: chunked
Set-Cookie: dataminer=1923355820.36895.; path=/

1a44
[
  {
"publishDate": "2015-07-01T04:00:00Z",
[. . .]


## HTTP 1.1 with Connection: close → invalid chunked response ##
POST /dataminer/rest/public/api/markets/dayahead/lmp/daily HTTP/1.1
Host: dataminer.pjm.com
Connection: close
Content-Type: application/json
Content-Length: 80

{"startDate": "2015-07-01", "endDate": "2015-07-01", "pnodelist": [135389795]}
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=edge
Cache-Control: no-cache
Connection: close
Expires: -1
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
X-Request-UUID: 0b43546c-d484-47a1-aff3-384f62a94a5a
Transfer-Encoding: chunked
Server: Microsoft-IIS/7.5
Date: Wed, 09 Sep 2015 04:13:00 GMT
Pragma: no-cache
Content-Type: application/json
Connection: close

[
  {
"publishDate": "2015-07-01T04:00:00Z",
[. . .]

--
nosy: +martin.panter
resolution:  -> third party
status: open -> closed
superseder:  -> Cannot override 'connection: close' in urllib2 headers
type: crash -> behavior

___
Python tracker 

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



[issue25030] io.

2015-09-08 Thread shiyao.ma

shiyao.ma added the comment:

Thanks for your comment.

I had a read of pep457. It's still in draft status, so incorporating
the / indicator is not much a concern AFAIK.

Any further modification for me to do to get that merged?

--
title: io.[Text]IOBase.seek doesn't take keyword parameter -> io.

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Probably should, since the fix that caused it was in for rc3. There's no 
section for 3.5.0 final yet though (that's my excuse, anyway :) )

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

New patch. Mostly build and installer changes, but the 
distutils/_msvccompiler.py is also part of it.

I've run a full build and done basic testing with a full test run going now, 
but I don't have a clean machine handy to try it without the full CRT install, 
so that'll have to wait until tomorrow.

This *basically* reverts the build back to /MD for everything. The one 
exception is that distutils now knows which DLLs are shipped with Python and if 
a vcruntime is needed that isn't included, it will be put into the dist (or 
statically linked). So wheels created with 3.5.6 and MSVC 15.0 will still run 
against 3.5.0, even if the user has not installed the latest VCRedist.

--
Added file: http://bugs.python.org/file40418/25027_2.patch

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

I have committed the obvious keyword argument name fixes from my patch. Now 
patch v3 contains just the PEP 457 changes to be considered.

--

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2015-09-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fdb5d84f9948 by Martin Panter  in branch '3.4':
Issue #23738: Document and test actual keyword parameter names
https://hg.python.org/cpython/rev/fdb5d84f9948

New changeset 40bf1ca3f715 by Martin Panter  in branch '3.5':
Issue #23738: Merge 3.4 into 3.5
https://hg.python.org/cpython/rev/40bf1ca3f715

New changeset 6177482ce6a1 by Martin Panter  in branch 'default':
Issue #23738: Merge 3.5 into 3.6
https://hg.python.org/cpython/rev/6177482ce6a1

--
nosy: +python-dev

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2015-09-08 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +berker.peksag
versions: +Python 3.6
Added file: http://bugs.python.org/file40417/pos-defaults.v3.patch

___
Python tracker 

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



[issue25037] ValueError: invalid literal for int() with base 16: b'[\r\n'

2015-09-08 Thread Alan

New submission from Alan:

I've written a piece of code to POST request to a web service. 

===

import json
import urllib
from urllib import request
from urllib import parse

def Payload(start_date, end_date, pnode_list):
payload = {"startDate": start_date, 
   "endDate": end_date,
   "pnodelist": pnode_list}
return json.dumps(payload)

def DownloadData(url, payload, header):
data = []
request = urllib.request.Request(url, payload, header)
try:
response = urllib.request.urlopen(request)
except urllib.error.URLError as e:
print("URLError occured.")
except urllib.error.HTTPError as e:
print("HTTPError occured.")
else:
#response.chunked = False  #if this line is commented, ValueError   
 will be thrown...
data = json.loads(response.read().decode("utf-8"))
return data

def main():
url = 
"https://dataminer.pjm.com/dataminer/rest/public/api/markets/dayahead/lmp/daily";
payload = Payload("2015-07-01", "2015-07-01", [135389795])
header = {"Content-Type": "application/json"}
data = DownloadData(url, payload.encode("utf-8"), header)
print(data)

if __name__ == "__main__":
main()

===

However, "ValueError:invalid literal for int() with base 16: b'[\r\n'" is 
thrown when the HTTPResponse.read() is invoked:

Traceback (most recent call last):
  File "C:\Python34\lib\http\client.py", line 587, in _readall_chunked
chunk_left = self._read_next_chunk_size()
  File "C:\Python34\lib\http\client.py", line 559, in _read_next_chunk_si
return int(line, 16)
ValueError: invalid literal for int() with base 16: b'[\r\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "textpjm.py", line 34, in 
main()
  File "textpjm.py", line 30, in main
data = DownloadData(url, payload.encode("utf-8"), header)
  File "textpjm.py", line 23, in DownloadData
data = json.loads(response.read().decode("utf-8"))
  File "C:\Python34\lib\http\client.py", line 506, in read
return self._readall_chunked()
  File "C:\Python34\lib\http\client.py", line 591, in _readall_chunked
raise IncompleteRead(b''.join(value))
http.client.IncompleteRead: IncompleteRead(0 bytes read)


I've found a solution to avoid this exception: before HTTPResponse.read() is 
called, I have to set HTTPResponse.chunked to be False!

I wonder if there's something wrong in HTTPResponse.

--
components: Library (Lib)
files: testpjm.py
messages: 250275
nosy: alan
priority: normal
severity: normal
status: open
title: ValueError: invalid literal for int() with base 16: b'[\r\n'
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file40416/testpjm.py

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Larry Hastings

Larry Hastings added the comment:

Does this need a Misc/NEWS entry?

--

___
Python tracker 

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



[issue23447] Import fails when doing a circular import involving an `import *`

2015-09-08 Thread Steven Barker

Steven Barker added the comment:

I've managed to partially fix my build environment, so I can verify that my 
patch (attached previously) works as intended. I'm not completely sure that it 
doesn't break unrelated things as my build still has lots of failing tests 
(which all appear to be unrelated to this issue). Nothing obviously new breaks 
with the patch applied.

The test I added in the patch does fail (as expected) on the unpatched 
interpreter, but passes on a patched version (though I've just noticed that the 
attempt at catching the exception doesn't work, since the current import code 
raises an AttributeError rather than the ImportError I had expected). I don't 
believe any other tests failed anew on the patched code, but like I said, I've 
got a lot of unrelated test failures so I might be missing some subtle issues.

I'm attaching an updated version of the patch with better exception handling in 
the test code. The patch applies cleanly to the latest dev branch. I'd 
appreciate any reviews or other feedback.

--
Added file: http://bugs.python.org/file40415/23447_3.diff

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Okay, here's a proposal:

We bundle vcruntime140.dll with Python's normal install, so it's always there 
and extensions that use it do not need to ship anything.

When distutils._msvccompiler is used to build an extension with a *different* 
version of MSVC, it will copy the dependency or statically link (as in my 
attached patch).

This does not prevent us from changing the compiler used for 3.5, as long as we 
continue to ship both vcruntime140.dll and the newer version, and extensions 
build with newer compilers will include the dependency or pick up the bundled 
one if they are on a version that includes it.

(Extensions that use C++ and depend on msvcp###.dll will need to ship that 
themselves, obviously.)

I'll post a new patch shortly, but it's only a very small change from this one 
for distutils, and the rest is in the installer.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread eryksun

eryksun added the comment:

I think 3.5 should be distributed with vcruntime140.dll. It seems a waste for 
python.exe, python35.dll, and all of the extension modules and dependent DLLs 
to each take an FLS slot:

>>> import ctypes # +1 for _ctypes
>>> kernel32 = ctypes.WinDLL('kernel32')
>>> kernel32.FlsGetValue.restype = ctypes.c_void_p
>>> [x for x in range(128) if kernel32.FlsGetValue(x)]
[1, 2, 4, 5, 6, 8]

>>> import pyexpat, select, unicodedata, winsound
>>> import _bz2, _decimal, _elementtree, _hashlib
>>> import _lzma, _msi, _multiprocessing, _overlapped 
>>> import _socket, _sqlite3, _ssl, _tkinter
>>> [x for x in range(128) if kernel32.FlsGetValue(x)]
[1, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 
23, 24, 25, 26, 27]

--
nosy: +eryksun

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

PR at 
https://bitbucket.org/larry/cpython350/pull-requests/21/issue-25029-memoryerror-in-test_strptime/diff

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

> I wish people wouldn't remove old patches.  There's no harm in leaving them, 
> and it may be a useful historical record.

It became hard to read this issue, it has a long history. My old patches for 
Python 3.4 were for ROUND_HALF_UP, but it was then decided to use 
ROUND_HALF_EVEN. Technically, patches are not "removed" but "unlinked" from the 
issue: you can get from the history at the bottom of this page.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

I modified Python 3.6 to use ROUND_HALF_EVEN rounding mode in 
datetime.timedelta, datetime.datetime.fromtimestamp(), 
datetime.datetime.utcfromtimestamp().

round_half_even_py34.patch: Backport this change to Python 3.4. I tried to 
write a minimal patch only changing datetime, not pytime.

--
Added file: http://bugs.python.org/file40414/round_half_even_py34.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread Larry Hastings

Larry Hastings added the comment:

I wish people wouldn't remove old patches.  There's no harm in leaving them, 
and it may be a useful historical record.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: 
http://bugs.python.org/file40349/timedelta_round_half_up_py34.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file40365/combined_py34.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: 
http://bugs.python.org/file40364/fromtimestamp_round_half_up_py34-2.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file40362/round_half_up_py34-2.patch

___
Python tracker 

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



[issue24862] subprocess.Popen behaves incorrect when moved in process tree

2015-09-08 Thread Gregory P. Smith

Gregory P. Smith added the comment:

My gut feeling is to say "don't do that" when it comes to passing subprocess 
instances between processes (ie: pickling and unpickling them) and expecting 
them to work as if nothing had changed...  You already acknowledge that this is 
a strange thing for an application to do and that you have a workaround in your 
application.

BUT: It does looks like we are doing something a bit weird here with the 
waitpid errno.ECHILD exception.  However letting this bubble up to the 
application may, at this point, cause new bugs in code that isn't expecting it 
so I'm not sure we should change that in any circumstances. :/

FWIW there is also a comment at the end of the related issue1731717 (for 
Popen.wait() rather than .poll()) with a suggestion to ponder (though not 
directly related to this issue, if it is still relevant).

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Thanks. I'll submit a PR for 3.5.0 later tonight - can't seem to clone Larry's 
repo successfully at work for some reason.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 171d5590ebc3 by Victor Stinner in branch 'default':
Issue #23517: fromtimestamp() and utcfromtimestamp() methods of
https://hg.python.org/cpython/rev/171d5590ebc3

--

___
Python tracker 

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



[issue25036] IDLE - infrastructure changes so editors don't assume they're in a toplevel

2015-09-08 Thread Mark Roseman

New submission from Mark Roseman:

A necessary prerequisite of tabbed windows, editor and shell in same window 
etc. as per #24826, is that editors stop thinking they are in their own 
toplevel window.

The attached component.patch is unfortunately long, but this was necessary due 
to the highly inter-related nature of the changes. It results in no 
functionality changes to IDLE at this point, just a reorganization.

In summary, WindowList.ListedToplevel was abstracted into a more general 
Container, which will later be expanded to do more than just a simple toplevel 
(though that is all it is now). EditorWindow (and friends) no longer call 
window operations like wm_title themselves, but go through a Container API.

At the same time, a new Component base class was created, which EditorWindow 
and several others now inherit from. Components get inserted into Containers of 
course, and the base class ensures certain things the Container needs are 
present. (The Component also can respond to callbacks from other Components 
sent via the file list; this approach is used in the patch in #25031 for 
configuration changes).

Finally, what remained of WindowList (effectively a simplified WindowList 
class, but not ListedTopLevel) was folded into FileList.

In terms of understanding and/or reviewing this patch, I'd recommend the 
following:
  1. start with container.py
  2. then component.py
  3. then a simple example of how it's applied, ClassBrowser.py
  4. a slightly more verbose, but equally simple example, Debugger.py
  5. FileList.py (mostly comes from WindowList, but note how used by 
container.py
  6. then EditorWindow.py

--
components: IDLE
files: component.patch
keywords: patch
messages: 250264
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - infrastructure changes so editors don't assume they're in a 
toplevel
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40413/component.patch

___
Python tracker 

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



[issue25035] Getter/setter for argparse keys

2015-09-08 Thread Sworddragon

New submission from Sworddragon:

On making a look at the argparse documentation to figure out if I can get the 
value of the choices key of a specific argument after argument parsing or if I 
have to implement it myself I noticed that there is a getter/setter for the 
default key (ArgumentParser.get_default and ArgumentParser.set_defaults) but 
not for the other keys. Maybe this could also be implemented for the other 
keys, probably as a generic function that takes as an extra argument the 
requested key.

--
components: Library (Lib)
messages: 250263
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Getter/setter for argparse keys
type: enhancement
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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

vcruntime140.dll *is* a system library when installed properly, and if someone 
installs VCRedist then all the bundled ones should be ignored. Over time, I 
expect to see extensions appear that depend on vcruntime150.dll rather than 
140.dll, so it won't always be shared by all extensions.

However, if someone has vcruntime140.dll installed and an extension requires 
vcruntime150.dll, they will get errors unless that extension includes the 
correct version. We can't ship currently-nonexistent versions with Python 3.5, 
and if extensions have to depend on what's installed then Python 3.5 extensions 
will forever be tied to MSVC 14.0.

GPL code should either statically link or recommend their users install 
VCRedist separately. I'm not going to compromise compiler version independence 
because of one license.

The uninstall issue is something I hadn't considered. Maybe we can special-case 
pip uninstalling it from the site-packages folder? *Paul* - any thoughts?

--

___
Python tracker 

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



[issue25030] io.[Text]IOBase.seek doesn't take keyword parameter

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

This also bugs me, and the same problem exists in other parts of the 
documentation. Perhaps you might be interested in Issue 23738 and whether 
changing to the new notation used by PEP 457, pydoc, help(), Argument Clinic is 
any good:

seek(offset, whence=SEEK_SET, /)

But in the mean time, I think the proposed patch is okay, and would certainly 
benefit the Python 2 documetation where using the new PEP 457 slash indicator 
is less likely to be appropriate.

--
nosy: +martin.panter
versions: +Python 2.7, Python 3.4, Python 3.6

___
Python tracker 

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



[issue23738] Clarify documentation of positional-only default values

2015-09-08 Thread Martin Panter

Changes by Martin Panter :


--
dependencies: +io.[Text]IOBase.seek doesn't take keyword parameter

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Mark Lawrence

Mark Lawrence added the comment:

IIRC I flagged up oustanding asyncore/asynchat issues months or even years back 
and Victor closed a lot down, so there shouldn't be many left to deal with.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0bb896f9b14 by Victor Stinner in branch 'default':
Revert change 0eb8c182131e:
https://hg.python.org/cpython/rev/d0bb896f9b14

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

> Perhaps the getentropy() check can explicitly rule out Solaris (either at the 
> autoconf level or in the random.c source code) if you prefer to keep the 
> getentropy() call on OpenBSD.

Ok, here is a patch implementing this option. It keeps getentropy() on OpenBSD 
for os.urandom(), but it disables getentropy() on Solaris for os.urandom().

I don't know if my py_getrandom() function calling syscall(SYS_getrandom, 
buffer, size, 0) works on Solaris. The flags are hardcoded, and I don't know if 
the  include is enough to get the syscall() function. (Does 
Solaris uses the GNU C library?)

@jbeck: Can you please test this patch on the default branch of Python? Can you 
tell if the HAVE_GETRANDOM_SYSCALL check succeed on Solaris? (do you have 
"#define HAVE_GETRANDOM_SYSCALL 1" in pyconfig.h?)

The configure scripts tries to compile the following C program:

#include 

int main() {
const int flags = 0;
char buffer[1];
int n;
/* ignore the result, Python checks for ENOSYS at runtime */
(void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
return 0;
}

--
Added file: http://bugs.python.org/file40412/urandom_solaris.patch

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

Thread on python-dev: 
https://mail.python.org/pipermail/python-dev/2015-September/141439.html

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Christoph Gohlke

Christoph Gohlke added the comment:

I understand that distributing dependent DLLs next to extension modules is 
considered the best approach 
 
(which nevertheless fails in common cases), however vcruntime140.dll is a 
special case since it will be shared by almost all extension modules and can be 
considered a system library.

My Python 3.4 installation contains 913 .pyd files in 277 directories under 
Lib\site-packages. With the proposed change there will be ~277 redundant 
vcruntime140.dll files under Python 3.5. Size is not an issue since 
vcruntime140.dll is small (~87 KB for 64 bit).

Many extension modules are installed directly into Lib\site-packages (no 
package directory). Uninstalling any one of those extension modules using pip 
or "wininstaller" will delete vcruntime140.dll from Lib\site-packages, 
potentially breaking the other extension modules in Lib\site-packages.

IANAL, but under GPL "you may not distribute these [runtime] libraries in 
compiled DLL form with the program" 
.

--

___
Python tracker 

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



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-08 Thread Eric V. Smith

Changes by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue24760] IDLE settings dialog shouldn't be modal

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

Note: about dialog part of the 'demodalize' patch split off and now in #24813; 
the bulk of the rest of it, which is really providing a cleaner FileList API 
rather than direct access to internals from EditorWindow, is in #25031.

After the latter patch is accepted, I'll put up a new patch here that is just 
the changes to make settings modeless... will be just a dozen lines of code or 
so.

--

___
Python tracker 

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



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-08 Thread Anthon van der Neut

Anthon van der Neut added the comment:

Here is a patch for Python-3.5.0rc3/Lib/test/test_string.py unittests fail:


--- /opt/python/3.5/lib/python3.5/test/test_string.py   2015-09-08 
17:06:07.099197904 +0200
+++ test_string.py  2015-09-08 21:47:01.471634309 +0200
@@ -58,6 +58,8 @@
  'foo{1}{num}{1}'.format(None, 'bar', num=6))
 self.assertEqual(fmt.format('{:^{}}', 'bar', 6),
  '{:^{}}'.format('bar', 6))
+self.assertEqual(fmt.format('{:^{}} {}', 'bar', 6, 'X'),
+ '{:^{}} {}'.format('bar', 6, 'X'))
 self.assertEqual(fmt.format('{:^{pad}}{}', 'foo', 'bar', pad=6),
  '{:^{pad}}{}'.format('foo', 'bar', pad=6))

--

___
Python tracker 

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



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-08 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +eric.smith

___
Python tracker 

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



[issue24912] The type of cached objects is mutable

2015-09-08 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -Guido.van.Rossum

___
Python tracker 

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



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-08 Thread Anthon van der Neut

New submission from Anthon van der Neut:

Since 3.4.1, string.Formatter() accepts empty keys {}. If these are nested they 
give different results from explicitly numbered, where the same arguments 
applied  "".format() give the expected results:

from string import Formatter

f = Formatter()

fmt0 = "X {:<{}} {} X"
fmt1 = "X {0:<{1}} {2} X"

for fmt in [fmt0, fmt1]:
x = f.format(fmt, 'ab', 5, 1)
y = fmt.format(   'ab', 5, 1)
print(x)
print(y)
gives:

X ab5 X
X ab1 X
X ab1 X
X ab1 X
of which the first line is incorrect.

--
components: Library (Lib)
messages: 250253
nosy: anthon
priority: normal
severity: normal
status: open
title: string.Formatter accepts empty fields but displays wrong when nested
type: behavior
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



[issue24991] Define instance mutability explicitly on type objects

2015-09-08 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



[issue24912] The type of cached objects is mutable

2015-09-08 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



[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-08 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



[issue24989] scan_eol() Buffer Over-read

2015-09-08 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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-08 Thread John Leitch

John Leitch added the comment:

Glancing over the code, I see the issues you describe. Tonight I will verify 
your revised patch and report back.

--

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

I like that approach as well, it is the kind of API I've been finding myself 
writing a fair bit lately (a context passed to class instances that otherwise 
don't store global state themselves).

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Typically it's warnings.warn(message, DeprecationWarning, stacklevel=2), but 
that stack level is wrong for Python 3.3 - 3.4 (fixed in 3.5.0). If this is 
purely for Python 3.6 I might be adding a nicer API for module deprecations, 
but if this is for other versions then the call above is the right one except 
for Python 3.3/3.4.

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2015-09-08 Thread Michael Foord

Michael Foord added the comment:

Using the runner as a "context" passed to test cases (and accessible from 
tests) for this kind of configuration seems like a good approach to me.

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Re-opening because there is still the issue of adding a deprecation warning on 
import.  Brett, can you either point me toward or post here the code you are 
planning to use for other stdlib modules?

--
nosy: +brett.cannon
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Donald Stufft

Donald Stufft added the comment:

Oh yea, and (A)RC4 is broken and shouldn't be used for anything anymore, ChaCha 
is much better and is pretty great.

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Donald Stufft

Donald Stufft added the comment:

(A)RC4 and ChaCha are just two stream ciphers that let you encrypt some data, 
they work by essentially producing a psuedo-random stream of data in a 
deterministic manner based off of a key, and than that is XOR'd with the data 
you want to encrypt. arc4random (ab)uses this and uses "real" entropy (e.g. 
randomness pulled from random noise on the network and such) as the "key" and 
then uses the psuedo-random stream of data as the values you get when you ask 
arc4random for some random data. The actual process is quite a bit more complex 
then that, but that's the basic gist.

Userspace PRNG's are not a very good idea for reasons better explained by an 
expert: http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/

And yea, using MT for anything that needs a CSPRNG (that is, a 
Cryptographically Secure Psuedo Random Number Generator) is a real bad idea, 
because the numbers it outputs are not "really" random. I'm of a mind that the 
APIs should default to CSPRNGs (so ``random`` should default to SystemRandom) 
and using something like MT should be opt in via something like 
"UnsafeFastRandom) or something. That ship is almost certainly sailed at this 
point though.

--
nosy: +dstufft

___
Python tracker 

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



[issue25033] Python 2.7.10 make - fails on some Standard Library Modules

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

This tracker is for reporting bugs in python.  Our help forum is the 
python-list mailing list.  Please post your questions there.

--
nosy: +r.david.murray
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



[issue25033] Python 2.7.10 make - fails on some Standard Library Modules

2015-09-08 Thread Ron Barak

New submission from Ron Barak:

UnixWare7 only supports Python 1.6

I added Python 2.7.10 from sources.

Python works, but its make did not finish cleanly: several Standard Library 
modules failed to build (see attached: it has to be a screenshot since 
VirtualBox does not support cut-and-paste on UnixWare).

Can you suggest what should be done so that `multiprocessing`, `ssl`, and 
`select` will compile/build successfully?

--
components: Build
files: Python_make_failure.PNG
messages: 250244
nosy: ronbarak
priority: normal
severity: normal
status: open
title: Python 2.7.10 make - fails on some Standard Library Modules
versions: Python 2.7
Added file: http://bugs.python.org/file40411/Python_make_failure.PNG

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Guido van Rossum

Guido van Rossum added the comment:

To Theo it's probably inconceivable that anyone would be using random numbers 
for anything besides crypto security. :-) His favorite is arc4random() (but he 
notes it's not based on RC4 anymore, but uses chacha -- I have no idea what any 
of that means :-). He did say userland PRNG a few times.

--

___
Python tracker 

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



[issue25032] IDLE - same menubar across application

2015-09-08 Thread Mark Roseman

New submission from Mark Roseman:

Right now the menubar is slightly different for the shell (has Debug) and the 
editor windows (has Format and Run). I'd like to suggest the same menubar be 
used for all windows.

Rationale:

1. Easier to use, especially for systems that share a single menubar visually 
across the top of screen.

2. Later on we'll likely have situations where shell and one or more editors 
are part of the same toplevel window.


Implementation Notes:

1. Tk lets you reuse the same menubar across multiple toplevel windows (it 
actually creates a 'clone' every time it gets attached to the window).

2. This will simplify code e.g. for managing help and windows menus, which now 
have to do the same thing for multiple menubars.

3. Using tabbed windows, while it's possible to swap the menubar on the fly as 
you swap windows, it's not necessarily desirable to do so.

4. I've mocked up a system for menu validation/dispatch that will simplify how 
menu commands are handled now depending on what window is in front, and makes 
it easier to ensure the right things are enabled/disabled based on context.

--
components: IDLE
messages: 250242
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - same menubar across application
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Tim Peters

Tim Peters added the comment:

Guido, you're clearly talking with someone who knows too much ;-)  If we're 
using the Twister for _anything_ related to crypto-level randomness, then I'd 
appalled - it was utterly unsuitable for any such purpose from day 1.  But as a 
general-purpose generator for non-crypto uses, it remains an excellent choice, 
and still a nearly de facto standard for "almost all" such purposes.  There are 
general-purpose generators I like better now, but won't push in that direction 
until the Twister's "nearly de facto standard" status fades.  Better to be a 
follower than a leader in this area.

--
nosy: +tim.peters

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Attached a fix for distutils that will include the required vcruntime DLL with 
the extension.

This is purely Python source code and only needs to be patched on the build 
machine.

I have tested with a numpy build from source (setup.py bdist_wheel) and it 
works correctly on a clean Win7 machine with only a Python 3.5.0rc3 install.

When multiple vcruntime###.dll files are available, the first one that is 
loaded wins. This means that if you can guarantee a particular import occurs 
first, you can omit the DLL elsewhere in your package. There is no way to 
determine this automatically, 

Because of the way I wrote the patch, if you build with DISTUTILS_USE_SDK set, 
you will get the old static linking unless you also define PY_VCRUNTIME_REDIST 
to the path of the file to include. If the redist file cannot be found (you 
probably don't have the compiler either, but assuming you do), you will get the 
old static linking. I think this is the right balance of "works-by-default" and 
"I know what I'm doing let me control it" (though now I put them next to each 
other, I could rename the variable to DISTUTILS_VCRUNTIME_REDIST).

Will work up a test for it, but wanted to get feedback on the approach first.

--
keywords: +patch
Added file: http://bugs.python.org/file40410/25027_1.patch

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

In addition to a PendingDeprecationWarning in 3.6, it might be nice to put a 
note in the asyncore/asynchat docs like we did for optparse.

--

___
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-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This looks more maintainable than I expected, so I will definite try it out.

--

___
Python tracker 

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



[issue18590] Found text not always highlighted by Replace dialog on Windows

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

See #24972 for fix

--

___
Python tracker 

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



[issue22179] Idle. Search dialog found text not highlited on Windows

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

See #24972 for fix

--

___
Python tracker 

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



[issue24813] Idle Help dialogs shouldn't be modal

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

Have attached about.patch, which changes the about dialog to no longer be 
modal, as well as does a substantial redesign, where the various help texts are 
displayed within the dialog itself, rather than launching (further modal) new 
windows.

Note: this new dialog works on both Tk 8.4 and 8.5+

--
keywords: +patch
Added file: http://bugs.python.org/file40409/about.patch

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Guido van Rossum

Guido van Rossum added the comment:

> Is it ok to add the PendingDeprecationWarning in Python 3.5.1?

I prefer to wait until 3.6.  A bugfix release should not rock the boat, it 
should not make your code emit new warnings.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

> Ideally these modules should emit a deprecation warning starting in 3.6

Is it ok to add the PendingDeprecationWarning in Python 3.5.1?

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Victor's suggestion also aligns with my thinking on the subject as well: 
deprecate the modules but simply leave them sitting there for compatibility 
reasons until Python 4 of whenever we feel like the Python 2 transition is done 
for those that will ever bother making the switch. That way people's 
expectations are in the proper alignment of where things will end up and code 
won't break if it straddles Python 2 & 3 short of having to silence a 
deprecation warning. I think this is a good use of PendingDeprecationWarning 
and the message both in the deprecation and the docs can make it clear that the 
removal date is not planned but you should avoid using the module in new code.

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

By the way Stefan, if you want a copy of the ICC compiler to test with, you can 
contact robert.s.c...@intel.com.

--

___
Python tracker 

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



[issue25031] IDLE - file list improvements

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

This first patch is a straight refactoring so that other modules do not touch 
the FileList internals. 

This is done in two steps. First, we remove references to inversedict etc. from 
outside FileList.

Second, we run all notifications through FileList. So for example when the 
config dialog wants to notify all editors of changes, it previously walked 
through the list of windows and called various editor methods directly. Now, 
the config dialog asks FileList to notify all editors. Each editor implements 
the callback to make the needed changes. 

Same code, just moved to a more appropriate place. The config dialog no longer 
needs any knowledge of FileList or of EditorWindow. Later more of these sorts 
of callbacks will be added. Doing it this way provides a framework where 
different components might respond differently to these notifications.

--
keywords: +patch
Added file: http://bugs.python.org/file40408/hide_flist_internals.patch

___
Python tracker 

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



[issue25031] IDLE - file list improvements

2015-09-08 Thread Mark Roseman

New submission from Mark Roseman:

This is a placeholder for what will be a series of patches to the FileList to 
generalize and enhance it.

This is part of generalizing pieces of IDLE to be more flexible, including 
things like editors not necessarily being in toplevel windows, dialogs not 
being modal, etc.

The goal is to turn the FileList into an application "hub" that knows about the 
various pieces of the application, and can be used for communication between 
them. Some aspects of this will include:

1. Ensuring other modules don't use internal implementation (e.g. 
dict/inversedict) so can change it later.

2. Merging PyShellFileList into here (will keep things simpler).

3. Having FileList launch/keep track of certain dialogs (e.g. config) or other 
non-editor components.

4. Eventually take on some other responsibilities from editors, part of a 
general component/container refactoring.

--
components: IDLE
messages: 250229
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - file list improvements
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

Visual studio apparently has the option /F to set the stack size.
Maybe ICC has one, too.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

It shouldn't be - locale state is in the shared part of the CRT. That is one of 
the reasons I was keen to move to this model (everyone seems to think that 
FILE* is the only problem with mixing CRT versions :) )

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

The reason I asked: We had issues where extension modules linked
against a different CRT had isolated locale settings from the
interpreter, i.e., changes made by the module would not be seen
by the interpreter.

I don't know if this is still an issue with the new runtimes.

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

My test runs the following command on Linux (Fedora 22):

make && bash -c 'ulimit -v 100; ./python -u -m test -v test_strptime' 

* current default branch (rev 3c0c153d6b02): MemoryError
* with 25029_1.patch: the test pass

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

@eryksun - that's exactly what I've just done :)

Unfortunately, I don't have a _locale module, so I can't do Victor's test. 
Attached my patch in case Victor is around to test it.

--
keywords: +patch
Added file: http://bugs.python.org/file40407/25029_1.patch

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

It seems to be /MTd. Sorry for the noise (and yay! for horizontal scrolling :).

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Kind-of... We use the same flags I described in my blog[1] so that we don't 
have any version-specific dependencies.

You should (might) see /MT in the build logs, but then we replace most of the 
static CRT with the dynamic (but versionless) one. The versioned parts 
(including the FlsAlloc call - module initialization is compiler version 
specific) are statically linked.

I'm going to try and update distutils to build with /MD again (sorry 
Christoph!) and include vcruntime###.dll in the output. That way, people who 
bdist_wheel will include all of their own dependencies and don't have to worry 
about whether users are on Python 3.5.0 or 3.9.9.

[1]: http://stevedower.id.au/blog/building-for-python-3-5/

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

If you care of smooth python 2 => python 3 migration, I suggest to
deprecate smtpd and remove it later, when asyncore & asynchat will
also be removed (ex: in Python 4?).

I suggest to write a *new* SMTP server module using asyncio. As I
explained, the API will be very different for the user of the API.

--

___
Python tracker 

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



[issue25025] Missing 3.5.0 RC3 tarballs (FTP) on Fastly nodes

2015-09-08 Thread koobs

koobs added the comment:

Was a bug, now fixed (adjust title/resolution to compensate)

Thanks Berker!

--
resolution: not a bug -> fixed
title: Missing 3.5.0 RC3 tarballs (FTP) -> Missing 3.5.0 RC3 tarballs (FTP) on 
Fastly nodes

___
Python tracker 

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



[issue25025] Missing 3.5.0 RC3 tarballs (FTP)

2015-09-08 Thread Berker Peksag

Berker Peksag added the comment:

koobs and I have confirmed(on #python-dev) this was a cache issue.

--
nosy: +berker.peksag
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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

Ah, interesting.  We know that there are stack overflow issues on the ICC 
windows build (they show up consistently in a debug build).

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

Is Python-core built with /MD? I cannot see the flags in the buildbot
logs.

--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

The two cases are not parallel, in that NamedTemporaryFile closes the file at 
the end of the context manager, whereas the *only* thing the TemporaryDirectory 
does is delete the directory on cleanup.

There is some value to the "parallel interface" argument, so I'm only -0 on 
this.

--
nosy: +r.david.murray
type:  -> enhancement

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread eryksun

eryksun added the comment:

Steve, it seems to me that for MSVC the EINVAL test should come first:
   
_Py_BEGIN_SUPPRESS_IPH
olderr = errno;
errno = 0;
buflen = format_time(outbuf, i, fmt, &buf);
err = errno;
errno = olderr;
_Py_END_SUPPRESS_IPH

if (buflen == 0 && err == EINVAL) {
PyErr_SetString(PyExc_ValueError, "Invalid format string");
break;
}

Then the old test could be restored, i.e. (buflen > 0 || i >= 256 * fmtlen).

--
nosy: +eryksun

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

I'll fix it on #25029. This thread is already too long for my liking.

--
resolution:  -> fixed
status: open -> closed
superseder:  -> MemoryError in test_strptime

___
Python tracker 

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



  1   2   >