[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 277b36596a54 by Serhiy Storchaka in branch '3.5':
Issue #29073: bytearray formatting no longer truncates on first null byte.
https://hg.python.org/cpython/rev/277b36596a54

New changeset 9b77e3a586b0 by Serhiy Storchaka in branch '3.6':
Issue #29073: Added a test for bytearray formatting with null byte.
https://hg.python.org/cpython/rev/9b77e3a586b0

New changeset 82bfdf599e24 by Serhiy Storchaka in branch 'default':
Issue #29073: Added a test for bytearray formatting with null byte.
https://hg.python.org/cpython/rev/82bfdf599e24

--
nosy: +python-dev

___
Python tracker 

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



[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-27 Thread Rüdiger Jungbeck

Rüdiger Jungbeck added the comment:

I have the same problem (on 2 different systems) with the win32 version in 
Windows 10.

The problem seems to go away when I start python -S so it has something to do 
with site.py

--
nosy: +ruediger.jungb...@rsj.de

___
Python tracker 

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



[issue29091] Python 3.5+ socket.socketpair fallback incorrectly implemented

2016-12-27 Thread Seth Michael Larson

New submission from Seth Michael Larson:

The socket.socketpair() fallback for Python 3.5+ is incorrectly implemented 
from the original source. The fallback doesn't provide a backlog argument to 
the lsock.listen() function call.

When running the function it gives the following error:
`TypeError: listen() takes exactly one argument (0 given)`

Issue can be seen here on line 514: 
https://hg.python.org/cpython/file/3.6/Lib/socket.py

Should add 1 as the argument to listen() to bring the implementation in line 
with the source implementation at: https://gist.github.com/geertj/4325783

--
components: Library (Lib)
messages: 284158
nosy: SethMichaelLarson
priority: normal
severity: normal
status: open
title: Python 3.5+ socket.socketpair fallback incorrectly implemented
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue29087] UCS4 support functions are not implemented

2016-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Victor.

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

___
Python tracker 

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



[issue29087] UCS4 support functions are not implemented

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29d46d29e169 by Serhiy Storchaka in branch '3.5':
Issue #29087: Removed the documentation of non-existing UCS4 support functions.
https://hg.python.org/cpython/rev/29d46d29e169

New changeset e44b6b01c8cf by Serhiy Storchaka in branch '3.6':
Issue #29087: Removed the documentation of non-existing UCS4 support functions.
https://hg.python.org/cpython/rev/e44b6b01c8cf

New changeset 0ec4befef7e0 by Serhiy Storchaka in branch 'default':
Issue #29087: Removed the documentation of non-existing UCS4 support functions.
https://hg.python.org/cpython/rev/0ec4befef7e0

--
nosy: +python-dev

___
Python tracker 

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



[issue28871] Destructor of ElementTree.Element is recursive

2016-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, I tested only with non-debug build in which asserts were ignored! In 2.7 
Element doesn't support garbage collection, and the trashcan mechanism 
Py_TRASHCAN_SAFE_BEGIN/Py_TRASHCAN_SAFE_END can't be applied.

I see three alternatives:

1. Just revert the changes. Let deep ElementTree crashing.

2. Add the support of garbage collection. This will increase the size of empty 
Element by 1.5 times. This looks less appropriate that the first option since 
this harms working code.

3. Try to implement different mechanism. By using external list object as a 
stack or using other field for creating a linked list.

I'll revert the patch (except tests fix) and will try to implement different 
mechanism.

--
stage: resolved -> needs patch
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue24288] Include/opcode.h is modified during building

2016-12-27 Thread Tres Seaver

Changes by Tres Seaver :


--
title: permissions -> Include/opcode.h is modified during building

___
Python tracker 

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



[issue24288] permissions

2016-12-27 Thread Tres Seaver

Changes by Tres Seaver :


--
title: Include/opcode.h is modified during building -> permissions

___
Python tracker 

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



[issue24288] Include/opcode.h is modified during building

2016-12-27 Thread Tres Seaver

Tres Seaver added the comment:

ISTM that this issue should be re-opened, because it breaks out-of-tree 
building from a pristine / read-only source tree.  If they are "public" 
headers, files like 'opcode.h' should be generated and checked in as part of 
the release process, rather than modified during a normal build.

--
nosy: +tseaver

___
Python tracker 

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



[issue29059] Windows: Python not using ANSI compatible console

2016-12-27 Thread Joseph Hackman

Joseph Hackman added the comment:

Thanks for the tip! If you hadn't said that, I probably would have written it 
into the init scripts.

I'll try to write something for python-ideas / PEP tomorrow, but have attached 
a quick patch here so I can link to this issue for an example implementation.

--
keywords: +patch
Added file: http://bugs.python.org/file46060/issue29059.patch

___
Python tracker 

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



[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread Xezlec

Xezlec added the comment:

> Perhaps the sentence about a tuple pointing to a mutable could be tightened 
> up, though, by saying that if a tuple points to something that can not itself 
> be a dictionary key, then that tuple can not be a dictionary key.

That would be great.  Thank you.

> I feel assuming early part of tutorial as final word bad practice.

Alright.  If that's how both of you feel, then it can't be helped.

But if that's how it is, then maybe it would be a good idea to make the 
tutorial more distinct?  Right now, the only way I can tell Google has landed 
me on a tutorial page as opposed to a reference page is the word "tutorial" in 
the URL and in small print at the very top of the page.  They're styled 
similarly.  I never even realized they were separate things until today (let 
alone that one of them must be read skeptically).

Sorry to take up your time.  Thanks for listening.

--

___
Python tracker 

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



[issue29057] Compiler failure on Mac OS X - sys/random.h

2016-12-27 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Right, my question is why does configure define HAVE_SYS_RANDOM_H if including 
sys/random.h causes an error?

--

___
Python tracker 

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



[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-27 Thread Nick Coghlan

Nick Coghlan added the comment:

I've now written this up as a PEP: 
https://github.com/python/peps/blob/master/pep-0538.txt

The latest attached patch implements the specific design proposed in the PEP. 
Relative to the last Fedora specific patch, this tweaks the warning message 
wording slightly, and only emits the library level warning when 
PYTHONALLOWCLOCALE is set:

==
$ LANG=C ./python -c "import sys; print(sys.getfilesystemencoding())"
Python detected LC_CTYPE=C, forcing LC_ALL & LANG to C.UTF-8 (set 
PYTHONALLOWCLOCALE to disable this locale coercion behaviour).
utf-8


==
$ PYTHONALLOWCLOCALE=1 LANG=C ./python -c "import sys; 
print(sys.getfilesystemencoding())"
Py_Initialize detected LC_CTYPE=C, which limits Unicode compatibility. Some 
libraries and operating system interfaces may not work correctly. Set 
`PYTHONALLOWCLOCALE=1 LC_CTYPE=C` to configure a similar environment when 
running Python directly.
ascii

--
Added file: http://bugs.python.org/file46059/pep538_coerce_legacy_c_locale.diff

___
Python tracker 

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



[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread INADA Naoki

INADA Naoki added the comment:

> If precision is the problem, could it be reworded to be more vague?

"can be any immutable" seems vague enough to me.  It doesn't say "cannot be any 
mutable type.".

>  Users are likely to assume documentation from any official source is the 
> final word.

But tutorial should use less words as possible.  This section is before 
introducing "class" statement.  Only strings, numbers, list and set are 
introduced before section.

I feel assuming early part of tutorial as final word bad practice.

--

___
Python tracker 

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



[issue29090] python34.dll crash

2016-12-27 Thread Mike Hobbs

New submission from Mike Hobbs:

Only info (Windows event viewer): Faulting application python_cc.exe, version 
0.0.0.0, faulting module python34.dll, version 3.4.3150.1013, fault address 
0x001059b7
Note: python_cc.exe is renamed python.exe to identify it in task manager.
OS is Windows XP SP3

The following script crashes the python executable every few hours (not 
regular, seemingly random).
The exact same script also crashes python 2.7.13. Each version has the latest 
pyserial module installed for the appropriate python version.
When python 2.7 crashes, the reported error is always in _ctypes.dll which is 
used extensively in the serialwin32.py for reading the serial port, but python 
3.4 fails in the main DLL.

This same script has been running without a problem for several years on the 
same hardware (Quad core Shuttle with CurrentCost 128 electricity monitor on 
COM3, using PL2303 serial/USB chipset (probably clone)). The crashes have only 
occured since harddisc replacement involving new XP installation and 
reinstallation of application software.

Occasionally, the crash results in a blue screen but usually its just the task 
crash notification (which I automatically dismiss using AutoIt3 watchdog 
script).  Everything else on the machine id running normally so the serial port 
handling is the prime suspect.


import serial, sys, time, traceback, os
import xml.etree.ElementTree as ET

correction = 1.074  # 247V when CC128 is designed for 230V
path = "E:\\Apache\\htdocs\\energy\\elec_data\\"
log  = "E:\\Apache\\htdocs\\energy\\log.txt"
ser  = None
amps = [0,0,0,0]

def localtime():
y,m,d,h,mn,s,wd,b,c = time.localtime()
return '%4d%02d%02d %02d%02d%02d' % (y,m,d,h,mn,s)

def dbg(msg):
msg = msg.strip()
print(msg)
if len(msg) <= 2: return
global log
# avoid huge files
if os.path.getsize(log) > 200:
y,m,d,h,mn,s,wd,b,c = time.localtime()
old = 'log_%4d%02d%02d_%02d%02d%02d.txt' % (y,m,d,h,mn,s)
os.rename(log, old)
f = open(log, 'a')
t = localtime()
f.write('%s %s\n' % (t, msg))
f.close()

try:
ser = serial.Serial(port="COM3", baudrate=57600, bytesize=serial.EIGHTBITS, 
parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=3)
dbg("Connected to CurrentCost meter")

except serial.SerialException:
dbg("Failed to connect to CurrentCost meter")
sys.exit(1)

err_count = 0
while True:
try:
line = ser.readline().strip() # should be something every 6 seconds
if line:
watts = ''
try:
msg = ET.fromstring(line)
watts = msg.findtext('ch1/watts')
watts = float(watts)
err_count = 0
except:
watts = ''
err_count += 1
finally:
try:
del exc_info
except:
pass

if watts:
# _ _  _  _
#  _   or   __  regarded as bogus
amps[0] = amps[1]; amps[1] = amps[2]; amps[2] = amps[3]
amps[3] = float(watts)*.00405 # 247 volts
bogus = False
if amps[1]>0 and amps[1] < amps[0]/2:
if amps[1] < amps[2]/2: bogus = True
if amps[1] < amps[3]/2 and amps[2] < amps[3]/2: bogus = True
#dbg('%s  %s  %s  %s  %s' % 
(amps[0],amps[1],amps[2],amps[3],bogus))
if not bogus and amps[2]>0 and amps[3]>0:
y,m,d,h,mn,s,a,b,c = time.localtime()
try:
line = '%f,%f' % (float(h)+float(mn)/60+float(s)/3600, 
amps[1])
f = open('%s\\%4d%02d%02d.csv' % (path,y,m,d), 'a')
f.write('%s\n' % line)
f.close()
except:
exc_info = sys.exc_info()
dbg('CC EXCEPTION %s ' % 
traceback.format_exception(*exc_info))
finally:
try:
del exc_info  # force garbage collection
except:
pass
else:
if err_count > 100:
dbg("100 consecutive errors detected")
break

except serial.SerialException:
exc_info = sys.exc_info()
dbg('CC EXCEPTION %s ' % traceback.format_exception(*exc_info))
ser.close()
sys.exit(1)
except KeyboardInterrupt:
ser.close()
sys.exit(0)
except:
exc_info = sys.exc_info()
dbg('CC EXCEPTION %s ' % traceback.format_exception(*exc_info))
finally:
try:
del exc_info  # force garbage collection
except:
pass

ser.close()
sys.exit(1)

--
components: Windows
messages: 284148
nosy: MikeH, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread R. David Murray

R. David Murray added the comment:

It is not wrong.  It does not say that keys are limited to immutables, only 
that immutables can be keys.  Perhaps the sentence about a tuple pointing to a 
mutable could be tightened up, though, by saying that if a tuple points to 
something that can not itself be a dictionary key, then that tuple can not be a 
dictionary key.

--

___
Python tracker 

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



[issue28871] Destructor of ElementTree.Element is recursive

2016-12-27 Thread STINNER Victor

STINNER Victor added the comment:

haypo@selma$ gdb -args ./python ~/bug.py 
(gdb) run
python: Objects/object.c:2453: _PyTrash_thread_deposit_object: Assertion 
`PyObject_IS_GC(op)' failed.

Program received signal SIGABRT, Aborted.

(gdb) py-bt
Traceback (most recent call first):
  File "/home/haypo/bug.py", line 130, in bench_parse
root1 = etree.parse(xml_file).getroot()
  File "/home/haypo/bug.py", line 171, in bench_etree
bench_func(etree, file_path, xml_data, xml_root)
  File "/home/haypo/bug.py", line 197, in 
bench_etree(1, ET, bench_func)



(gdb) where
#0  0x7711892f in raise () from /lib64/libc.so.6
#1  0x7711a52a in abort () from /lib64/libc.so.6
#2  0x77110e37 in __assert_fail_base () from /lib64/libc.so.6
#3  0x77110ee2 in __assert_fail () from /lib64/libc.so.6
#4  0x00463abe in _PyTrash_thread_deposit_object (op=) at Objects/object.c:2453
#5  0x7fffecd29b17 in element_dealloc (self=0x7fffec9152e0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:566
#6  0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#7  0x7fffecd29058 in element_dealloc_extra (self=0x7fffec915280) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#8  0x7fffecd29abc in element_dealloc (self=0x7fffec915280) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#9  0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#10 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec915220) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#11 0x7fffecd29abc in element_dealloc (self=0x7fffec915220) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#12 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#13 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec9151c0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#14 0x7fffecd29abc in element_dealloc (self=0x7fffec9151c0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#15 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#16 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec915160) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#17 0x7fffecd29abc in element_dealloc (self=0x7fffec915160) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#18 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#19 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec915100) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#20 0x7fffecd29abc in element_dealloc (self=0x7fffec915100) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#21 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#22 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec9150a0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#23 0x7fffecd29abc in element_dealloc (self=0x7fffec9150a0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#24 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#25 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec915040) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#26 0x7fffecd29abc in element_dealloc (self=0x7fffec915040) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#27 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#28 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec90ffa0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#29 0x7fffecd29abc in element_dealloc (self=0x7fffec90ffa0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#30 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#31 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec90ff40) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#32 0x7fffecd29abc in element_dealloc (self=0x7fffec90ff40) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#33 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#34 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec90fee0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#35 0x7fffecd29abc in element_dealloc (self=0x7fffec90fee0) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#36 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#37 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec90fe80) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#38 0x7fffecd29abc in element_dealloc (self=0x7fffec90fe80) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#39 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#40 0x7fffecd29058 in element_dealloc_extra (self=0x7fffec90fe20) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:301
#41 0x7fffecd29abc in element_dealloc (self=0x7fffec90fe20) at 
/home/haypo/prog/python/2.7/Modules/_elementtree.c:561
#42 0x0046346a in _Py_Dealloc (op=) 
at Objects/object.c:2262
#43 0x7fffecd29058 

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-27 Thread STINNER Victor

STINNER Victor added the comment:

bm_xml_etree.py benchmark started to crash on Python 2.7 because of the change 
78bf34b6a713.

Python 2.7 @ 78bf34b6a713: bug.py does crash
Python 2.7 @ 32cc37a89b58: no crash

Full script: 
https://github.com/python/performance/blob/master/performance/benchmarks/bm_xml_etree.py

--
nosy: +haypo
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file46058/bug.py

___
Python tracker 

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



[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread Xezlec

Xezlec added the comment:

> It's the tutorial.  Probably better to just leave it alone.  Precise 
> understanding can come later.

But the problem isn't that it's imprecise.  It's flat-out wrong.  My opinion 
would be that it's always a bad idea to put wrong information in the 
documentation, especially when it's the first Google hit.  It can lead to all 
sorts of confusion and frustration (as it did for me).  Users are likely to 
assume documentation from any official source is the final word.

If precision is the problem, could it be reworded to be more vague?

--

___
Python tracker 

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



[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread INADA Naoki

INADA Naoki added the comment:

> It's the tutorial.  Probably better to just leave it alone.  Precise 
> understanding can come later.

I agree.
Beginner should start using dict with builtin immutable type as key.
hashable is too complex at this point.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue29087] UCS4 support functions are not implemented

2016-12-27 Thread STINNER Victor

STINNER Victor added the comment:

Py_UCS4_strlen() added by:

changeset:   72475:8beaa9a37387
user:Martin v. Löwis 
date:Wed Sep 28 07:41:54 2011 +0200
files:   ...
description:
Implement PEP 393.


Removed by:

changeset:   73236:80a7ab9ac29f
user:Martin v. Löwis 
date:Mon Oct 31 08:40:56 2011 +0100
files:   Include/unicodeobject.h Objects/unicodeobject.c Objects/uniops.h
description:
Drop Py_UCS4_ functions. Closes #13246.


80a7ab9ac29f came before Python 3.3.0:

haypo@selma$ hg log -r v3.3.0
changeset:   79242:bd8afb90ebf2
branch:  3.3
tag: v3.3.0
parent:  79237:cb84dcb35114
user:Georg Brandl 
date:Sat Sep 29 09:44:17 2012 +0200
files:   Lib/test/test_sys.py
description:
Fix test_sys.test_implementation for final releases.


Py_UCS4_strlen() was documented but was never part of any public Python release.

=> you can remove the doc.

--

___
Python tracker 

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



[issue29087] UCS4 support functions are not implemented

2016-12-27 Thread STINNER Victor

STINNER Victor added the comment:

I recall that the very first implementation of the PEP 393 (compact strings) 
was heavily based on UCS4. Slowly, I optimized the code by specializing 
functions to each kind of string (ACSII, Latin1, UCS2, UCS4).

--

___
Python tracker 

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



[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2016-12-27 Thread Claudio Freire

Claudio Freire added the comment:

I cannot be 100% sure, but we have ample evidence suggesting we're experiencing 
this same crash in production.

We have a big system that mixes Cython and pure-python coroutines, and in one 
version we started seeing segfaults that strongly hint at this root cause.

Adding pure-python indirections (that keep the arguments alive, I'd wager), 
fixes those segfaults.

I cannot share the codebase (and in any case it's too big, and the crash is too 
difficult to reproduce in isolation, without real traffic), but I'd add my +1 
on applying this fix.

We're currently testing to try and reproduce the segfaults on 2.7.13, after 
that I'll try jdemeyer's patch and report the results.

--
nosy: +Claudio.Freire

___
Python tracker 

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



[issue28080] Allow reading member names with bogus encodings in zipfile

2016-12-27 Thread Stephen J. Turnbull

Stephen J. Turnbull added the comment:

Thanks for followup!  I was just about to write you, now that 3.6 is out.  
Season's Greetings!

First, how do you propose to proceed with issue28115 ("use argparse for the 
ZipFile module")?  If you expect to commit that first (I'm in no hurry for this 
patch, BTW, as long as it gets into 3.7 I'm happy), this issue should depend on 
it and use argparse too.

I don't see any good reason for allowing non-UTF-8 encoding to a file open for 
writing, and a good reason (the ZipFile standard) for not allowing it.  
Certainly the CLI should not allow it, any more than it does now.  At least in 
my experiments InfoZip and the default zip utilities on Windows and Mac DTRT 
with UTF-8 zipfiles, so there is no absolute need for writing nonconforming 
zipfiles.  If you want to block on a convert-to-UTF-8 option I can do that (but 
I don't need it myself).  (Note to self: if writing to existing zipfile is 
extension of existing file, need to prevent mixed encodings.  Also warn about 
conversion.)

I thought I checked that comments were decoded.  Maybe that's only on the UTF-8 
path?  Or maybe I needed more coffee.  (Hope so, that would be a messy problem 
if ASCII/Latin1 returns bytes and UTF-8 returns str!)  I'll think about this.  
Yes, it's a backwards-compatibility issue so needs care.  Would be weird if 
names are decoded but other metadata (comments) not, though.  Surely someone 
would complain if they actually used comments?  (I'm thinking maybe a 
compatibility break might be OK?  With deprecation cycle?)  I expect to check 
all execution paths accessing metadata and have a proposed patch by 12/31.

I think I'm still short some tests, will check and write them if needed.

--

___
Python tracker 

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



[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2016-12-27 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz

Arkadiusz MiskiewiczArkadiusz Miskiewicz added the 
comment:

Using configure option

--with-dbmliborder=gdbm:bdb

(so no ndbm in it) is another reason for such failure as seems that test suite 
has no conditional for it.

--

___
Python tracker 

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



[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2016-12-27 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz

Changes by Arkadiusz Miskiewicz Arkadiusz Miskiewicz 
:


--
nosy: +arekm

___
Python tracker 

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



[issue29089] dictionary keys described incorrectly in tutorial

2016-12-27 Thread R. David Murray

R. David Murray added the comment:

Note that this applies equally well to python3.

--
title: Python 2 dictionary keys described incorrectly -> dictionary keys 
described incorrectly in tutorial
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue29089] Python 2 dictionary keys described incorrectly

2016-12-27 Thread R. David Murray

R. David Murray added the comment:

It could say 'hashable object' instead of immutable object.  I don't know if 
hash has been introduced by that point, though.

It's the tutorial.  Probably better to just leave it alone.  Precise 
understanding can come later.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue29089] Python 2 dictionary keys described incorrectly

2016-12-27 Thread Xezlec

New submission from Xezlec:

In section 5.5 on the page 
https://docs.python.org/2/tutorial/datastructures.html#dictionaries the 
requirements given for dictionary keys are not correct.

Specifically, it is claimed that only immutable objects (and tuples containing 
only immutable objects) may be used as keys.  This is false, as user-defined 
mutable objects may be used as keys.  I suggest rewording along these lines:

"Only user-defined objects and immutable built-in types may be used as keys.  
Although allowed, it is bad practice to use a mutable user-defined object as a 
key when equality is determined in any way other than identity (the default)."

--
assignee: docs@python
components: Documentation
messages: 284135
nosy: Xezlec, docs@python
priority: normal
severity: normal
status: open
title: Python 2 dictionary keys described incorrectly
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



[issue29088] Inconsistent use of underscore in names that start with "is"

2016-12-27 Thread R. David Murray

R. David Murray added the comment:

Yep, that would be nice.  But Python has evolved over time, and we must 
maintain backward compatibility.  The names are what they are.

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



[issue29088] Inconsistent use of underscore in names that start with "is"

2016-12-27 Thread Kodiologist

New submission from Kodiologist:

Compare ``isinstance``, ``issubclass``, and ``islower`` to ``is_integer``, 
``is_fifo``, and ``is_enabled``. In Python 3.6, of all the names in the 
standard library starting with ``is``, I count 69 names with the underscore and 
91 without. It seems better to pick one way or the other and stick with it. I 
would recommend using the underscore, for legibility.

--
messages: 284133
nosy: Kodiologist
priority: normal
severity: normal
status: open
title: Inconsistent use of underscore in names that start with "is"
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



[issue29058] Mark new limited C API

2016-12-27 Thread Steve Dower

Steve Dower added the comment:

You've described it correctly.

> The problem is that the warning should be emitted only for users that use 
> incorrect API. But it shouldn't be emitted for users that use just 3.2 API

This is why I suggested #warn and not #error. It's okay to ignore warnings if 
you know what you're doing, but if there's no warning then people who don't 
know what they're doing will get it wrong. We know that some people are subtly 
broken here, and ought to tell them.

Further, if we make the warning only appear for "defined(Py_LIMITED_API) && 
Py_LIMITED_API+0<0x0300" then the warning can be suppressed by setting the 
exact version you intend to use (even though this doesn't prevent you from 
using the incorrect functions).

--

___
Python tracker 

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



[issue29058] Mark new limited C API

2016-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, but perhaps I don't fully understand you.

It is legitimately to just define Py_LIMITED_API without requiring specific 
version:

#define Py_LIMITED_API

In that case you can use the stable API of the version 3.2, but can't use 
PyType_FromSpecWithBases() and PyModule_AddFunctions(), because they are 
correctly attributed as API of versions 3.3 and 3.5. You can also mistakenly 
use PyImport_ImportModuleLevelObject() added in 3.5, this is a matter of this 
issue. But you shouldn't.

The problem is that the warning should be emitted only for users that use 
incorrect API. But it shouldn't be emitted for users that use just 3.2 API 
(perhaps the code was written at the time of 3.2 and was not changed since).

--
status: closed -> open

___
Python tracker 

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



[issue29080] unnecessary hg required for build version 3.6 on Windows

2016-12-27 Thread Steve Dower

Changes by Steve Dower :


--
stage:  -> needs patch
type: behavior -> compile error
versions: +Python 3.7

___
Python tracker 

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



[issue29080] unnecessary hg required for build version 3.6 on Windows

2016-12-27 Thread Steve Dower

Steve Dower added the comment:

You're right. I moved that code from buildrelease.bat, which definitely 
requires hg.

PC/build.bat should not fail if hg can't be found. You'll just end up with an 
empty sys._mercurial/sys.version after building.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue29058] Mark new limited C API

2016-12-27 Thread Steve Dower

Steve Dower added the comment:

> Just defining Py_LIMITED_API actually implies =0x0302.

That's the intent, but if it were actually the case then this issue wouldn't 
exist :)

On 3.5.3, building with Py_LIMITED_API=1 will include APIs that should only be 
included when Py_LIMITED_API=0x0305. You considered fixing that too likely 
to break existing users (and I agree), but that doesn't mean we shouldn't make 
it clear that it's not doing exactly the right thing.

> I have no idea where a #warn can be added.

pyport.h or pymacro.h are probably the best places. If you null-merge into 3.6 
then we shouldn't have to worry about the warning showing up in later versions.

--

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue28446] pyvenv generates malformed hashbangs for scripts

2016-12-27 Thread Vinay Sajip

Vinay Sajip added the comment:

As an extra data point, note the behaviour on Windows:

C:\Users\Vinay> \python34\python -m venv "\Temp\aaa bbb"
   

   
C:\Users\Vinay> "\Temp\aaa bbb\Scripts\pip" --version   
   
pip 6.0.8 from C:\Temp\aaa bbb\lib\site-packages (python 3.4)   
   

   
C:\Users\Vinay> pyzzer -i "\Temp\aaa bbb\Scripts\pip.exe"   
   
There is a launcher.
   
Shebang: #!"C:\Temp\aaa bbb\Scripts\python.exe" 
   

   

   
Archive contents:   
   
  __main__.py   
   

   
C:\Users\Vinay> "\Temp\aaa bbb\Scripts\python" -m pip install -U pip
   
You are using pip version 6.0.8, however version 9.0.1 is available.
   
You should consider upgrading via the 'pip install --upgrade pip' command.  
   
Collecting pip from 
https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f1
96358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
   
  Using cached pip-9.0.1-py2.py3-none-any.whl   
   
Installing collected packages: pip  
   
  Found existing installation: pip 6.0.8
   
Uninstalling pip-6.0.8: 
   
  Successfully uninstalled pip-6.0.8
   

   
Successfully installed pip-9.0.1
   

   
C:\Users\Vinay> "\Temp\aaa bbb\Scripts\pip" --version   
   
pip 9.0.1 from C:\Temp\aaa bbb\lib\site-packages (python 3.4)

--

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Eryk Sun

Eryk Sun added the comment:

> It's presumably failing to read nonblocking random from CrpytGen 
> and falling back to seeding using time and pid.

Yes and no. CryptGenRandom is not failing, but it is nonetheless calling 
random_seed_time_pid:

>>> r = random.Random()
Breakpoint 0 hit
python36_d!random_seed:
`5e7277c0 4889542410  mov qword ptr [rsp+10h],rdx
ss:0095`053ef0e8=
0:000> g
Breakpoint 1 hit
python36_d!random_seed_time_pid:
`5e728910 48894c2408  mov qword ptr [rsp+8],rcx
ss:0095`053ef040=02319b6f3b88
0:000> kc 3
Call Site
python36_d!random_seed_time_pid
python36_d!random_seed
python36_d!random_new

It looks like there's a bug in the new implementation of random_seed():

 if (arg == NULL || arg == Py_None) {
if (random_seed_urandom(self) >= 0) {
PyErr_Clear();

/* Reading system entropy failed, fall back on the worst entropy:
   use the current time and process identifier. */
random_seed_time_pid(self);
}
Py_RETURN_NONE;
}

If random_seed_urandom fails, it returns -1, so this should be testing if the 
result is less than 0.

--
nosy: +eryksun

___
Python tracker 

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



[issue29087] UCS4 support functions are not implemented

2016-12-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

There is a special section in the documentation of Unicode Objects C API: UCS4 
Support.

https://docs.python.org/3/c-api/unicode.html#ucs4-support

It documents utility functions that work on strings of Py_UCS4 characters like 
Py_UCS4_strlen(), Py_UCS4_strcpy(), etc. But none of these functions is 
implemented. May be the documentation should be just removed?

--
assignee: docs@python
components: Documentation, Unicode
messages: 284126
nosy: benjamin.peterson, docs@python, ezio.melotti, haypo, lemburg, 
serhiy.storchaka
priority: normal
severity: normal
status: open
title: UCS4 support functions are not implemented
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue29086] Document C API that is not part of the limited API

2016-12-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

>From the documentation:

https://docs.python.org/3/c-api/stable.html

In the C API documentation, API elements that are not part of the limited 
API are marked as "Not part of the limited API."

But they don't.

Following sample patch adds the notes to Unicode Objects and Codecs C API. I'm 
going to add them to all C API.

What are your though about formatting the note? Should it be before the 
description, after the description, but before the "deprecated" directive (as 
in the patch), or after the first paragraph of the description? Should it be on 
the separate line or be appended at the end of the previous paragraph, or 
starts the first paragraph (if before the description)? May be introduce a 
special directive for it?

--
assignee: docs@python
components: Documentation
files: unicode-not-part-of-the-limited-api.patch
keywords: patch
messages: 284125
nosy: docs@python, georg.brandl, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Document C API that is not part of the limited API
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file46057/unicode-not-part-of-the-limited-api.patch

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-27 Thread Jason R. Coombs

Jason R. Coombs added the comment:

That also looks good.

$ head -n1 ~/.envs/issue22490/bin/cherryd
#!/Users/jaraco/.envs/issue22490/bin/python

--

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Kyle Altendorf

Kyle Altendorf added the comment:

time.sleep(0) and time.sleep(0.0) acted the same for me and both exhibited 
matching 'random' values in some cases.  (win10, python3.6)  I also printed 
time.time() with each 'random' value and it wasn't a perfect match but matching 
times tended to go with matching 'random' values.

--

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Ammar Askar

Ammar Askar added the comment:

Can recreate under

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit 
(AMD64)] on win32

and on latest master.

--
nosy: +ammar2
versions: +Python 3.7

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Donald Stufft

Donald Stufft added the comment:

It's presumably failing to read nonblocking random from CrpytGen and falling 
back to seeding using time and pid.

--
nosy: +dstufft

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Ned Batchelder

Ned Batchelder added the comment:

Adding a time.sleep(0.001) (or maybe even just 0) between the calls prevents 
the problem.

--

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-27 Thread 12345 67890

Changes by 12345 67890 :


Removed file: 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-27 Thread 12345 67890

12345 67890 added the comment:

The method is now capitalized. Unfortunately, none of the methods are compliant 
with PEP formatting, but it's far too late to do anything about that.

--
Added file: 
http://bugs.python.org/file46056/Add_ability_to_close_MSI_database_.patch

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Kyle Altendorf

Changes by Kyle Altendorf :


--
nosy: +altendky

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Ned Batchelder

Changes by Ned Batchelder :


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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-27 Thread Ned Batchelder

New submission from Ned Batchelder:

Creating two Random() instances in quick succession produces the same sequence, 
but only on Windows on Python 3.6.  On 3.5 or earlier, or on Mac/Linux, the 
randomization is good.

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import random; print(random.Random().randint(1, 99), 
>>> random.Random().randint(1, 99))
903885 903885
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(2)])
996947 56476
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(2)])
793282 793282
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(2)])
519702 519702
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(2)])
230678 230678
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(3)])
474701 474701 474701
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(3)])
890942 890942 890942
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(3)])
997495 997495 997495
>>> import random; print(*[random.Random().randint(1, 99) for _ in 
>>> range(5)])
27803 27803 27803 27803 919401
>>>

I would expect each of these runs to produce unique numbers, with no duplicates.

--
keywords: 3.6regression
messages: 284118
nosy: nedbat
priority: normal
severity: normal
status: open
title: Python 3.6 on Windows doesn't seed Random() well enough

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-27 Thread Vinay Sajip

Vinay Sajip added the comment:

Thanks. It's worth checking what shebang was written to a script that was 
installed into the venv - e.g. cherryd.

--

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-27 Thread Jason R. Coombs

Jason R. Coombs added the comment:

On Python 3.6, I made the edit. I actually used the one-liner `   
os.environ.pop('__PYVENV_LAUNCHER__', None)`. I then created a venv and 
installed a package and successfully ran a module in that package:

$ python -m venv ~/.envs/issue22490-test
$ ~/.envs/issue22490-test/bin/python -m pip install cherrypy
Collecting cherrypy
  Downloading CherryPy-8.5.0-py2.py3-none-any.whl (463kB)
100% || 471kB 2.2MB/s 
Collecting six (from cherrypy)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, cherrypy
Successfully installed cherrypy-8.5.0 six-1.10.0
$ ~/.envs/issue22490-test/bin/python -m cherrypy
...
[27/Dec/2016:11:08:52] ENGINE Serving on http://127.0.0.1:8080
[27/Dec/2016:11:08:52] ENGINE Bus STARTED

So pyvenv seems to be working.

Additionally, it's corrected the undesirable behavior that Tim demonstrated:

$ rm -R ~/.envs/issue22490-test 
$ python -m virtualenv ~/.envs/issue22490-test
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/jaraco/.envs/issue22490-test/bin/python3
Also creating executable in /Users/jaraco/.envs/issue22490-test/bin/python
Installing setuptools, pip, wheel...done.
$ python -c 'import subprocess; 
subprocess.call(["/Users/jaraco/.envs/issue22490-test/bin/python", "-c", 
"import sys; print(sys.executable)"])'
/Users/jaraco/.envs/issue22490-test/bin/python


I tried making a Framework build of Python with the environment variable 
removed entirely, but I'm not experienced enough with builds on a Mac to know 
what I need to do to create a proper build. I build Python from source and 
tried to create a venv, but it crashed with a nondescript error:

$ ./python.exe -VV
Python 3.6.0+ (3.6:86a412584c02+, Dec 27 2016, 11:24:01) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
$ ./python.exe -m venv ~/.envs/issue22490
Error: Command '['/Users/jaraco/.envs/issue22490/bin/python.exe', '-Im', 
'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Aah. The issue is probably no zlib.

$ curl https://bootstrap.pypa.io/get-pip.py -o - | ~/.envs/issue22490/bin/python
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100 1558k  100 1558k0 0  5221k  0 --:--:-- --:--:-- --:--:-- 5210k
Traceback (most recent call last):
  File "", line 20061, in 
  File "", line 194, in main
  File "", line 82, in bootstrap
zipimport.ZipImportError: can't decompress data; zlib not available


After making sure I had zlib installed and available, by re-running 
xcode-select --install, I was able to build with zlib, create a venv, and 
install packages to it:

$ ./python.exe -m venv ~/.envs/issue22490 
$ ~/.envs/issue22490/bin/python -c "import os; 
os.environ['__PYVENV_LAUNCHER__']"
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/jaraco/Dropbox/code/public/cpython/Lib/os.py", line 669, in 
__getitem__
raise KeyError(key) from None
KeyError: '__PYVENV_LAUNCHER__'
$ ~/.envs/issue22490/bin/pip install cherrypy
Collecting cherrypy
  Using cached CherryPy-8.5.0-py2.py3-none-any.whl
Collecting six (from cherrypy)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, cherrypy
Successfully installed cherrypy-8.5.0 six-1.10.0
$ ~/.envs/issue22490/bin/python -m cherrypy
...
[27/Dec/2016:11:58:09] ENGINE Serving on http://127.0.0.1:8080
[27/Dec/2016:11:58:09] ENGINE Bus STARTED


What else would I need to test? What might one expect to fail due to the lack 
of that environment variable?

--

___
Python tracker 

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



[issue29084] C API of OrderedDict

2016-12-27 Thread Brett Cannon

Brett Cannon added the comment:

If the API is broken in the limited API then I definitely think we should  
consistently make it not part of the limited API. As for removing it I don't 
have an opinion without knowing how many people are using it.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue28818] simplify lookdict functions

2016-12-27 Thread INADA Naoki

INADA Naoki added the comment:

http://bugs.python.org/issue28427#msg284101

> Sidenote: all branches now have a different version of dict object each, 
> which makes maintenance really painful...

Large difference between py36 and py37 is this patch.
Can I backport this to py36 to ease maintenance?

--

___
Python tracker 

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



[issue29061] secrets.randbelow(-1) hangs

2016-12-27 Thread Brendan Donegan

Brendan Donegan added the comment:

If I'm not mistaken, _randbelow is defined in Random, which SystemRandom
inherits from. Just for clarity

On Tue, 27 Dec 2016 at 22:08 Josh Rosenberg  wrote:

>
> Josh Rosenberg added the comment:
>
> SystemRandom._randbelow has this problem, perhaps it should be fixed
> there, not in one of many possible wrappers for it?
>
> --
> nosy: +josh.r
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue29061] secrets.randbelow(-1) hangs

2016-12-27 Thread Josh Rosenberg

Josh Rosenberg added the comment:

SystemRandom._randbelow has this problem, perhaps it should be fixed there, not 
in one of many possible wrappers for it?

--
nosy: +josh.r

___
Python tracker 

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-27 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Sorry, but I'm afraid of being unable to test it. I tried to setup a Windows 
build environment for 2.x but failed. (I've once successfully built 3.x on 
Windows for issue25939, but things seems different now :(

--
keywords: +patch
Added file: 
http://bugs.python.org/file46055/LoadLibrary_revert_arg_parsing.patch

___
Python tracker 

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



[issue29058] Mark new limited C API

2016-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Just defining Py_LIMITED_API actually implies =0x0302.

I have no idea where a #warn can be added.

--

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fa9933bf4ea0 by Serhiy Storchaka in branch 'default':
Issue #28915: Exclude _Py_VaBuildStack from the limited API.
https://hg.python.org/cpython/rev/fa9933bf4ea0

--

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e5ad97c9c19 by Serhiy Storchaka in branch '3.5':
Issue #23903: Added missed Windows-specific names to PC/python3.def.
https://hg.python.org/cpython/rev/2e5ad97c9c19

New changeset 86a412584c02 by Serhiy Storchaka in branch '3.6':
Issue #23903: Added missed Windows-specific names to PC/python3.def.
https://hg.python.org/cpython/rev/86a412584c02

New changeset 3a2595f82447 by Serhiy Storchaka in branch 'default':
Issue #23903: Added missed Windows-specific names to PC/python3.def.
https://hg.python.org/cpython/rev/3a2595f82447

--

___
Python tracker 

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



[issue29080] unnecessary hg required for build version 3.6 on Windows

2016-12-27 Thread Ned Deily

Changes by Ned Deily :


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

___
Python tracker 

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



[issue28446] pyvenv generates malformed hashbangs for scripts

2016-12-27 Thread Vinay Sajip

Vinay Sajip added the comment:

To reiterate Alex Regueiro's point, I don't think this is a bug, but a 
shortcoming of the underlying Berkeley exec(2) implementation. See this post:

https://lists.gnu.org/archive/html/bug-bash/2008-05/msg00053.html

We can leave the implementation as is, as on Windows the Python launcher should 
honour spaces in the interpreter path.

Spaces in shebang lines are not supported where they're not supported by the 
underlying POSIX implementation - which includes Linux and OS X, AFAICT.

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

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-27 Thread Vinay Sajip

Vinay Sajip added the comment:

I'm not sure if msg230947 is still correct, and it seems neater to remove 
__PYVENV_LAUNCHER__ from where it's defined in the first place (the stub 
launcher C file) if it was just a shim needed around the time the functionality 
was developed (pre the 3.3 release).

It would be helpful if a Mac person could try removing it and seeing if the 
resulting framework builds of Python on OS X are adversely affected.

--

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-12-27 Thread Steve Dower

Steve Dower added the comment:

Unfortunately, there's no way too remove defined names from the DLL during 
Python 3 at all, except where the prototype was never provided. PyCFunction_New 
has always been a macro, and PySys_SetDefaultEncoding looks to have been 
removed before the API was committed.

Maintaining an export and a macro is going to be awkward, so I think we should 
just change them back to functions. Any half-decent optimizing compiler is 
going to inline it within core, and it's better than having two implementations 
in different places of the same function.

But yes I agree, fix the def first and then automate. But I don't want to fix 
it but adding things that were never usable.

--

___
Python tracker 

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



[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-27 Thread Vinay Sajip

Vinay Sajip added the comment:

Perhaps I will try to make it even clearer, but to be fair, the format() 
documentation is just a few paragraphs above the formatException() 
documentation. It's all in the section entitled "Formatter Objects", and it's 
IMO reasonable to expect the whole reasonably short section to be scanned 
before going to the trouble of raising an issue.

--

___
Python tracker 

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



[issue29058] Mark new limited C API

2016-12-27 Thread Steve Dower

Steve Dower added the comment:

Can we add a #warn to the headers then? So people know that just defining 
Py_LIMITED_API actually implies =0x0305 (or whatever value is appropriate)?

--

___
Python tracker 

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



[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-27 Thread Dan Passaro

Dan Passaro added the comment:

If there's no interest in changing the behavior I'd at least suggest that this 
caching is mentioned in the docs for the formatException() method specifically, 
with some kind of attention-grabbing note. (Right now this behavior is only 
explained in the format() method's docs which, as you might be able to infer, I 
did not think to check.)

--

___
Python tracker 

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



[issue28427] WeakValueDictionary next bug (with multithreading)

2016-12-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've pushed the fixes now.  It does introduce a small amount of additional code 
duplication in dictobject.c, but nothing unmanageable.

Sidenote: all branches now have a different version of dict object each, which 
makes maintenance really painful...

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



[issue28427] WeakValueDictionary next bug (with multithreading)

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9acdcafd1418 by Antoine Pitrou in branch '2.7':
Issue #28427: old keys should not remove new values from
https://hg.python.org/cpython/rev/9acdcafd1418

--

___
Python tracker 

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch Chi Hsuan Yen! This is my mistake, I though PyString_Size() works 
only with str (as many similar *_Size() functions). Agreed, this change should 
be reverted. Do you want provide the patch with tests?

--
keywords: +easy (C)
stage:  -> needs patch

___
Python tracker 

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



[issue29084] C API of OrderedDict

2016-12-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

C API of the C implementation of OrderedDict was added in 3.5 together with the 
C implementation of OrderedDict. But it was never announced nor documented. 
Some macros contain bugs. PyODict_Check() and PyODict_CheckExact() are declared 
in the limited API, but don't work since use PyODict_Type not available in the 
limited API. PyODict_SIZE() is expanded to syntactically incorrect code and 
it's name is not consistent with similar macros: PyTuple_GET_SIZE, 
PyList_GET_SIZE and just added PyDict_GET_SIZE. Many names are just transparent 
wrappers around PyDict API (and they can't be different).

Since PyODict C API is not documented, partially not working and partially 
redundant, and the C implementation of OrderedDict is optional (other Python 
implementations can provide just Python implementation of OrderedDict), I think 
this C API should be made private if not removed.

--
components: Interpreter Core
messages: 284098
nosy: eric.snow, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: C API of OrderedDict

___
Python tracker 

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



[issue29083] Readd PyArg_VaParse to the stable API

2016-12-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Seems PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were excluded from 
the stable API by the mistake in fixing issue11626. These functions was in the 
stable API before 3.3, and the documentation doesn't mention that they are not 
in the stable API.

I think they should be readded to the stable API.

--
components: Interpreter Core
messages: 284097
nosy: loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Readd PyArg_VaParse to the stable API
type: compile error
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Readd PyArg_VaParse to the stable API

___
Python tracker 

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



[issue28427] WeakValueDictionary next bug (with multithreading)

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b8b0718d424f by Antoine Pitrou in branch '3.5':
Issue #28427: old keys should not remove new values from
https://hg.python.org/cpython/rev/b8b0718d424f

New changeset 97d6616b2d22 by Antoine Pitrou in branch '3.6':
Issue #28427: old keys should not remove new values from
https://hg.python.org/cpython/rev/97d6616b2d22

New changeset e5ce7bdf9e99 by Antoine Pitrou in branch 'default':
Issue #28427: old keys should not remove new values from
https://hg.python.org/cpython/rev/e5ce7bdf9e99

--
nosy: +python-dev

___
Python tracker 

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



[issue19120] shlex.shlex.lineno reports a different number depending on the previous token

2016-12-27 Thread Christopher Hoadley

Changes by Christopher Hoadley :


--
nosy: +hoadlck
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



[issue16121] shlex.shlex.error_leader() reports incorrect line number

2016-12-27 Thread Christopher Hoadley

Changes by Christopher Hoadley :


--
nosy: +hoadlck
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



[issue29058] Mark new limited C API

2016-12-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Changes are not applied to 3.5. It is harder to do since many private functions 
in 3.5 are still available in limited API. And there is a risk to break 
third-party code that defines Py_LIMITED_API, but uses API with higher version 
than required.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue24869] shlex lineno inaccurate with certain inputs

2016-12-27 Thread Christopher Hoadley

Changes by Christopher Hoadley :


--
type:  -> behavior
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



[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-12-27 Thread Vinay Sajip

Vinay Sajip added the comment:

This sounds like a Celery bug, so I don't propose to change anything in this 
area.

--

___
Python tracker 

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



[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-27 Thread Vinay Sajip

Changes by Vinay Sajip :


--
status: open -> closed

___
Python tracker 

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



[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffcb321ba9c0 by Serhiy Storchaka in branch '2.7':
Issue #28998: More APIs now support longs as well as ints.
https://hg.python.org/cpython/rev/ffcb321ba9c0

--
nosy: +python-dev

___
Python tracker 

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



[issue29058] Mark new limited C API

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f26c16aba11e by Serhiy Storchaka in branch '3.6':
Issue #29058: All stable API extensions added after Python 3.2 are now
https://hg.python.org/cpython/rev/f26c16aba11e

New changeset 77f5f31bf699 by Serhiy Storchaka in branch 'default':
Issue #29058: All stable API extensions added after Python 3.2 are now
https://hg.python.org/cpython/rev/77f5f31bf699

--
nosy: +python-dev

___
Python tracker 

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



[issue29061] secrets.randbelow(-1) hangs

2016-12-27 Thread Brendan Donegan

Brendan Donegan added the comment:

Ok, here's a second version of the patch. Normally I don't like testing 
multiple things in one test but I've gone with what seems to be the convention 
here in test_secrets.py

--
Added file: http://bugs.python.org/file46054/issue_29061_randbelow_v2.patch

___
Python tracker 

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



[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-12-27 Thread Felix Yan

Changes by Felix Yan :


--
nosy: +felixonmars

___
Python tracker 

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



[issue27650] Implement `__repr__` methods for logging.Logger and others

2016-12-27 Thread lilydjwg

lilydjwg added the comment:

This hangs this test from celery: 
https://github.com/celery/celery/blob/master/t/unit/app/test_log.py#L72

It constructs a Logger with `.parent` to itself, making getEffectiveLevel loop 
forever. The code tries to raise an exception when such loops are detected, but 
its message contains the logger's repr which calls getEffectiveLevel.

--
nosy: +lilydjwg

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-27 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, 12345. Steve knows better, but I think the method should 
be named "Close" instead of "close" like _msi.View's Close method.

Also, I couldn't apply your patch:

$ hg imp 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch
applying 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch
unable to find '_msi.c' for patching
patching file _msi.c
2 out of 2 hunks FAILED -- saving rejects to file _msi.c.rej
abort: patch failed to apply

You may want to read https://docs.python.org/devguide/patch.html for details 
about creating a patch.

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

___
Python tracker 

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



[issue29069] Default PyPI URL in docs is not what is really in code

2016-12-27 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue29069] Default PyPI URL in docs is not what is really in code

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c4cd7e00a640 by Berker Peksag in branch '3.5':
Issue #29069: Update the default URL of PyPI server
https://hg.python.org/cpython/rev/c4cd7e00a640

New changeset b1ccf713e8f8 by Berker Peksag in branch '3.6':
Issue #29069: Merge from 3.5
https://hg.python.org/cpython/rev/b1ccf713e8f8

New changeset b712e4818ff8 by Berker Peksag in branch 'default':
Issue #29069: Merge from 3.6
https://hg.python.org/cpython/rev/b712e4818ff8

--
nosy: +python-dev

___
Python tracker 

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



[issue29025] random.seed() relation to hash() function and its determinism is vague

2016-12-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This is out of date.
See http://bugs.python.org/issue27706

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



[issue29056] logging.Formatter doesn't respect more than one formatException()

2016-12-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Can we close this?

--
nosy: +rhettinger
status: pending -> open

___
Python tracker 

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



[issue12276] 3.x ignores sys.tracebacklimit=0

2016-12-27 Thread Anand Reddy Pandikunta

Anand Reddy Pandikunta added the comment:

This patch fixes the issue. I have also added 2 test cases to make sure it 
works.

--
keywords: +patch
nosy: +ChillarAnand -docs@python
Added file: 
http://bugs.python.org/file46053/Limit-traceback-if-sys.tracebacklimit-is-set.patch

___
Python tracker 

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



[issue29011] No entry Deque in typing.py

2016-12-27 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file46052/Deque2.diff

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d95fee442e27 by Serhiy Storchaka in branch '3.5':
Issue #23903: Added missed names to PC/python3.def.
https://hg.python.org/cpython/rev/d95fee442e27

New changeset cb864fc4b3be by Serhiy Storchaka in branch '3.6':
Issue #23903: Added missed names to PC/python3.def.
https://hg.python.org/cpython/rev/cb864fc4b3be

New changeset 513852ad0c5c by Serhiy Storchaka in branch 'default':
Issue #23903: Added missed names to PC/python3.def.
https://hg.python.org/cpython/rev/513852ad0c5c

--

___
Python tracker 

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



[issue29061] secrets.randbelow(-1) hangs

2016-12-27 Thread Brendan Donegan

Brendan Donegan added the comment:

Hi Raymond,

I have done that when creating the patch and have confirmation in my inbox
- perhaps Ewa hasn't filed it yet?

On Tue, 27 Dec 2016 at 14:43 Raymond Hettinger 
wrote:

>
> Raymond Hettinger added the comment:
>
> Brendan, would you please submit a contributor agreement.
>
> --
> priority: high -> normal
>
> ___
> Python tracker 
> 
> ___
>

--
nosy: +brendand

___
Python tracker 

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-27 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

In issue27330, there's one more change besides fixing possible memory leaks. In 
LoadLibrary function of _ctypes: [1]

-if (!PyArg_ParseTuple(args, "O|O:LoadLibrary", , ))
+if (!PyArg_ParseTuple(args, "S|O:LoadLibrary", , ))

Before this change, both bytes and unicode objects are accepted in 
_ctypes.LoadLibrary() (Unicode objects are implicitly converted to bytes), and 
after this change only bytes objects are valid.

There are two options:
* Revert the relevant PyArg_ParseTuple.
  It's better to have fewer surprises on 2.7 branch :)
* Document the change.

I prefer the first option as in our project ```from __future__ import 
unicode_literals``` is used everywhere, and in Python 3 only Unicode objects 
are acceptable in _ctypes.LoadLibrary().

Downstream report: https://github.com/rg3/youtube-dl/issues/11540

Added the author and the reviewer in issue27330.

[1] e04c054beb53

--
components: ctypes
messages: 284081
nosy: Chi Hsuan Yen, martin.panter, serhiy.storchaka
priority: normal
severity: normal
status: open
title: In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue29081] time.strptime() return wrong result

2016-12-27 Thread hywl51

New submission from hywl51:

In [1]:import time

In [2]: time.strptime('2016 52 0', '%Y %W %w')
Out[2]: time.struct_time(tm_year=2017, tm_mon=1, tm_mday=1, tm_hour=0, 
tm_min=0, tm_sec=0, tm_wday=6, tm_yday=367, tm_isdst=-1)

When given the parameters above, the function return the struct_time object 
with tm_yday=367, that is wrong.

I test the codes on Python 2.7.11 and 3.5.1, the error is same.

--
components: Library (Lib)
messages: 284080
nosy: hywl51
priority: normal
severity: normal
status: open
title: time.strptime() return wrong result
type: behavior
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



[issue23903] Generate PC/python3.def by scraping headers

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8423f86486b3 by Serhiy Storchaka in branch '3.5':
Issue #23903: Fixed errors and remove non-existing names in python3.def.
https://hg.python.org/cpython/rev/8423f86486b3

New changeset b5470d08969c by Serhiy Storchaka in branch '3.6':
Issue #23903: Fixed errors and remove non-existing names in python3.def.
https://hg.python.org/cpython/rev/b5470d08969c

New changeset 45507a5751d8 by Serhiy Storchaka in branch 'default':
Issue #23903: Fixed errors and remove non-existing names in python3.def.
https://hg.python.org/cpython/rev/45507a5751d8

--

___
Python tracker 

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



  1   2   >