[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

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



[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 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs

--
assignee: docs@python
components: Documentation
messages: 274525
nosy: docs@python, mhammond
priority: normal
severity: normal
status: open
title: PEP-397 documents incorrect registry path

___
Python tracker 

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



[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` clause when the exception arises.

The problem though is different: please feel free to set the sleep in the `try` 
block to `sleep(100)` -- and unless the thread creation and startup takes 99 
seconds, you should *not* run into that race, the problem however persists:

---
merzky@thinkie:~ $ grep -C 2 sleep bug.py

def sub(pid):
time.sleep(1)
os.kill(pid, signal.SIGUSR2)

--
t = mt.Thread(target=sub, args=[os.getpid()])
t.start()
time.sleep(100)
except Exception as e:
print 'except: %s' % e

merzky@thinkie:~ $ while true; do i=$((i+1)); echo -n "$i: "; python bug.py || 
break; done
1: except: caught sigusr2
2: except: caught sigusr2
3: except: caught sigusr2
4: Traceback (most recent call last):
  File "bug.py", line 30, in 
print 'unexcepted'
  File "bug.py", line 14, in sigusr2_handler
raise RuntimeError('caught sigusr2')
RuntimeError: caught sigusr2
--

In this case, the begaviour does depend on `ctypes` -- or at least I have not 
seen that problem without `ctypes` being used.

Thanks, Andre.

--

___
Python tracker 

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



[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 

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



[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 

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



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

--

___
Python tracker 

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



[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_socket.LinuxKernelCryptoAPI)

It's Linux 4.4.6. configure says "checking for sockaddr_alg... yes".

--

___
Python tracker 

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



[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, I don't see the point of having two options
with the same purpose.

> b. Given (a), what if the new "text" parameter also accepted a new 
> "subprocess.TextConfig" object in addition to the base behaviour of doing a 
> plain bool(text) check to activate the defaults?

Can you give an example? I don't see how the API would be used.

--

___
Python tracker 

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



[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 Unicode when writing:

output = subprocess.call(cmd, stdout=subprocess.PIPE, encoding='utf8').stdout

--

___
Python tracker 

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



[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 

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



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 be passed to TextIOWrapper, so you can set even
more arguments:

* encoding
* errors
* newline
* line_buffering
* write_through

But I still think that simple encoding + errors arguments should be
added for the common case : Popen(cmd, encoding='utf8').

You can combine options: Popen(cmd, stdin={'encoding': 'oem'},
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='ansi'):
stdout and stderr use the ANSI code page.

--

___
Python tracker 

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



[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.LinuxKernelCryptoAPI)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/support/__init__.py",
 line 523, in wrapper
return func(*args, **kw)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_socket.py",
 line 5428, in test_aead_aes_gcm
with self.create_alg('aead', 'gcm(aes)') as algo:
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_socket.py",
 line 5346, in create_alg
sock.bind((typ, name))
FileNotFoundError: [Errno 2] No such file or directory

Similar failures for test_aes_cbc test_drbg_pr_sha256 test_hmac_sha1 
test_sha256.

--

___
Python tracker 

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



[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.ContextTests)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_ssl.py", 
line 840, in test_get_ciphers
ctx.set_ciphers('ECDHE+AESGCM:!ECDSA')
ssl.SSLError: ('No cipher can be selected.',)

--
nosy: +martin.panter

___
Python tracker 

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



[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'*(0x/4)
>>> ctypes.set_conversion_mode(s, s)
('ascii', 'strict')

--
nosy: +xiang.zhang

___
Python tracker 

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



[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 

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



[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/builds/110/steps/test/logs/stdio

==
FAIL: test_non_ascii (test.test_cmd_line_script.CmdLineTest)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_cmd_line_script.py",
 line 517, in test_non_ascii
rc, stdout, stderr = assert_python_ok(script_name)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/support/script_helper.py",
 line 139, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/support/script_helper.py",
 line 125, in _assert_python
err))
AssertionError: Process return code is 1
command line: 
['/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/python', 
'-X', 'faulthandler', '-I', './@test_60885_tmp\udce7w\udcf0.py']

stdout:
---

---

stderr:
---
UnicodeEncodeError: 'ascii' codec can't encode character '\xe7' in position 17: 
ordinal not in range(128)
---

==
FAIL: test_nonascii (test.test_readline.TestReadline)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current.nondebug/build/Lib/test/test_readline.py",
 line 203, in test_nonascii
self.assertIn(b"text 't\\xeb'\r\n", output)
AssertionError: b"text 't\\xeb'\r\n" not found in 
bytearray(b"^A^B^B^B^B^B^B^B\t\tx\t\r\n[\x07\r\x07\x07\x07\x07\x07\x07\x07\x07x[\x08\x07\r\nresult
 \'x[\'\r\nhistory \'x[\'\r\n")

--
nosy: +martin.panter

___
Python tracker 

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



[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 the file through the (IDLE/python) 
script/interpreter/compiler. On other systems it seems to automatically ad the 
.py extension when saving files, but not on my Macbook Pro (Running OS X El 
Capitan V 10.11.6). Please help

--
components: Macintosh
messages: 274511
nosy: InfiniteHybrid, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: automatic .py extension
type: performance
versions: Python 3.5

___
Python tracker 

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



[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 new "text" parameter also accepted a new 
"subprocess.TextConfig" object in addition to the base behaviour of doing a 
plain bool(text) check to activate the defaults?

One of the biggest problems we have with subprocess.Popen is that it still 
attempts to use a flat configuration model for a complex operation involving 
4-7 underlying elements (starting the subprocess, configuring stdin, 
configuring stdout, configuring stderr, and potentially local counterparts for 
stdin/stdout/stderr if pipes are used), and that situations unlikely to ever 
improve unless we start introducing some hierarchical elements to the 
configuration that better mirror the structure of the underlying system 
capabilities.

--

___
Python tracker 

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



[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 universal_newlines=False 
(the default)?

--

___
Python tracker 

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



[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 (0:15:00)!
Thread 0x7f2843d94700 (most recent call first):
  File 
"/home/buildbot/buildarea/3.x.intel-ubuntu-skylake/build/Lib/test/test_socket.py",
 line 5389 in test_aes_cbc
  File 
"/home/buildbot/buildarea/3.x.intel-ubuntu-skylake/build/Lib/test/support/__init__.py",
 line 523 in wrapper
  File 
"/home/buildbot/buildarea/3.x.intel-ubuntu-skylake/build/Lib/unittest/case.py", 
line 600 in run
  . . .

--
nosy: +martin.panter

___
Python tracker 

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



[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 

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



[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, or to create a throwaway sorted list for testing, 
like:

assert data2[low: high] == sorted(data[low: high])

In my own code, I find hundreds of uses of `sorted()`, but only a few dozen of 
`random.shuffle()`, and in none of the latter cases would `shuffled()` have 
been useful.

--
nosy: +tim.peters
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[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 

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



[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: 274504
nosy: rhettinger, steven.daprano
priority: normal
severity: normal
status: open
title: Add random.shuffled

___
Python tracker 

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



[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 

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



[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 branch '3.5':
Issue #27960: Merge with 3.4
https://hg.python.org/cpython/rev/b442744d2d22

New changeset 7cec1a1d6950 by Jason R. Coombs in branch 'default':
Issue #27960: Merge with 3.5
https://hg.python.org/cpython/rev/7cec1a1d6950

--
nosy: +python-dev

___
Python tracker 

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



[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

--

___
Python tracker 

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



[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 

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



[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.)

--

___
Python tracker 

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



[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 

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



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

--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



[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 

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



[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.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_conversion_errors);
_ctypes_conversion_errors = PyMem_Malloc(strlen(mode) + 1); //if memory is 
not enough, _ctypes_conversion_errors will be null
strcpy(_ctypes_conversion_errors, mode); // crash here
return result;
}



Test script:
---

import ctypes

s = 'a'*(0x/2-0x)
sss = 'a'*(0x/4)
ctypes.set_conversion_mode('a', s)


Expected result:

No Crash

Actual result:
--
Starting program: /home/minhrau/cpython-2.7/python ~/pythontestcase/test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xf7def209 in __strcpy_sse2 () from /usr/lib32/libc.so.6
(gdb) bt
#0  0xf7def209 in __strcpy_sse2 () from /usr/lib32/libc.so.6
#1  0xf7fba5f2 in set_conversion_mode (self=0x0, args=0xf7cd602c) at 
/home/minhrau/cpython-2.7/Modules/_ctypes/callproc.c:1706
#2  0x080f6dfc in call_function (oparg=, pp_stack=0xd45c) at 
Python/ceval.c:4350
#3  PyEval_EvalFrameEx (f=, throwflag=) at 
Python/ceval.c:2987
#4  0x080f964e in PyEval_EvalCodeEx (co=0xf7cc94e8, globals=0xf7d5b714, 
locals=0xf7d5b714, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, closure=0x0) at Python/ceval.c:3582
#5  0x080f9942 in PyEval_EvalCode (co=0xf7cc94e8, globals=0xf7d5b714, 
locals=0xf7d5b714) at Python/ceval.c:669
#6  0x0811e928 in run_mod (arena=0x8264f18, flags=0xd64c, 
locals=0xf7d5b714, globals=0xf7d5b714, filename=0xd96e 
"/home/minhrau/pythontestcase/test.py", mod=0x826daa0) at 
Python/pythonrun.c:1376
#7  PyRun_FileExFlags (fp=0x826c788, filename=0xd96e 
"/home/minhrau/pythontestcase/test.py", start=257, globals=0xf7d5b714, 
locals=0xf7d5b714, closeit=1, flags=0xd64c) at Python/pythonrun.c:1362
#8  0x081202f4 in PyRun_SimpleFileExFlags (fp=0x826c788, filename=0xd96e 
"/home/minhrau/pythontestcase/test.py", closeit=1, flags=0xd64c) at 
Python/pythonrun.c:948
#9  0x0805a37d in Py_Main (argc=2, argv=0xd794) at Modules/main.c:640
#10 0x080594cb in main (argc=2, argv=0xd794) at ./Modules/python.c:20
(gdb) 


Patch:
--
file: cpython-2.7/Modules/_ctypes/callproc.c
1706,1707d1705
< if (_ctypes_conversion_errors == NULL)
< return PyErr_NoMemory();

--
components: ctypes
messages: 274494
nosy: minhrau
priority: normal
severity: normal
status: open
title: null poiter dereference in set_conversion_mode dua uncheck 
_ctypes_conversion_errors
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



[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);
_ctypes_conversion_encoding = PyMem_Malloc(strlen(coding) + 1); //if 
memory is not enough, _ctypes_conversion_encoding will be null
strcpy(_ctypes_conversion_encoding, coding); // crash here
} else {
...


Test script:
---

import ctypes

s = 'a'*(0x/2-0x)
sss = 'a'*(0x/4)
ctypes.set_conversion_mode(s, s)


Expected result:

No Crash

Actual result:
--
Starting program: /home/minhrau/cpython-2.7/python ~/pythontestcase/test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xf7def209 in __strcpy_sse2 () from /usr/lib32/libc.so.6
(gdb) bt
#0  0xf7def209 in __strcpy_sse2 () from /usr/lib32/libc.so.6
#1  0xf7fba5c2 in set_conversion_mode (self=0x0, args=0xf7cd602c) at 
/home/minhrau/cpython-2.7/Modules/_ctypes/callproc.c:1700
#2  0x080f6dfc in call_function (oparg=, pp_stack=0xd45c) at 
Python/ceval.c:4350
#3  PyEval_EvalFrameEx (f=, throwflag=) at 
Python/ceval.c:2987
#4  0x080f964e in PyEval_EvalCodeEx (co=0xf7cc94e8, globals=0xf7d5b714, 
locals=0xf7d5b714, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, closure=0x0) at Python/ceval.c:3582
#5  0x080f9942 in PyEval_EvalCode (co=0xf7cc94e8, globals=0xf7d5b714, 
locals=0xf7d5b714) at Python/ceval.c:669
#6  0x0811e928 in run_mod (arena=0x8264f18, flags=0xd64c, 
locals=0xf7d5b714, globals=0xf7d5b714, filename=0xd96e 
"/home/minhrau/pythontestcase/test.py", mod=0x826daa0) at 
Python/pythonrun.c:1376
#7  PyRun_FileExFlags (fp=0x826c788, filename=0xd96e 
"/home/minhrau/pythontestcase/test.py", start=257, globals=0xf7d5b714, 
locals=0xf7d5b714, closeit=1, flags=0xd64c) at Python/pythonrun.c:1362
#8  0x081202f4 in PyRun_SimpleFileExFlags (fp=0x826c788, filename=0xd96e 
"/home/minhrau/pythontestcase/test.py", closeit=1, flags=0xd64c) at 
Python/pythonrun.c:948
#9  0x0805a37d in Py_Main (argc=2, argv=0xd794) at Modules/main.c:640
#10 0x080594cb in main (argc=2, argv=0xd794) at ./Modules/python.c:20

Patch:
--
file: cpython-2.7/Modules/_ctypes/callproc.c
1700,1701d1699
< if (_ctypes_conversion_encoding == NULL)
< return PyErr_NoMemory();

--
components: ctypes
messages: 274493
nosy: minhrau
priority: normal
severity: normal
status: open
title: null poiter dereference in set_conversion_mode dua uncheck 
_ctypes_conversion_encoding
type: security
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



[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 

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



[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 

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



[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 
cc86e9e102e8 to add test_suite() back.

The foolproof thing would be to copy the old working version of these files, 
review the diff, and check it back in as a new commit.

--
nosy: +martin.panter

___
Python tracker 

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



[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 later.

--

___
Python tracker 

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



[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 issue almost every time (with or without 
ctypes).  When the time.sleep() call is too short, you reach the finally block 
before the main thread receives the signal.  Because you're in the finally 
block, the exception isn't caught.

--
nosy: +gslavin

___
Python tracker 

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



[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 

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



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

___
Python tracker 

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



[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/.

--

___
Python tracker 

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



[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 to get intmax_t and uintmax_t types in Python (C 
code). These types are more convenient than having to play with #ifdef or if 
(value < ..._MAX).

--
nosy: +haypo

___
Python tracker 

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



[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 Windows compiler may not actually have “long long”; we use 
__int64 instead:

https://hg.python.org/cpython/annotate/default/PC/pyconfig.h#l267

so maybe in some places (such as this bug title) you should refer to 
PY_LONG_LONG rathe than “long long” to avoid confusion :)

--
nosy: +martin.panter

___
Python tracker 

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



[issue27959] Add 'oem' encoding

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

Initial patch attached - tests to follow.

--
keywords: +patch
Added file: http://bugs.python.org/file44387/27959_1.patch

___
Python tracker 

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



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

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

Initial patch attached - tests to follow.

--
Added file: http://bugs.python.org/file44386/6135_1.patch

___
Python tracker 

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



[issue27940] xml.etree: Avoid XML declaration for the "ascii" encoding

2016-09-05 Thread STINNER Victor

STINNER Victor added the comment:

New patch:

* Avoid codecs.lookup() for method != "xml"
* More unit tests

--
Added file: http://bugs.python.org/file44385/etree_xml_declaration-2.patch

___
Python tracker 

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



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

2016-09-05 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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

___
Python tracker 

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



[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-09-05 Thread Senthil Kumaran

Senthil Kumaran added the comment:

The documentation changes made as part of this issue were applicable to 3.5 
branch too. 

I had to touch the docs in this area as part of issue20842, and ended up with 
two patches one for 3.5 and another 3.6.

I think, it is a good idea to backport the change to 3.5 branch.

--
nosy: +orsenthil

___
Python tracker 

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



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-09-05 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Change committed.

- 3.5 * 103098:ecbad01262c8
- default * 103099:ee58ece83391

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

___
Python tracker 

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



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-09-05 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is 3.3 version of patch attached.

--
Added file: http://bugs.python.org/file44383/issue20842-3.3-v5.patch

___
Python tracker 

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



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

2016-09-05 Thread Emanuel Barry

Emanuel Barry added the comment:

We're one week from the feature freeze, seems like a good time to merge this :)

--

___
Python tracker 

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



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-05 Thread Emanuel Barry

Emanuel Barry added the comment:

Updated and rebased patch. There's a few file tweaks here and there to stay up 
to date, otherwise it's mostly the same.

Martin, it may look like I've ignored your comments, but I'm trying to keep the 
patches as simple as possible, and so I don't want to go further than to make 
strings into raw strings (also the alignment issue you pointed out). I'd rather 
have the other issues addressed in another issue, as I want to get this merged 
in time for the feature freeze. The other issues (some which were already 
present) can be taken care of during the beta phase.

--
title: Deprecate invalid unicode escape sequences -> Deprecate invalid escape 
sequences in str/bytes
Added file: http://bugs.python.org/file44382/invalid_stdlib_escapes_3.patch

___
Python tracker 

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



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-09-05 Thread Senthil Kumaran

Senthil Kumaran added the comment:

For 3.5 version of patch, we have bring in some additional changes from 
issue26896 which properly clarified finder from importer. These changes are not 
required in the default branch.

--

___
Python tracker 

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



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

2016-09-05 Thread Benjamin Peterson

New submission from Benjamin Peterson:

Neither Python 2.7 nor 3.3+ compile without HAVE_LONG_LONG, so effectively this 
is already completely unsupported. Let's completely dump it in 3.6.

--
components: Interpreter Core
messages: 274473
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: remove support for platforms without "long long"
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



[issue27960] Distutils tests are broken in 3.4

2016-09-05 Thread Larry Hastings

New submission from Larry Hastings:

3.4.5 shipped with a working test suite.  Since the release of 3.4.5 somebody 
broke test_distutils in the 3.4 branch.  It needs to be fixed.

jason.coombs: AFAICT you were the last person to touch it.  Are you the one who 
broke it?


 % ./python -m test test_distutils
[1/1] test_distutils
test test_distutils crashed -- Traceback (most recent call last):
  File "/home/larry/src/python/broke34/Lib/test/regrtest.py", line 1279, in 
runtest_inner
test_runner()
  File "/home/larry/src/python/broke34/Lib/test/test_distutils.py", line 13, in 
test_main
test.support.run_unittest(distutils.tests.test_suite())
  File "/home/larry/src/python/broke34/Lib/distutils/tests/__init__.py", line 
31, in test_suite
suite.addTest(module.test_suite())
AttributeError: 'module' object has no attribute 'test_suite'

1 test failed:
test_distutils

--
assignee: jason.coombs
components: Tests
keywords: 3.4regression
messages: 274472
nosy: jason.coombs, larry, zach.ware
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Distutils tests are broken in 3.4
type: crash
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



[issue27959] Add 'oem' encoding

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

While I'm here, should also move `aliasmbcs` from site.py into initialization - 
no reason for this behaviour to depend on importing site.

--

___
Python tracker 

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



[issue27959] Add 'oem' encoding

2016-09-05 Thread Steve Dower

New submission from Steve Dower:

Currently the ANSI encoding is available on Windows as 'mbcs', however the OEM 
encoding (sometimes used by console-based applications) is not easily available.

The implementation is identical to PyUnicode_DecodeMBCS[Stateful], simply 
passing CP_OEM instead of CP_ACP.

--
assignee: steve.dower
components: Windows
messages: 274470
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add 'oem' encoding
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



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

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

'mbcs' is exactly equivalent to what 'ansi' would be, so that's just a matter 
of knowing the name. I'm okay with adding an alias for it though.

--

___
Python tracker 

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



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

2016-09-05 Thread STINNER Victor

STINNER Victor added the comment:

> * add 'oem' encoding to make it easy to choose (but don't try and guess when 
> it is used)

I suggest to open a separated issue for that. By the way, you might also add 
"ansi"? See also the aliasmbcs() function of the site module.

Note: I never liked that aliasmbcs() is implemented in Python and is "optional" 
(not done with using python3 -S).

--

___
Python tracker 

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



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

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

I'll prepare a patch for the following:
* add encoding and errors parameters to subprocess functions
* add 'oem' encoding to make it easy to choose (but don't try and guess when it 
is used)

EITHER
* allow string or 2-tuple (stdin, stdout/err) or 3-tuple (stdin, stdout, 
stderr) for both encoding and errors
OR
* only allow single specified encoding/errors
* add stdin_opener/stdout_opener/stderr_opener parameters to produce the 
text-based reader

Any thoughts?

--
assignee:  -> steve.dower
nosy: +steve.dower

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

Chatting about this with Victor we've decided to close this as a duplicate of 
issue6135 and continue the discussion there, and also focus mainly on exposing 
the parameter rather than trying to guess the correct encoding. I'll post more 
details on issue6135.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> subprocess seems to use local encoding and give no choice

___
Python tracker 

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



[issue20366] SQLite FTS (full text search)

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d52f10a0f10d by Zachary Ware in branch 'default':
Closes #20366: Build full text search support into SQLite on Windows
https://hg.python.org/cpython/rev/d52f10a0f10d

--
nosy: +python-dev
resolution:  -> fixed
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



[issue27958] 'zlib compression' not found in set(['RLE', 'ZLIB', None])

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d92f26a53b70 by Christian Heimes in branch 'default':
Issue #26470: Use short name rather than name for compression name to fix 
#27958.
https://hg.python.org/cpython/rev/d92f26a53b70

--

___
Python tracker 

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



[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-09-05 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I agree with the comment made by Oren. Not all instances of finder should be 
referenced as generic finder. Some classes and functions are are still PEP 302 
specific finder.

In the commit, 3987667bf98f Nick Coghlan modified the following functions to to 
use importlib module, thus serving the PEP 302 bind. So these can refer to 
glossary entry for finder. The documentation has been updated with version 
changed information.

* get_importer (by the underlying change of using only sys.path_importer_cache 
and removing the use of ImpImporter)
* iter_importers (by using importlib.import_module)

The glossary entry for both finder and loader has been updated to include both 
PEP 302 finder, and with PEP 420 and PEP 451.

With these changes already in place, I updated the patch to reflect the current 
state. 

I am proceed with the commit as this is a non-controversial change. If there 
are comments, please share and I will address them.

--
nosy: +orsenthil
Added file: http://bugs.python.org/file44381/issue20842-v3.patch

___
Python tracker 

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



[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d92f26a53b70 by Christian Heimes in branch 'default':
Issue #26470: Use short name rather than name for compression name to fix 
#27958.
https://hg.python.org/cpython/rev/d92f26a53b70

--

___
Python tracker 

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



[issue27958] 'zlib compression' not found in set(['RLE', 'ZLIB', None])

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5566732c8ac5 by Christian Heimes in branch '3.5':
Issue #26470: Use short name rather than name for compression name to fix 
#27958.
https://hg.python.org/cpython/rev/5566732c8ac5

New changeset 2593ed9a6a62 by Christian Heimes in branch '2.7':
Issue #26470: Use short name rather than name for compression name to fix 
#27958.
https://hg.python.org/cpython/rev/2593ed9a6a62

--
nosy: +python-dev

___
Python tracker 

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



[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5566732c8ac5 by Christian Heimes in branch '3.5':
Issue #26470: Use short name rather than name for compression name to fix 
#27958.
https://hg.python.org/cpython/rev/5566732c8ac5

New changeset 2593ed9a6a62 by Christian Heimes in branch '2.7':
Issue #26470: Use short name rather than name for compression name to fix 
#27958.
https://hg.python.org/cpython/rev/2593ed9a6a62

--

___
Python tracker 

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



[issue27748] Simplify test_winsound

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fb74947843eb by Zachary Ware in branch '2.7':
Issue #27748: Backed out changeset 6137d0ed0a15
https://hg.python.org/cpython/rev/fb74947843eb

New changeset e85ce70b73b3 by Zachary Ware in branch '3.5':
Issue #27748: Backed out changeset f845e24d794e
https://hg.python.org/cpython/rev/e85ce70b73b3

New changeset 29300ed6dffe by Zachary Ware in branch 'default':
Issue #27748: Merge with 3.5
https://hg.python.org/cpython/rev/29300ed6dffe

--

___
Python tracker 

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



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

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4ebe3ade6922 by Christian Heimes in branch 'default':
Issue 27744: AES-CBC and DRBG need Kernel 3.19+
https://hg.python.org/cpython/rev/4ebe3ade6922

--

___
Python tracker 

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



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

2016-09-05 Thread STINNER Victor

STINNER Victor added the comment:

> See also get_standard_encoding() in Python/codecs.c. I suppose it is faster.

I understand that PyCodec_SurrogatePassErrors() is already called with a 
normalized encoding name.

With my enhanced _Py_normalize_encoding(), strange syntaxes like " utf 8 " also 
take the fast path.


> UTF-32 is rarely used as external encoding, but ...

Ok, I used the same design than get_standard_encoding() to match the "utf" 
prefix, so having a fast-path for UTF-16 and UTF-32 doesn't add new strcmp() 
for "latin9".

I pushed my change, so I close the issue.

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



[issue27915] Use 'ascii' instead of 'us-ascii' to bypass lookup machinery

2016-09-05 Thread STINNER Victor

STINNER Victor added the comment:

Since "us-ascii" got a fast-path thanks to the issue #27938, this patch is not 
needed anymore.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



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

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 99818330b4c0 by Victor Stinner in branch 'default':
Issue #27938: Add a fast-path for us-ascii encoding
https://hg.python.org/cpython/rev/99818330b4c0

--
nosy: +python-dev

___
Python tracker 

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



[issue27106] configparser.__all__ is incomplete

2016-09-05 Thread Łukasz Langa

Łukasz Langa added the comment:

I'm still not convinced this change is *useful*. The list of incompatibilities 
in Python 3.6 in whatsnew is going to be used retrospectively by people already 
affected by a production issue, googling for an explanation as to what went 
wrong.

I like the idea of adding a unit test that clarifies the omission is deliberate 
at this point.

--

___
Python tracker 

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



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

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ee32af890e27 by Christian Heimes in branch 'default':
Issue 27744: Check for AF_ALG support in Kernel
https://hg.python.org/cpython/rev/ee32af890e27

--

___
Python tracker 

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



[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2016-09-05 Thread Zachary Ware

Zachary Ware added the comment:

I decided not to backport.  If anyone else would like to, I won't stand in 
their way.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.5

___
Python tracker 

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



[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e5b3dc049cc by Zachary Ware in branch 'default':
Issue #25387: Check return value of winsound.MessageBeep
https://hg.python.org/cpython/rev/4e5b3dc049cc

--
nosy: +python-dev

___
Python tracker 

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



[issue27748] Simplify test_winsound

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6137d0ed0a15 by Zachary Ware in branch '2.7':
Issue #27748: strengthen test_alias_nofallback
https://hg.python.org/cpython/rev/6137d0ed0a15

New changeset f845e24d794e by Zachary Ware in branch '3.5':
Issue #27748: strengthen test_alias_nofallback
https://hg.python.org/cpython/rev/f845e24d794e

New changeset 5e8b865ffedd by Zachary Ware in branch 'default':
Issue #27748: Merge with 3.5
https://hg.python.org/cpython/rev/5e8b865ffedd

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-05 Thread Eric Snow

Changes by Eric Snow :


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

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2016-09-05 Thread Steve Dower

Steve Dower added the comment:

Updated patch. This implements everything we've been discussing on python-dev

--
Added file: http://bugs.python.org/file44379/1602_3.patch

___
Python tracker 

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



[issue27928] Add hashlib.scrypt

2016-09-05 Thread Christian Heimes

Changes by Christian Heimes :


Added file: http://bugs.python.org/file44380/hashlib.scrypt.patch

___
Python tracker 

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



[issue27958] 'zlib compression' not found in set(['RLE', 'ZLIB', None])

2016-09-05 Thread Christian Heimes

New submission from Christian Heimes:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%202.7/builds/1397/steps/test/logs/stdio
 fails:

==
FAIL: test_compression (test.test_ssl.ThreadedTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/2.7.koobs-freebsd9/build/Lib/test/test_ssl.py", line 
2875, in test_compression
self.assertIn(stats['compression'], { None, 'ZLIB', 'RLE' })
AssertionError: 'zlib compression' not found in set(['RLE', 'ZLIB', None])

It's probably fine to add 'zlib compression' to the list of accepted 
compression names.

--
assignee: christian.heimes
components: Tests
messages: 274448
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: 'zlib compression' not found in set(['RLE', 'ZLIB', None])
type: behavior
versions: 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



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

2016-09-05 Thread Larry Hastings

Larry Hastings added the comment:

Committed.  Bye bye Windows CE!

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

___
Python tracker 

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



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

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a2eccee823b by Larry Hastings in branch 'default':
Issue #27355: Removed support for Windows CE.  It was never finished,
https://hg.python.org/cpython/rev/7a2eccee823b

--
nosy: +python-dev

___
Python tracker 

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



[issue27928] Add hashlib.scrypt

2016-09-05 Thread Christian Heimes

Changes by Christian Heimes :


Removed file: http://bugs.python.org/file44351/Add-hashlib.scrypt-3.patch

___
Python tracker 

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



[issue27928] Add hashlib.scrypt

2016-09-05 Thread Christian Heimes

Changes by Christian Heimes :


Removed file: http://bugs.python.org/file44326/Add-hashlib.scrypt.patch

___
Python tracker 

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



[issue27928] Add hashlib.scrypt

2016-09-05 Thread Christian Heimes

Changes by Christian Heimes :


Removed file: http://bugs.python.org/file44344/Add-hashlib.scrypt-2.patch

___
Python tracker 

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



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

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 52404f9596b5 by Christian Heimes in branch 'default':
Issue #27744: correct comment and markup
https://hg.python.org/cpython/rev/52404f9596b5

--

___
Python tracker 

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



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

2016-09-05 Thread Zachary Ware

Zachary Ware added the comment:

LGTM on Win32, Win64, and OSX.

--

___
Python tracker 

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



[issue27866] ssl: get list of enabled ciphers

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca8d7cb55a8e by Christian Heimes in branch 'default':
Issue #27866: Add SSLContext.get_ciphers() method to get a list of all enabled 
ciphers.
https://hg.python.org/cpython/rev/ca8d7cb55a8e

--
nosy: +python-dev

___
Python tracker 

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



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

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74ce062a0397 by Christian Heimes in branch 'default':
Issue #27744: Add AF_ALG (Linux Kernel crypto) to socket module.
https://hg.python.org/cpython/rev/74ce062a0397

--
nosy: +python-dev

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 635fd3912d4d by Eric Snow in branch 'default':
Issue #24254: Preserve class attribute definition order.
https://hg.python.org/cpython/rev/635fd3912d4d

--
nosy: +python-dev

___
Python tracker 

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



[issue27756] Add pyd icon for 3.6

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 386aa9738c6b by Steve Dower in branch 'default':
Issue #27756: Updates installer icons to be the console and launcher icon 
instead of the setup icon
https://hg.python.org/cpython/rev/386aa9738c6b

--

___
Python tracker 

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



[issue20366] SQLite FTS (full text search)

2016-09-05 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



  1   2   >