[issue27961] remove support for platforms without "long long"

2016-09-05 Thread Martin Panter
Martin Panter added the comment: Makes sense if it already doesn’t work without HAVE_LONG_LONG. This also came up in discussion of adding a BLAKE2 hash algorithm: . FWIW the normal

[issue27961] remove support for platforms without "long long"

2016-09-05 Thread STINNER Victor
STINNER Victor added the comment: Python/pytime.c of Python 3.5 requires a 64-bit integer type and Py_LONG_LONG. Nobody complains, so I'm in favor of dropping all these annoying HAVE_LONG_LONG and just use directly Py_LONG_LONG. It should simplify the code at lot! By the way, it would be cool

[issue27961] remove support for platforms without "long long"

2016-09-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: MSVC 2008 (at least) is documented to have "long long", too. https://msdn.microsoft.com/en-us/library/s3f49ktz(v=vs.90).aspx In fact, after this patch, I'm probably going to go s/PY_LONG_LONG/long long/. -- ___ P

[issue27961] remove support for platforms without "long long"

2016-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9206a86f7321 by Benjamin Peterson in branch 'default': require a long long data type (closes #27961) https://hg.python.org/cpython/rev/9206a86f7321 -- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> cl

[issue27959] Add 'oem' encoding

2016-09-05 Thread Steve Dower
Steve Dower added the comment: Forgot to include the oem.py file in that patch, but it's basically identical to mbcs.py except calling 'oem_encode' and 'oem_decode'. It'll be in the next one -- ___ Python tracker

[issue27889] ctypes interfers with signal handling

2016-09-05 Thread George Slavin
George Slavin added the comment: I can reproduce this issue with Python 2.7.12 and Python 3.5.2 on a Arch linux VM using the python script provided, but I think this is an error in the code. The repro is tied to the time.sleep call in the try block. If I do time.sleep(1), I can reproduce the

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that about "advanced API" to specify an encoding per stream, or even change other parameters like buffering or newlines. I suggest to start with the least controversal part: add encoding and errors and only accept a string. More patches can come

[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Martin Panter
Martin Panter added the comment: Probably related to the changes and Issue 12885. Most of the changes were probably reverted from 3.4 in revision e82b995d1a5c, but it looks like we also need to fully revert cc86e9e10

[issue27959] Add 'oem' encoding

2016-09-05 Thread Steve Dower
Steve Dower added the comment: Addressed most of the feedback, though I think having a fallback search function instead of the alias is better. -- Added file: http://bugs.python.org/file44388/27959_2.patch ___ Python tracker

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread Steve Dower
Steve Dower added the comment: Added tests. -- Added file: http://bugs.python.org/file44389/6135_2.patch ___ Python tracker ___ ___ Pyt

[issue27962] null poiter dereference in set_conversion_mode dua uncheck _ctypes_conversion_encoding

2016-09-05 Thread Minh Râu
New submission from Minh Râu: Description: Null dereference in function set_conversion_mode due uncheck _ctypes_conversion_encoding: static PyObject * set_conversion_mode(PyObject *self, PyObject *args) { ... if (coding) { PyMem_Free(_ctypes_conversion_encoding);

[issue27963] null poiter dereference in set_conversion_mode dua uncheck _ctypes_conversion_errors

2016-09-05 Thread Minh Râu
New submission from Minh Râu: Description: Null dereference in function set_conversion_mode due uncheck _ctypes_conversion_errors: static PyObject * set_conversion_mode(PyObject *self, PyObject *args) { char *coding, *mode; PyObject *result; ... PyMem_Free(_ctypes_conve

[issue27963] null poiter dereference in set_conversion_mode dua uncheck _ctypes_conversion_errors

2016-09-05 Thread Minh Râu
Changes by Minh Râu : -- type: -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27962] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_encoding

2016-09-05 Thread Minh Râu
Changes by Minh Râu : -- title: null poiter dereference in set_conversion_mode dua uncheck _ctypes_conversion_encoding -> null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_encoding ___ Python tracker

[issue27922] Make IDLE tests less flashy

2016-09-05 Thread Xiang Zhang
Xiang Zhang added the comment: It's fine, knowing that the maintainer thinks this behaviour is okay. :) -- ___ Python tracker ___ ___

[issue27963] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors

2016-09-05 Thread Minh Râu
Changes by Minh Râu : -- title: null poiter dereference in set_conversion_mode dua uncheck _ctypes_conversion_errors -> null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors ___ Python tracker

[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: Sorry you've had to spend any time on this. I'll get it corrected immediately. -- ___ Python tracker ___ __

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread Steve Dower
Steve Dower added the comment: You may be right about leaving out the opener API. The only use of it right now is for separate encodings, but I don't know how valuable that is. I'll pull it out tomorrow and just leave the encoding parameter. -- ___

[issue27355] Strip out the last lingering vestiges of Windows CE support

2016-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0ce745bb7717 by Martin Panter in branch 'default': Issue #27355: Import no longer needed https://hg.python.org/cpython/rev/0ce745bb7717 -- ___ Python tracker _

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-09-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Lisa is not a committer. The assignment means that she is working on the patch. BTW, the decimal package has long been my area as well (writing a C implementation does not give you exclusive decision making over the docstrings.) -- __

[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I invoked `hg revert --all -r 675e20c38fdac6` at the 3.4 head, and that effectively reverted everything to its state prior to the commits. -- ___ Python tracker _

[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 556a11c11edd by Jason R. Coombs in branch '3.4': Issue #27960: Revert state to 675e20c38fdac6, backing out all changes by developed for Issue #12885. https://hg.python.org/cpython/rev/556a11c11edd New changeset b442744d2d22 by Jason R. Coombs in br

[issue12885] distutils.filelist.findall() fails on broken symlink in Py2.x

2016-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 556a11c11edd by Jason R. Coombs in branch '3.4': Issue #27960: Revert state to 675e20c38fdac6, backing out all changes by developed for Issue #12885. https://hg.python.org/cpython/rev/556a11c11edd -- ___

[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe this is fixed now. I'll be testing locally, but please don't hesitate to let me know if you find otherwise. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue27964] Add random.shuffled

2016-09-05 Thread Steven D'Aprano
New submission from Steven D'Aprano: An occasionally requested feature is for a shuffled() function, related to the in-place random.shuffle() as sorted() is to list.sort(). See the latest example: https://mail.python.org/pipermail/python-ideas/2016-September/042096.html -- messages: 2

[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: Confirmed working here now. $ hg id -i 556a11c11edd $ ./python.exe -m test test_distutils [1/1] test_distutils 1 test OK. -- ___ Python tracker __

[issue27964] Add random.shuffled

2016-09-05 Thread Tim Peters
Tim Peters added the comment: I'm at best -0 on the idea: very easy to get the effect without it, and hard to imagine it's needed frequently. `sorted()` is also very easy to mimic, but is used often by all sorts of code. For example, to display output in a `for key in sorted(dict):` loop, o

[issue27964] Add random.shuffled

2016-09-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Steven, I concur with Tim and am going to reject this one. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ __

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-09-05 Thread Martin Panter
Martin Panter added the comment: Despite the last changes, test_aes_cbc() hangs for fifteen minutes: http://buildbot.python.org/all/builders/x86-64%20Ubuntu%2015.10%20Skylake%20CPU%203.x/builds/1298/steps/test/logs/stdio running: test_socket (900 sec) 0:28:47 [332/402] test_socket crashed Timeout

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread Martin Panter
Martin Panter added the comment: Would be nice to see tests for getstatusoutput() and the errors parameter. Also you need more error handling e.g. if the encoding is unsupported, I think the internal pipe files won’t be cleaned up. Also, should encoding=... or errors=... be an error if univers

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: A couple of high level questions: a. How do folks feel about providing a new "text" parameter to replace the cryptic "universal_newlines=True" that would explicitly be equivalent to "universal newlines with sys.getdefaultencoding()"? b. Given (a), what if the n

[issue27965] automatic .py extension

2016-09-05 Thread Marcquise Washington
New submission from Marcquise Washington: I am experiencing an issue where when I finish coding a program and I go to save file, just before running the program, I have manually add the .py extension, instead of the extension being already embedded with the file name, given that I am saving th

[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

2016-09-05 Thread Martin Panter
Martin Panter added the comment: It seems this change is the cause of the Free BSD buildbot failures. From memory, both failing cases involve sending or receiving non-ASCII bytes in child Python processes. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/buil

[issue27963] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors

2016-09-05 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, I tested the example snippet but it works. And PyMem_Free shouldn't fail when encounter NULL. The doc explicitly says "If p is NULL, no operation is performed". -- nosy: +xiang.zhang ___ Python tracker

[issue27962] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_encoding

2016-09-05 Thread Xiang Zhang
Xiang Zhang added the comment: Same as my comment in issue27963. Python 2.7.12+ (2.7:de9e410e78d8, Sep 6 2016, 12:28:48) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> >>> s = 'a'*(0x/2-0x) >>> sss = 'a'*

[issue27866] ssl: get list of enabled ciphers

2016-09-05 Thread Martin Panter
Martin Panter added the comment: Fails on the Gentoo buildbots: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1368/steps/test/logs/stdio == ERROR: test_get_ciphers (test.test_ssl.Contex

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-09-05 Thread Martin Panter
Martin Panter added the comment: Also, the Gentoo buildbots fail: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1368/steps/test/logs/stdio == ERROR: test_aead_aes_gcm (test.test_socket.L

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread STINNER Victor
STINNER Victor added the comment: Steve: > You may be right about leaving out the opener API. The only use of it right > now is for separate encodings, but I don't know how valuable that is. My proposal is: Popen(cmd, stdin={'encoding': 'oem'}, stdout={'encoding': 'ansi'}) The dict would just

[issue27965] automatic .py extension

2016-09-05 Thread Marcquise Washington
Changes by Marcquise Washington : -- type: behavior -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread STINNER Victor
STINNER Victor added the comment: Martin Panter added the comment: > Also, should encoding=... or errors=... be an error if > universal_newlines=False (the default)? Right. But if encoding or errors is used, universal_newlines value should be set automatically to True. For example, I expect Un

[issue27965] automatic .py extension

2016-09-05 Thread Martin Panter
Changes by Martin Panter : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy type: performance -> behavior ___ Python tracker ___

[issue6135] subprocess seems to use local encoding and give no choice

2016-09-05 Thread STINNER Victor
STINNER Victor added the comment: Nick Coghlan added the comment: > a. How do folks feel about providing a new "text" parameter to replace the > cryptic "universal_newlines=True" that would explicitly be equivalent to > "universal newlines with sys.getdefaultencoding()"? If it's just text=True

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-09-05 Thread STINNER Victor
STINNER Victor added the comment: > Also, the Gentoo buildbots fail: > http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1368/steps/test/logs/stdio > == > ERROR: test_aead_aes_gcm (test.test

[issue27963] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors

2016-09-05 Thread Xiang Zhang
Xiang Zhang added the comment: Ooh, I treat dereference as decref, sorry. Then I think it may happen when there is not enough memory. But your patch is not complete, at least you should Py_DECREF(result). But this function may need more care since the malloc failure in it will alter states. -

[issue27137] Python implementation of `functools.partial` is not a class

2016-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the nudge, and sorry for getting distracted! I won't be able to get to this today, but I'll definitely handle it in time for the deadline :) -- ___ Python tracker ___

[issue27962] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_encoding

2016-09-05 Thread Xiang Zhang
Xiang Zhang added the comment: I suggest close this as duplicate of issue27963 and fix these all in that issue. -- ___ Python tracker ___

[issue27889] ctypes interfers with signal handling

2016-09-05 Thread Andre Merzky
Andre Merzky added the comment: > The repro is tied to the time.sleep call in the try block. If I do > time.sleep(1) Yes - if both sleeps, the one in the `try` block and the one in the thread's routine (`sub`) are equal, then you'll have the typical race, and you can well be in the `finally`

[issue27966] PEP-397 documents incorrect registry path

2016-09-05 Thread Mark Hammond
New submission from Mark Hammond: Received via email: PEP-397 (PEP 397 -- Python launcher for Windows) says: """ The launcher installation is registered in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CurrentVersion\SharedDLLs with a reference counter. """ There is no such entry. It should be H

[issue27963] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors

2016-09-05 Thread Xiang Zhang
Xiang Zhang added the comment: issue27963.patch tries to fix the crash caused by not enough memory and avoid inconsistent state when failure. -- keywords: +patch Added file: http://bugs.python.org/file44390/issue27963.patch ___ Python tracker

[issue27963] null poiter dereference in set_conversion_mode due uncheck _ctypes_conversion_errors

2016-09-05 Thread Minh Râu
Minh Râu added the comment: the patch look good. Thank Xiang -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27967] Remove unused variables causing compile warnings in sqlite3 module

2016-09-05 Thread Xiang Zhang
New submission from Xiang Zhang: Compile py2.7 will generate two unused variable warnings in sqlite3 module. The variables have already not existed in py3. /home/angwer/py2.7/Modules/_sqlite/cursor.c: In function ‘pysqlite_cursor_dealloc’: /home/angwer/py2.7/Modules/_sqlite/cursor.c:121:9: war

[issue27968] test_coroutines generates some warnings

2016-09-05 Thread Xiang Zhang
New submission from Xiang Zhang: ./python -m test test_coroutines Run tests sequentially 0:00:00 [1/1] test_coroutines /home/angwer/cpython/Lib/test/test_coroutines.py:891: RuntimeWarning: coroutine 'CoroutineTest.test_await_12..coro' was never awaited return await Awaitable() /home/angwer/cpy

[issue27889] ctypes interfers with signal handling

2016-09-05 Thread George Slavin
George Slavin added the comment: Thanks for the reply! I've managed to reproduce the issue without using ctypes, so we can exclude ctypes as the cause of the problem :) The bug only occurs for me after hundreds of iterations of the script, so it is very intermittent. >From my results, it app

[issue27889] ctypes interfers with signal handling

2016-09-05 Thread Andre Merzky
Andre Merzky added the comment: Also thanks for the reply! :) Interesting that our results differ: as said, my code stumbles over it rather frequently, and I can't reproduce w/o ctypes activities. But indeed, the latter might just reinforce a race condition which is present either way...

<    1   2