[issue26029] Broken sentence in extending documentation

2016-01-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee: docs@python -> terry.reedy
nosy: +terry.reedy

___
Python tracker 

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



[issue26056] installation failure

2016-01-09 Thread Amandeep Singh Sohal

New submission from Amandeep Singh Sohal:

when i trying to install the python 3.5.1. It gives a error "window 7 service 
pack 1 and all applicable updates are required to install python 3.5.1". here i 
am also uploading the log file of installation.

--
components: Installation
files: Python 3.5.1 (32-bit)_20160109133257.log
messages: 257801
nosy: Amandeep Singh Sohal
priority: normal
severity: normal
status: open
title: installation failure
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file41540/Python 3.5.1 
(32-bit)_20160109133257.log

___
Python tracker 

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



[issue26029] Broken sentence in extending documentation

2016-01-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3b860ce5bb51 by Terry Jan Reedy in branch '3.5':
Issue #26029: Remove extraneous word.  Patch by Upendra Kumar.
https://hg.python.org/cpython/rev/3b860ce5bb51

--
nosy: +python-dev

___
Python tracker 

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



[issue26029] Broken sentence in extending documentation

2016-01-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks for reporting.

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



[issue26056] installation failure

2016-01-09 Thread Zachary Ware

Zachary Ware added the comment:

Just like it says, you need Service Pack 1 for Python 3.5.  If for some reason 
that's not possible, you'll have to revert back to Python 3.4.

--
nosy: +zach.ware
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: compile error -> 

___
Python tracker 

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



[issue26029] Broken sentence in extending documentation

2016-01-09 Thread Zachary Ware

Zachary Ware added the comment:

Terry, it doesn't look like you used Upendra's patch.  What you committed just 
removes the "of", but doesn't change "addition" to "additional", which is also 
required to make that sentence make sense.

--
nosy: +zach.ware

___
Python tracker 

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



[issue26057] Avoid nonneeded use of PyUnicode_FromObject()

2016-01-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

In Python 2 PyUnicode_FromObject() was used for coercing 8-bit strings to 
unicode by decoding them with the default encoding. But in Python 3 there is no 
such coercing. The effect of PyUnicode_FromObject() in Python 3 is ensuring 
that the argument is a string and convert an instance of str subtype to exact 
str. The latter often is just a waste of memory and time, since resulted string 
is used only for retrieving UTF-8 representation or raw data. 

Proposed patch makes following things:

1. Avoids unneeded copying of string's content.
2. Avoids raising some unneeded exceptions.
3. Gets rid of unneeded incref/decref.
4. Makes some error messages more correct or informative.
5. Converts runtime checks PyBytes_Check() for results of string encoding to 
asserts.

Example of performance gain:

Unpatched:
$ ./python -m timeit -s "a = 'a'*100; b = 'b'*1000" -- "a in b"
100 loops, best of 3: 0.404 usec per loop
$ ./python -m timeit -s "class S(str): pass" -s "a = S('a'*100); b = 
S('b'*1000)" -- "a in b"
100 loops, best of 3: 0.723 usec per loop

Patched:
$ ./python -m timeit -s "a = 'a'*100; b = 'b'*1000" -- "a in b"
100 loops, best of 3: 0.383 usec per loop
$ ./python -m timeit -s "class S(str): pass" -s "a = S('a'*100); b = 
S('b'*1000)" -- "a in b"
100 loops, best of 3: 0.387 usec per loop

--
components: Interpreter Core
files: no_unicode_copy.patch
keywords: patch
messages: 257806
nosy: haypo, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Avoid nonneeded use of PyUnicode_FromObject()
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41541/no_unicode_copy.patch

___
Python tracker 

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



[issue26057] Avoid nonneeded use of PyUnicode_FromObject()

2016-01-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue15984 about correcting the documentation of 
PyUnicode_FromObject().

--

___
Python tracker 

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



[issue26024] Non-ascii Windows locale names

2016-01-09 Thread Eryk Sun

Eryk Sun added the comment:

The issue isn't quite the same for 3.5+. The new CRT uses Windows Vista locale 
APIs. In this case it uses LOCALE_SENGLISHLANGUAGENAME instead of the old 
LOCALE_SENGLANGUAGE. This maps "Norwegian" to simply "Norwegian" instead of 
"Norwegian Bokmål":

>>> locale.setlocale(locale.LC_TIME, 'norwegian')
'Norwegian_Norway.1252'

The "Norwegian Bokmål" language name has to be requested explicitly to see the 
same problem:

>>> try: locale.setlocale(locale.LC_TIME, 'Norwegian Bokmål')
... except Exception as e: print(e)
...
unsupported locale setting

The fix for 3.4 would be to encode the locale string using 
PyUnicode_AsMBCSString (ANSI). It's too late, however, since 3.4 is no longer 
getting bug fixes.

For 3.5+, setlocale could either switch to using _wsetlocale on Windows or call 
setlocale with the string encoded via Py_EncodeLocale (wcstombs). Encoding the 
string via wcstombs is required because the new CRT roundtrips the conversion 
via mbstowcs before forwarding the call to _wsetlocale. This means that success 
depends on the current LC_CTYPE, unless Python switches to calling _wsetlocale 
directly.

As a workaround for 3.5+, the new CRT also supports RFC 4646 language-tag 
locales when running on Vista or later. For example, "Norwegian Bokmål"  is 
simply "nb". 

Language-tag locales differ from POSIX locales. Superficially, they use "-" 
instead of "_" as the delimiter. More importantly, they don't allow explicitly 
setting the codeset. Instead of a .codeset, they use ISO 15924 script codes. 
Specifying a script may select a different ANSI codepage. It depends on whether 
there's an NLS definition for the language-script combination. For example, 
Bosnian can be written using either Latin or Cyrillic. Thus the "bs-BA" and 
"bs-Latn-BA" locales use the Central Europe codepage 1250, but "bs-Cyrl-BA" 
uses the Cyrillic codepage 1251. On the other hand, "en-Cyrl-US" still uses the 
Latin codepage 1252.

As a separate issue, language-tag locales break the parsing in locale.getlocale:

>>> locale.setlocale(locale.LC_TIME, 'nb-NO')
'nb-NO'
>>> try: locale.getlocale(locale.LC_TIME)
... except Exception as e: print(e)
...
unknown locale: nb-NO

>>> locale.setlocale(locale.LC_CTYPE, 'bs-Cyrl-BA')
'bs-Cyrl-BA'
>>> try: locale.getlocale(locale.LC_CTYPE)
... except Exception as e: print(e)
...
unknown locale: bs-Cyrl-BA

--
resolution:  -> third party

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch implements the following PEP currently discussed on python-ideas:
https://faster-cpython.readthedocs.org/pep_dict_version.html#pep-dict-version

--
files: dict_version.patch
keywords: patch
messages: 257809
nosy: haypo
priority: normal
severity: normal
status: open
title: Add dict.__version__ read-only property
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41542/dict_version.patch

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread STINNER Victor

STINNER Victor added the comment:

Result of pybench on Dict microbenchmarks:

  DictCreation:44ms49ms  -10.5%44ms49ms  -10.7%
 DictWithFloatKeys:35ms35ms   -0.5%35ms35ms   -1.0%
   DictWithIntegerKeys:28ms28ms   -1.2%28ms29ms   -2.3%
DictWithStringKeys:26ms27ms   -3.2%26ms28ms   -4.8%
SimpleDictManipulation:52ms53ms   -0.7%53ms53ms   -0.4%

Hum, as usuall, pybench doesn't seem reliable at all: I expect worse 
performance with the patch since it adds "version++" in dict.__setimte__(). I 
don't really trust pybench, results seem to have a lot of noise :-/


Maybe I'm not using pybench correctly? I used:

$ make distclean; ./configure && make
$ ./python Tools/pybench/pybench.py -f pybench.default
$ patch -p1 < dict_version.patch
$ ./python Tools/pybench/pybench.py -f pybench.dictversion
$ ./python Tools/pybench/pybench.py -s pybench.dictversion -c pybench.default


Full output:

---
PYBENCH 2.1
---
* using CPython 3.6.0a0 (default:53271aa4d84c+, Jan 9 2016, 10:27:40) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]
* disabled garbage collection
* system check interval set to maximum: 2147483647
* using timer: time.perf_counter
* timer: resolution=1e-09, implementation=clock_gettime(CLOCK_MONOTONIC)

---
Benchmark: pybench.dictversion
---

Rounds: 10
Warp:   10
Timer:  time.perf_counter

Machine Details:
   Platform ID:
Linux-4.2.5-300.fc23.x86_64-x86_64-with-fedora-23-Twenty_Three
   Processor:  x86_64

Python:
   Implementation: CPython
   Executable: /home/haypo/prog/python/default/python
   Version:3.6.0a0
   Compiler:   GCC 5.1.1 20150618 (Red Hat 5.1.1-4)
   Bits:   64bit
   Build:  Jan  9 2016 10:27:40 (#default:53271aa4d84c+)
   Unicode:UCS4


---
Comparing with: pybench.default
---

Rounds: 10
Warp:   10
Timer:  time.perf_counter

Machine Details:
   Platform ID:
Linux-4.2.5-300.fc23.x86_64-x86_64-with-fedora-23-Twenty_Three
   Processor:  x86_64

Python:
   Implementation: CPython
   Executable: /home/haypo/prog/python/default/python
   Version:3.6.0a0
   Compiler:   GCC 5.1.1 20150618 (Red Hat 5.1.1-4)
   Bits:   64bit
   Build:  Jan  9 2016 10:21:57 (#default:53271aa4d84c)
   Unicode:UCS4


Test minimum run-timeaverage  run-time
 thisother   diffthisother   diff
---
  BuiltinFunctionCalls:42ms42ms   +0.1%43ms43ms   -0.9%
   BuiltinMethodLookup:26ms25ms   +5.7%26ms25ms   +5.1%
 CompareFloats:27ms27ms   -0.9%27ms28ms   -4.2%
 CompareFloatsIntegers:60ms63ms   -3.3%61ms65ms   -6.8%
   CompareIntegers:41ms38ms   +7.9%41ms38ms   +7.2%
CompareInternedStrings:30ms28ms   +5.7%30ms28ms   +5.0%
  CompareLongs:24ms22ms   +8.6%24ms22ms   +8.5%
CompareStrings:22ms22ms   +0.3%23ms24ms   -6.6%
ComplexPythonFunctionCalls:43ms42ms   +1.2%43ms45ms   -5.2%
 ConcatStrings:29ms32ms  -11.0%29ms33ms  -13.6%
   CreateInstances:45ms45ms   +0.3%46ms46ms   -0.4%
CreateNewInstances:34ms34ms   +0.6%35ms34ms   +0.7%
   CreateStringsWithConcat:58ms58ms   +0.1%58ms58ms   -0.1%
  DictCreation:44ms49ms  -10.5%44ms49ms  -10.7%
 DictWithFloatKeys:35ms35ms   -0.5%35ms35ms   -1.0%
   DictWithIntegerKeys:28ms28ms   -1.2%28ms29ms   -2.3%
DictWithStringKeys:26ms27ms   -3.2%26ms28ms   -4.8%
  ForLoops:22ms22ms   +0.4%22ms22ms   +0.6%
IfThenElse:34ms34ms   +0.9%34ms34ms   +0.8%
   ListSlicing:34ms34ms   -0.2%34ms34ms   -0.1%
NestedForLoops:37ms36ms   +2.1%37ms36ms   +2.1%
  NestedListComprehensions:36ms35ms   +1.4%36ms36ms   +1.8%
  NormalClassAttribute:75ms77ms   -2.5%75ms77

[issue26049] Poor performance when reading large xmlrpc data

2016-01-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Reading with 10 MB limit allocates 10 MB buffer. It may be better to start with 
1024 bytes limit, and increase it by 2 times on every iteration.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26059] Integer Overflow

2016-01-09 Thread Ramin Farajpour Cami

New submission from Ramin Farajpour Cami:

this work on python 2.7.10 and 2.7.11 crash,

C:\Users\RaminFP>cdb -g python C:\Users\RaminFP\Desktop\1.py

Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: python C:\Users\RaminFP\Desktop\1.py
Symbol search path is: 
srv*c:\pubsymbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 1d00 1d00a000   python.exe
ModLoad: 76fe 77159000   ntdll.dll
ModLoad: 76ac 76bb   C:\Windows\SysWOW64\KERNEL32.DLL
ModLoad: 74e3 74fa6000   C:\Windows\SysWOW64\KERNELBASE.dll
ModLoad: 1e00 1e264000   C:\Windows\SysWOW64\python27.dll
ModLoad: 71a1 71ab3000   
C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9158_none_5091b51ebcb97cdc\MSVCR90.dll
ModLoad: 748f 74a3   C:\Windows\SysWOW64\USER32.dll
ModLoad: 747a 748ed000   C:\Windows\SysWOW64\GDI32.dll
ModLoad: 763e 7645b000   C:\Windows\SysWOW64\ADVAPI32.dll
ModLoad: 74bd 74c8e000   C:\Windows\SysWOW64\msvcrt.dll
ModLoad: 76bd 76c13000   C:\Windows\SysWOW64\sechost.dll
ModLoad: 76c3 76cdc000   C:\Windows\SysWOW64\RPCRT4.dll
ModLoad: 740f 7410e000   C:\Windows\SysWOW64\SspiCli.dll
ModLoad: 740e 740ea000   C:\Windows\SysWOW64\CRYPTBASE.dll
ModLoad: 7408 740d9000   C:\Windows\SysWOW64\bcryptPrimitives.dll
ModLoad: 74fb 7636f000   C:\Windows\SysWOW64\SHELL32.dll
ModLoad: 742c 7479d000   C:\Windows\SysWOW64\windows.storage.dll
ModLoad: 7690 76aba000   C:\Windows\SysWOW64\combase.dll
ModLoad: 74de 74e24000   C:\Windows\SysWOW64\shlwapi.dll
ModLoad: 767c 767cc000   C:\Windows\SysWOW64\kernel.appcore.dll
ModLoad: 76d4 76dcd000   C:\Windows\SysWOW64\shcore.dll
ModLoad: 767d 76814000   C:\Windows\SysWOW64\powrprof.dll
ModLoad: 76bc 76bcf000   C:\Windows\SysWOW64\profapi.dll
ModLoad: 7667 7669b000   C:\Windows\SysWOW64\IMM32.DLL
ModLoad: 766a 767c   C:\Windows\SysWOW64\MSCTF.dll
(13a4.1030): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=02555630 ebx=5708ac94 ecx=3c7a edx= esi=02546448 edi=57091000
eip=71a4ae7a esp=0028fc98 ebp=0028fca0 iopl=0 nv up ei pl nz ac pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010216
MSVCR90!memcpy+0x5a:
71a4ae7a f3a5rep movs dword ptr es:[edi],dword ptr [esi]
0:000> r
eax=02555630 ebx=5708ac94 ecx=3c7a edx= esi=02546448 edi=57091000
eip=71a4ae7a esp=0028fc98 ebp=0028fca0 iopl=0 nv up ei pl nz ac pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010216
MSVCR90!memcpy+0x5a:
71a4ae7a f3a5rep movs dword ptr es:[edi],dword ptr [esi]
0:000> db esi
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for 
C:\Windows\SysWOW64\python27.dll -
02546448  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
02546458  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
02546468  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
02546478  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
02546488  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
02546498  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
025464a8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
025464b8  41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41  
0:000> db edi
57091000  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091010  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091020  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091030  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091040  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091050  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091060  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
57091070  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  
0:000>

--
components: ctypes
files: 1.py
messages: 257812
nosy: Ramin Farajpour Cami
priority: normal
severity: normal
status: open
title: Integer Overflow
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file41543/1.py

___
Python tracker 

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



[issue25991] readline example eventually consumes all memory

2016-01-09 Thread Daniel Dye

Daniel Dye added the comment:

Add a history length of 1000 lines
Default is -1 (infinite), which may grow unruly

--
keywords: +patch
nosy: +Daniel Dye
Added file: http://bugs.python.org/file41544/doc_library_readline.patch

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread STINNER Victor

STINNER Victor added the comment:

Using timeit to microbenchmark dict operations (constructor, __setitem__, 
__delitem__, clear), I get exactly the same performance or even better 
performance (???) with the patch.

./python -m timeit 'd={1: 0}; d[2]=0; d[3]=0; d[4]=0; del d[1]; del d[2]; 
d.clear()'

Original: 318 ns
Patched: 318 ns

./python -m timeit 'd={i:i for i in range(2**16)}' 'for i in range(2**16): 
d[i]=i-1' 'for i in range(2**16): d[i]=i+1' 'for i in range(2**15): del d[i]' 
'd.clear()'

Original: 19.9 ms
Patched: 18.9 ms (5% faster)

--

___
Python tracker 

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



[issue26049] Poor performance when reading large xmlrpc data

2016-01-09 Thread Cédric Krier

Cédric Krier added the comment:

Will it not be better indeed to just stream.read() without any argument?
Because HTTPResponse will call _safe_read with just the length of the header.

--

___
Python tracker 

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



[issue26049] Poor performance when reading large xmlrpc data

2016-01-09 Thread Cédric Krier

Cédric Krier added the comment:

Answering to myself, it is better to read by chunk to feed the parser also by 
chunk.
So here is a version of the patch which increases by 2 on every loop.

--
Added file: http://bugs.python.org/file41545/default.patch

___
Python tracker 

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



[issue26041] Update deprecation messages of platform.dist() and platform.linux_distribution()

2016-01-09 Thread Kumaripaba Miyurusara Athukorala

Kumaripaba Miyurusara Athukorala added the comment:

Attached the patch that fixed the issue26041. Changed the deprecation message.

--
keywords: +patch
nosy: +Kumaripaba Miyurusara Athukorala
Added file: http://bugs.python.org/file41546/issue26041.diff

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch, I forgot to include unit tests.

I added a test on integer overflow on the version. The patch adds 
_testcapi.dict_setversion(dict, version) and _testcapi.PY_SIZE_MAX.

--
Added file: http://bugs.python.org/file41547/dict_version-2.patch

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't understand this:

> The version 0 is reserved for "missing key"

--
nosy: +pitrou

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread STINNER Victor

STINNER Victor added the comment:

> I don't understand this:
>> The version 0 is reserved for "missing key"

Oh, ignore it, it's an outdated comment :-) Dictionary version is initialized 
to 0, it's not more "reserved".

FYI I added the comment in my first implementation which also added a version 
to dictionary *entries*.

--

___
Python tracker 

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



[issue24918] Docs layout bug

2016-01-09 Thread Manvi B

Manvi B added the comment:

Fixed by using "display:inline" in ".highlight" class.

--
keywords: +patch
nosy: +Manvi B
Added file: http://bugs.python.org/file41548/issue24918.diff

___
Python tracker 

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



[issue24918] Docs layout bug

2016-01-09 Thread Manvi B

Manvi B added the comment:

Fixed by using "background: none" in ".highlight" class.

--
Added file: http://bugs.python.org/file41549/issue24918.diff

___
Python tracker 

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



[issue24918] Docs layout bug

2016-01-09 Thread Manvi B

Manvi B added the comment:

Both solutions msg257821, msg257822 seems to fix the issue.

--

___
Python tracker 

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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Nick Coghlan

New submission from Nick Coghlan:

Dave Beazley found some odd behaviour in Python 3.4.1+, where the order of the 
keys in a class dictionary can be changed by assigning a new value to an 
existing key: https://gist.github.com/dabeaz/617a5b0542d57e003433

Dave's original reproducer showed a case where iterating over class attributes 
replacing some of them with new values worked correctly as a class decorator on 
a normal instance of type, but was unreliable when the same operation was 
called from a metaclass __new__ or __init__ method.

Further investigation showed that it wasn't the timing of the assignment that 
mattered, but rather the use of a subclass of type rather than type itself as 
the metaclass.

Checking between 3.4.0 and 3.4.1 with hg bisect using the simpler attached 
script as the reproducer identified the enabling of key sharing with subclass 
instances in #20637 as the apparent culprit.

My current theory is that from 3.3.0 to 3.4.0, keys weren't being shared 
between instances of type and instances of type subclasses at all, and changing 
that in 3.4.1 broke a subtle assumption somewhere in type_new.

--
files: ns_reordering_bug.py
messages: 257824
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Class __dict__ iteration order changing due to type instance key-sharing
Added file: http://bugs.python.org/file41550/ns_reordering_bug.py

___
Python tracker 

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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +Mark.Shannon, benjamin.peterson, pingebretson, rhettinger, 
serhiy.storchaka

___
Python tracker 

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



[issue26041] Update deprecation messages of platform.dist() and platform.linux_distribution()

2016-01-09 Thread Kumaripaba Miyurusara Athukorala

Kumaripaba Miyurusara Athukorala added the comment:

Fixed the remaining errors.

--
Added file: http://bugs.python.org/file41551/issue26041.diff

___
Python tracker 

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



[issue25574] 2.7 incorrectly documents objects hash as equal to id

2016-01-09 Thread Elena Oat

Elena Oat added the comment:

Updated the documentation. Now it says that the hash is derived from id, as it 
says already in Python 3 docs.

--
nosy: +Elena.Oat
Added file: http://bugs.python.org/file41552/issue25574.diff

___
Python tracker 

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



[issue18911] minidom does not encode correctly when calling Document.writexml

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

> On Python 3 you should not only open file in text mode with specified
> encoding, but also specify the "xmlcharrefreplace" error handler.

Isn't this only required in case there are non encodable characters?
If the encoding is utf-8, this shouldn't be necessary (unless there are lone 
surrogates).  Specifying xmlcharrefreplace might be useful while using ascii or 
latin1 though.

The docs of writexml don't seem to specify if the file should be opened in text 
or binary mode but istm that only text mode is supported.  The advice of using 
xmlcharrefreplace could be added in a note.

--
nosy: +ezio.melotti
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



[issue25730] invisible sidebar content with code snippets

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

This is a duplicate of #24918, which also has a couple of patches that seem to 
fix the problem.

--
superseder:  -> Docs layout bug

___
Python tracker 

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



[issue25730] invisible sidebar content with code snippets

2016-01-09 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> duplicate
stage: test needed -> 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



[issue24789] ctypes doc string

2016-01-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1753a28acad4 by Ezio Melotti in branch '3.5':
#24789: fix docstring of ctypes.create_string_buffer.  Patch by Matheus Vieira 
Portela.
https://hg.python.org/cpython/rev/1753a28acad4

New changeset 57964ca3ce0f by Ezio Melotti in branch 'default':
#24789: merge with 3.5.
https://hg.python.org/cpython/rev/57964ca3ce0f

--
nosy: +python-dev

___
Python tracker 

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



[issue24789] ctypes doc string

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
nosy: +ezio.melotti
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
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



[issue26061] logging LogRecordFactory allow kwargs

2016-01-09 Thread Aviv Palivoda

New submission from Aviv Palivoda:

The logging LogRecord factory receives kwargs. However because _log and 
makeRecord functions in the Logger class don't support kwargs we can't actually 
pass additional positional arguments to LogRecord.

A use case for this is attached.

I had made a patch to fix this by changing _log and makeRecord to accept kwargs 
and pass them.

--
components: Library (Lib)
files: usecase.py
messages: 257831
nosy: palaviv, vinay.sajip
priority: normal
severity: normal
status: open
title: logging LogRecordFactory allow kwargs
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file41553/usecase.py

___
Python tracker 

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



[issue11440] fix_callable should be dropped from lib2to3 / changed

2016-01-09 Thread SilentGhost

Changes by SilentGhost :


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

___
Python tracker 

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



[issue26061] logging LogRecordFactory allow kwargs

2016-01-09 Thread Aviv Palivoda

Aviv Palivoda added the comment:

adding the patch :)

--
keywords: +patch
Added file: http://bugs.python.org/file41554/LogRecordFactoryKwargs.patch

___
Python tracker 

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



[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread Christoph Böddeker

New submission from Christoph Böddeker:

Hello, 

I found a wrong behavior with IPython 4 in combination with Python 3.5.1. 

Normally in a command like "In [2]: !echo {a}" everything inside {} is 
interpreted with python and inserted to executed the line with bash. After I 
done a upgrade tp Python 3.5.1 this wasn't working. After a downgrade (3.5.0) 
it was working.

In the bottom is an example, where "In [2]: !echo {a}" are the important lines.
In [2]: !echo {a}
 * Python 3.5.0 -> 3
 * Python 3.5.1 -> {a}

Best regards
Christoph 

---
$ ipython
Python 3.5.1 |Anaconda 2.4.0 (64-bit)| (default, Dec  7 2015, 11:16:01) 
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: a = 3

In [2]: !echo {a}
{a}

In [3]: 
---
conda install python=3.5.0
Fetching package metadata: 
Solving package specifications: 
Package plan for installation in environment /opt/anaconda3:

The following packages will be DOWNGRADED:

python: 3.5.1-0 --> 3.5.0-1

Proceed ([y]/n)? y

Unlinking packages ...
[  COMPLETE  ]|###| 100%
Linking packages ...
[  COMPLETE  ]|###| 100%

---

$ ipython
Python 3.5.0 |Anaconda 2.4.0 (64-bit)| (default, Oct 19 2015, 21:57:25) 
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: a = 3

In [2]: !echo {a}
3

In [3]:

--
messages: 257833
nosy: Christoph Böddeker
priority: normal
severity: normal
status: open
title: IPython4 bash magic ! with {} does not work with Python 3.5.1
type: behavior
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



[issue26063] Update copyright in the devguide

2016-01-09 Thread Ezio Melotti

New submission from Ezio Melotti:

The copyright in the devguide needs to be updated for 2016.

--
components: Devguide
messages: 257834
nosy: ezio.melotti, willingc
priority: normal
severity: normal
stage: needs patch
status: open
title: Update copyright in the devguide
type: enhancement

___
Python tracker 

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



[issue26063] Update copyright in the devguide

2016-01-09 Thread Chris Gonzalez

Changes by Chris Gonzalez :


--
keywords: +patch
Added file: http://bugs.python.org/file41555/copyright.diff

___
Python tracker 

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



[issue24786] Changes in the devguide repository are not published online in HTML

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

This seem to be already fixed, however the copyright needs to be updated again 
(see #26063).

--
nosy: +ezio.melotti
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue26063] Update copyright in the devguide

2016-01-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac2b3bafd41c by Ezio Melotti in branch 'default':
#26063: update copyright.  Patch by Chris Gonzalez.
https://hg.python.org/devguide/rev/ac2b3bafd41c

--
nosy: +python-dev

___
Python tracker 

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



[issue26063] Update copyright in the devguide

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

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



[issue26030] Use PEP8 in documentation examples

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

Without a list of places that don't follow the PEP8, I'm going to close this.

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

___
Python tracker 

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



[issue25170] 3.5.0 documentation archives missing

2016-01-09 Thread Ezio Melotti

Ezio Melotti added the comment:

https://www.python.org/ftp/python/doc/3.5.0/ now contains some files, but they 
seem to be for the ones for alpha 1 and 3.  The dir for 3.5.1 is still missing.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-09 Thread Elena Oat

Elena Oat added the comment:

Wrapped the lines to 80 chars.

--
nosy: +Elena.Oat
Added file: http://bugs.python.org/file41556/issue26001.diff

___
Python tracker 

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



[issue26030] Use PEP8 in documentation examples

2016-01-09 Thread Julien

Julien added the comment:

I opened this ticket mainly to know the opinions on those modifications, I'll 
slowly review what I see, and provide little patches from time to time, only 
when the PEP8 infringement look obvious.

I think the most obvious PEP8 infringement ARE to be fixed, typically in the 
tutorial: The documentation is where people learn, let's teach them the right 
thing to do :-)

Thanks to naoki I just learnt that no spaces around binary operators are OK  
when it enhance the readability 
(https://www.python.org/dev/peps/pep-0008/#other-recommendations) like 2*2 + 
3*2.

I close this ticket, I'll just mention if I propose a patch in a new one.

Bests.

--
status: pending -> closed

___
Python tracker 

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



[issue25486] Resurrect inspect.getargspec() in 3.6

2016-01-09 Thread Stefan Krah

Stefan Krah added the comment:

Could this be done soon? I ran into this just now:

Traceback (most recent call last):
  File "", line 1, in 
  File 
"/home/stefan/usr/lib/python3.6/site-packages/datashape-0.4.7-py3.6.egg/datashape/__init__.py",
 line 7, in 
from .user import *
  File 
"/home/stefan/usr/lib/python3.6/site-packages/datashape-0.4.7-py3.6.egg/datashape/user.py",
 line 16, in 
@dispatch(np.dtype, basetypes)
  File 
"/home/stefan/usr/lib/python3.6/site-packages/multipledispatch-0.4.8-py3.6.egg/multipledispatch/core.py",
 line 60, in _
if ismethod(func):
  File 
"/home/stefan/usr/lib/python3.6/site-packages/multipledispatch-0.4.8-py3.6.egg/multipledispatch/core.py",
 line 79, in ismethod
spec = inspect.getargspec(func)
AttributeError: module 'inspect' has no attribute 'getargspec'

--
nosy: +rhettinger, skrah
priority: normal -> release blocker

___
Python tracker 

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



[issue25486] Resurrect inspect.getargspec() in 3.6

2016-01-09 Thread Berker Peksag

Berker Peksag added the comment:

Perhaps we can also add it back in 3.5.2 since 3.5 is in early stages of its 
maintenance period?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue25486] Resurrect inspect.getargspec() in 3.6

2016-01-09 Thread Stefan Krah

Stefan Krah added the comment:

+1 for adding it to 3.5.2.

--

___
Python tracker 

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



[issue25486] Resurrect inspect.getargspec() in 3.6

2016-01-09 Thread Yury Selivanov

Yury Selivanov added the comment:

> Perhaps we can also add it back in 3.5.2 since 3.5 is in early stages of its 
> maintenance period?

> +1 for adding it to 3.5.2.

I was never removed from 3.5

Python 3.5.1 (default, Dec 13 2015, 16:05:52)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> inspect.getargspec


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



[issue26029] Broken sentence in extending documentation

2016-01-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f9b9244488d by Terry Jan Reedy in branch '3.5':
Issue #26029: Finish correction.
https://hg.python.org/cpython/rev/3f9b9244488d

--

___
Python tracker 

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



Re: [issue26045] Improve error message for http.client when posting unicode string

2016-01-09 Thread Random832
Guido van Rossum  writes:
> UnicodeEncodeError: 'ascii' codec can't encode character '\u1234' in
^  ^
>   position 3: Header ('ሴ') is not valid Latin-1. Use
^ ^^^
>   header.encode('utf-8') if you want to send it encoded in UTF-8.

Er...

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



[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread Brett Cannon

Brett Cannon added the comment:

Python itself has nothing to do with IPython's shell commands (i.e., !). It 
would be best to report this bug to IPython to have them fix it on their end.

--
nosy: +brett.cannon
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread Brett Cannon

Brett Cannon added the comment:

A better way to benchmark this is to run hg.python.org/benchmarks with a 
patched interpreter and see if that shows any performance impact.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +beazley

___
Python tracker 

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



[issue26064] directory is getting separated

2016-01-09 Thread Sagar Kar

New submission from Sagar Kar:

In [108]: os.mkdir('newdir') # make new dir
In [140]: p = os.path.abspath('newdir')

In [141]: p
Out[141]: 
'/media/sagarkar10/sdrive/programing/python/SciPy/scipy-notebook/newdir'

## here 'newdir' is also a directory with a file inside

In [143]: os.path.dirname(p)
Out[143]: '/media/sagarkar10/sdrive/programing/python/SciPy/scipy-notebook'

## but os.path.dirname() dont show it under directory it treats as if its a 
file and till the last '/' is the directory
and also 

In [145]: os.path.basename(p)
Out[145]: 'newdir'

## basename shows it

--
components: Extension Modules
messages: 257849
nosy: sagarkar10
priority: normal
severity: normal
status: open
title: directory is getting separated
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue26064] directory is getting separated

2016-01-09 Thread SilentGhost

SilentGhost added the comment:

It behaves exactly as described in documentation, the only thing I could 
suggest is to re-read the following for details: 
https://docs.python.org/3/library/os.path.html#os.path.split

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



[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread Christoph Böddeker

Christoph Böddeker added the comment:

That's true. Now I have finde the reason.

Someone has changed a function in lib/python3.5/string.py : _vformat.
This function returns now a tuple (befor it was only one return value).

IPython inherits from this object in 
lib/python3.5/site-packages/IPython/utils/text.py
Because of this change the IPython code is not working.

It seems to me, that this change in python is not nessesary.

I don't, know how to find the commit, message who has changed this and why.



Python 3.5.0:
def _vformat( ..., auto_arg_index=0):
...
format_spec = self._vformat( ..., auto_arg_index=auto_arg_index)
...
return ''.join(result)

Python 3.5.1:
def _vformat( ..., auto_arg_index=0):
...
format_spec, auto_arg_index = self._vformat( ..., 
auto_arg_index=auto_arg_index)
...
return ''.join(result), auto_arg_index

--
status: closed -> open

___
Python tracker 

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



[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread SilentGhost

SilentGhost added the comment:

> It seems to me, that this change in python is not nessesary.

> I don't, know how to find the commit, message who has changed this and why.

It was done in issue 13598. It's a bit puzzling that IPython decided to depend 
on behaviour of a private method. I'd suggest you take it up with them.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread Emanuel Barry

Emanuel Barry added the comment:

The choice of IPython to depend on a private, undocumented method means that 
they are subject to such bugs. A quick Google search tells me you should 
probably report the issue here: https://github.com/ipython/ipython/issues

--
nosy: +ebarry
status: open -> closed

___
Python tracker 

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



[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1

2016-01-09 Thread Christoph Böddeker

Christoph Böddeker added the comment:

ok, thanks, I have opend there an issue 
https://github.com/ipython/ipython/issues/9120

--

___
Python tracker 

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



[issue26065] python embedded 3.5 amd64 crash when using venv

2016-01-09 Thread Laurent Dufrechou

New submission from Laurent Dufrechou:

Install python-3.5.1-embed-amd64 to c:\dev\python-3.5.1-embed-amd64
Open terminal window:
cd c:\dev\python-3.5.1-embed-amd64
python -m venv c:\dev\myenv

-> crash
Error: Command '['C:\\dev\\myenv\\Scripts\\python.exe', '-Im', 'ensurepip', 
'--upgrade', '--default-pip']' returned non-zero exit status 3221226505

Using debugger (VS2015) shows error:
Exception non gérée à 0x7FFDA1D05A4E (ucrtbase.dll) dans python.exe 
And stopping debugger leave this log:
C:\dev\python-3.5.1-embed-amd64>python -m venv C:\dev\python35_x64_rtquickreport
Traceback (most recent call last):
  File "runpy.py", line 170, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "venv\__main__.py", line 6, in 
  File "venv\__init__.py", line 442, in main
  File "venv\__init__.py", line 85, in create
  File "venv\__init__.py", line 257, in _setup_pip
  File "subprocess.py", line 629, in check_output
  File "subprocess.py", line 698, in run
  File "subprocess.py", line 1055, in communicate
KeyboardInterrupt

--
components: Windows
messages: 257855
nosy: Laurent Dufrechou, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: python embedded 3.5 amd64 crash when using venv
type: crash
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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Ionel Cristian Mărieș

Changes by Ionel Cristian Mărieș :


--
nosy: +ionelmc

___
Python tracker 

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



[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-09 Thread Mike Romberg

Mike Romberg added the comment:

This patch modifies issue17633-hg.diff by adding changes suggested by the 
reviewers.

  Note.  I did cleanup the use of __import__ outside of the area involved with 
issue17633 as it seemed low risk.  The tests for issue17633 (and the refactored 
doTest/makeZip now use addCleanup().  However there are still tests in the 
module that use the old try/finally way of cleanup.  I did not modify these in 
order to keep this from being a rewrite of test_zipimport.

  But if more changes are desired, I'll add them.

--
Added file: http://bugs.python.org/file41557/issue17633-hg-2.patch

___
Python tracker 

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



[issue18911] minidom does not encode correctly when calling Document.writexml

2016-01-09 Thread R. David Murray

Changes by R. David Murray :


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



[issue25677] Syntax error caret confused by indentation

2016-01-09 Thread R. David Murray

Changes by R. David Murray :


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



[issue25730] invisible sidebar content with code snippets

2016-01-09 Thread R. David Murray

Changes by R. David Murray :


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



[issue25170] 3.5.0 documentation archives missing

2016-01-09 Thread R. David Murray

Changes by R. David Murray :


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



[issue26066] Language on the "Cryptographic Services" is out of date

2016-01-09 Thread Alex Gaynor

New submission from Alex Gaynor:

https://docs.python.org/2/library/crypto.html
https://docs.python.org/3/library/crypto.html

This language has a number of issues:
- Crypto isn't just for "Hardcore cypherpunks" anymore, it's a necessary 
component of a great many software projects
- PyCrypto isn't maintained by A.M. Kuchling any longer
- (IMO) it's no longer the recommended library for cryptography in Python
- The page should probably also point people towards the ssl module.

--
assignee: docs@python
components: Documentation
messages: 257857
nosy: alex, docs@python
priority: normal
severity: normal
status: open
title: Language on the "Cryptographic Services" is out of date
versions: Python 2.7, 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



[issue26066] Language on the "Cryptographic Services" documentation page is out of date

2016-01-09 Thread Alex Gaynor

Changes by Alex Gaynor :


--
title: Language on the "Cryptographic Services" is out of date -> Language on 
the "Cryptographic Services" documentation page is out of date

___
Python tracker 

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



[issue26067] test_shutil fails when gid name is missing

2016-01-09 Thread Dinesh Wijekoon

New submission from Dinesh Wijekoon:

./python.exe -m test -j3 -v test_shutil

The above test fails when id name is missing. The fail message is 
group = grp.getgrgid(gid)[0]
KeyError: 'getgrgid(): gid not found: 203135016'

Following is the results from console "id" command, when the failure happens. 

uid=1336551206(athukora) gid=203135016 
groups=203135016,402(com.apple.sharepoint.group.2),12(everyone),62(netaccounts),80(admin),401(com.apple.sharepoint.group.1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)

And again when I change user to sudo the "id" command returns the following and 
test get passed.
uid=0(root) gid=0(wheel) 
groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),12(everyone),20(staff),29(certusers),61(localaccounts),80(admin),401(com.apple.sharepoint.group.1),402(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)

PS:

We tried to debug this a bit and found the bug is possibly in 
Modules/grpmodule.c, may be at method grp_getgrall_impl. Adding 
"PyString_AsString(v);" before if command " PyList_Append(d, v) != 0" will fix 
the issue in test. But we have no idea how its working with this change.

--
components: Extension Modules
messages: 257858
nosy: Dinesh Wijekoon, ezio.melotti
priority: normal
severity: normal
status: open
title: test_shutil fails when gid name is missing
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



[issue26067] test_shutil fails when gid name is missing

2016-01-09 Thread Dinesh Wijekoon

Dinesh Wijekoon added the comment:

This reported bug occurred in Mac OS.

--

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread ThiefMaster

New submission from ThiefMaster:

```
Python 3.4.3 (default, Jan  5 2016, 23:13:10)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> for n in range(198, 201):
... print(re.compile('x' * n))
...
re.compile('xx')
re.compile('xxx)
re.compile('xxx)
```

The closing quote in the repr goes away once the regex exceeds a certain 
length. This smells like an off-by-one somewhere that results in the last 
character to be lost. In any case, it's pretty ugly since the repr clearly 
pretends to be executable Python code, which is not the case anymore with this 
quote missing.

--
components: Regular Expressions
messages: 257860
nosy: ThiefMaster, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.compile() repr end quote truncated
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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread Guido van Rossum

Guido van Rossum added the comment:

It's simply the effect of the "%.200R" format here:
https://hg.python.org/cpython/file/default/Modules/_sre.c#l1417

I recommend not bothering to fix this: it would just be more code, and to what 
end?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue24823] ctypes.create_string_buffer does not add NUL if len(init) == size

2016-01-09 Thread Krista Paasonen

Krista Paasonen added the comment:

Patch containing checking for buffer size, so that NULL value is the last byte 
as C standard specifies. Raises ValueError exception if initial value does not 
fit into to the buffer with NULL char.

This should decrease the possibility of creating security issues.

--
keywords: +patch
nosy: +krista
Added file: http://bugs.python.org/file41558/create_string_buffer.patch

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread ThiefMaster

ThiefMaster added the comment:

I think it's pretty ugly to have a repr that is valid python code in most cases 
and suddenly stops being so.

The repr of a string is not truncated, so why truncate it in a pattern object?

With the truncation, why not use a repr style that's clearly not executable to 
recreate the original object, e.g. ``

--

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread Emanuel Barry

Emanuel Barry added the comment:

Truncating at 200 characters is actually a common occurrence in the C code, 
just barely anyone notice this, as it's not common to need more than 200 
characters for most expressions.

I don't think this needs to be changed at all; the rare case should not affect 
the common ones. If eval()'ing your repr fails, you can always access the full 
regex from `exp.pattern` - which doesn't truncate at 200 characters :)

--
nosy: +ebarry

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-01-09 Thread Martin Panter

Martin Panter added the comment:

+script = textwrap.dedent("1 + 1 = 2\n")
You don’t need that first textwrap.dedent() call. It is only useful if the 
string has extra indentation at the start, as in the second multiline one.

--

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread ThiefMaster

ThiefMaster added the comment:

Not eval'ing it, just wondered why the repr looks so weird when printing an 
object containing a compiled regex ;)

--

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread Matthew Barnett

Matthew Barnett added the comment:

I'm going to have to agree with ThiefMaster. String literals don't truncate 
like that, nor do lists, nor tuples.

Are there any similar cases of truncation elsewhere in the standard library?

--

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread Guido van Rossum

Guido van Rossum added the comment:

Yes, the C code pretty much always uses %., in order to
protect itself from buffer overflows. Pulling off an unabbreviated str()
here would be a major piece of work.

--

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread ThiefMaster

ThiefMaster added the comment:

Would it be possible to preserve the quotes even in case of truncation?

--

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-01-09 Thread Michael Layzell

Michael Layzell added the comment:

Oops. Should be fixed now.

--
Added file: http://bugs.python.org/file41559/cpython25677.patch

___
Python tracker 

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



[issue26068] re.compile() repr end quote truncated

2016-01-09 Thread Guido van Rossum

Guido van Rossum added the comment:

That would be an interesting exercise. You'd have to patch
PyUnicode_FromFormat(). It would be nice to have this. It should probably
also insert some dots (the universal sign to indicate that something was
truncated).

--

___
Python tracker 

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



[issue26030] Use PEP8 in documentation examples

2016-01-09 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: needs patch -> resolved

___
Python tracker 

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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue26063] Update copyright in the devguide

2016-01-09 Thread Berker Peksag

Berker Peksag added the comment:

I'd prefer a more general solution similar to the one has been used in 
Doc/conf.py

copyright = u'1990-%s, Python Software Foundation' % time.strftime('%Y')

--
nosy: +berker.peksag

___
Python tracker 

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



[issue26065] python embedded 3.5 amd64 crash when using venv

2016-01-09 Thread Steve Dower

Steve Dower added the comment:

I can't read those error messages, but I suspect this is because some of the 
bundled files are omitted from the embeddable package.

Using it to run venv isn't really part of the intended use cases - it's 
expected you'll manually install packages alongside it with your own installer. 
If that doesn't sound suitable for what you're trying to do, you should use the 
installers to install Python.

--

___
Python tracker 

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



[issue26063] Update copyright in the devguide

2016-01-09 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

+1

--
nosy: +matrixise

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread STINNER Victor

STINNER Victor added the comment:

Brett:
> A better way to benchmark this is to run hg.python.org/benchmarks with a 
> patched interpreter and see if that shows any performance impact.

Ok. Here is the output. Can you please explain me the result? :-) Especially 
the "significant" value.


$ ./python.orig ../benchmarks/perf.py ./python.orig ./python.patched

INFO:root:Automatically selected timer: perf_counter
INFO:root:Running `./python.patched ../benchmarks/lib3/2to3/2to3 -f all 
../benchmarks/lib/2to3`
INFO:root:Running `./python.patched ../benchmarks/lib3/2to3/2to3 -f all 
../benchmarks/lib/2to3` 1 time
INFO:root:Running `./python.orig ../benchmarks/lib3/2to3/2to3 -f all 
../benchmarks/lib/2to3`
INFO:root:Running `./python.orig ../benchmarks/lib3/2to3/2to3 -f all 
../benchmarks/lib/2to3` 1 time
INFO:root:Running `./python.patched 
../benchmarks/performance/bm_chameleon_v2.py -n 50 --timer perf_counter`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_chameleon_v2.py 
-n 50 --timer perf_counter`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_django_v3.py 
-n 50 --timer perf_counter`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_django_v3.py -n 
50 --timer perf_counter`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_pickle.py -n 
50 --timer perf_counter --use_cpickle pickle`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_pickle.py -n 50 
--timer perf_counter --use_cpickle pickle`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_pickle.py -n 
50 --timer perf_counter --use_cpickle unpickle`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_pickle.py -n 50 
--timer perf_counter --use_cpickle unpickle`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_json_v2.py -n 
50 --timer perf_counter`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_json_v2.py -n 50 
--timer perf_counter`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_json.py -n 50 
--timer perf_counter json_load`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_json.py -n 50 
--timer perf_counter json_load`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_nbody.py -n 50 
--timer perf_counter`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_nbody.py -n 50 
--timer perf_counter`
INFO:root:Running `./python.patched ../benchmarks/performance/bm_regex_v8.py -n 
50 --timer perf_counter`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_regex_v8.py -n 50 
--timer perf_counter`
INFO:root:Running `./python.patched 
../benchmarks/performance/bm_tornado_http.py -n 100 --timer perf_counter`
INFO:root:Running `./python.orig ../benchmarks/performance/bm_tornado_http.py 
-n 100 --timer perf_counter`
[ 1/10] 2to3...
[ 2/10] chameleon_v2...
[ 3/10] django_v3...
[ 4/10] fastpickle...
[ 5/10] fastunpickle...
[ 6/10] json_dump_v2...
[ 7/10] json_load...
[ 8/10] nbody...
[ 9/10] regex_v8...
[10/10] tornado_http...

Report on Linux smithers 4.2.8-300.fc23.x86_64 #1 SMP Tue Dec 15 16:49:06 UTC 
2015 x86_64 x86_64
Total CPU cores: 8

### 2to3 ###
6.825440 -> 6.996616: 1.03x slower

### fastpickle ###
Min: 0.449710 -> 0.458054: 1.02x slower
Avg: 0.451589 -> 0.583100: 1.29x slower
Significant (t=-8.04)
Stddev: 0.00076 -> 0.11568: 152.3886x larger

### fastunpickle ###
Min: 0.549672 -> 0.545734: 1.01x faster
Avg: 0.551284 -> 0.696920: 1.26x slower
Significant (t=-6.65)
Stddev: 0.00118 -> 0.15493: 130.9694x larger

### json_load ###
Min: 0.432500 -> 0.466602: 1.08x slower
Avg: 0.433771 -> 0.471205: 1.09x slower
Significant (t=-10.63)
Stddev: 0.00495 -> 0.02440: 4.9303x larger

### nbody ###
Min: 0.230055 -> 0.234925: 1.02x slower
Avg: 0.230985 -> 0.236441: 1.02x slower
Significant (t=-7.56)
Stddev: 0.00048 -> 0.00508: 10.5095x larger

The following not significant results are hidden, use -v to show them:
chameleon_v2, django_v3, json_dump_v2, regex_v8, tornado_http.

--
versions: +Python 2.7 -Python 3.6

___
Python tracker 

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



[issue24823] ctypes.create_string_buffer does not add NUL if len(init) == size

2016-01-09 Thread Eryk Sun

Eryk Sun added the comment:

I didn't want to change the function in lieu of breaking someone's code. If 
this change is accepted, then it at least needs a documentation note to 
indicate the new behavior.

--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue24823] ctypes.create_string_buffer does not add NUL if len(init) == size

2016-01-09 Thread Eryk Sun

Changes by Eryk Sun :


--
components: +Documentation, Library (Lib)

___
Python tracker 

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



[issue26060] Class __dict__ iteration order changing due to type instance key-sharing

2016-01-09 Thread Emanuel Barry

Changes by Emanuel Barry :


--
nosy: +ebarry

___
Python tracker 

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



[issue26069] Remove the Deprecated API in trace module

2016-01-09 Thread Senthil Kumaran

New submission from Senthil Kumaran:

A number of old methods in trace module were deprecated in issue10371. They 
should be removed in 3.6 release.

--
components: Library (Lib)
messages: 257877
nosy: belopolsky, orsenthil
priority: normal
severity: normal
stage: needs patch
status: open
title: Remove the Deprecated API in trace module
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



[issue26070] Launcher fails to find in-place built binaries from earlier Python versions

2016-01-09 Thread Mark Hammond

New submission from Mark Hammond:

The launcher was recently updated to look in PCBuild/win32 to support the win32 
binaries being built in this directory instead of the top-level PCBuild 
directory. However, when this new launcher tries to find a binary for, say, 
Python 2.7, it doesn't find an executable because it's directly in PCBuild, not 
one of the win32 or amd64 sub-directories.

Note this only impacts Python when it is built in the directory - it doesn't 
impact installed versions.

The fix I came up with is to continue looking in PCBuild if it isn't found in 
one of those dirs.

Vinay, what do you think?

--
components: Windows
files: launcher.patch
keywords: patch
messages: 257878
nosy: mhammond, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
priority: normal
severity: normal
status: open
title: Launcher fails to find in-place built binaries from earlier Python 
versions
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41560/launcher.patch

___
Python tracker 

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



[issue26071] bdist_wininst created binaries fail to start and find 32bit Pythons

2016-01-09 Thread Mark Hammond

New submission from Mark Hammond:

Binaries created by bdist_wininst fail on 3.5+ for 2 reasons:

* The built binary links against the DLL version of the CRT. This means the 
binary will typically fail to start as the CRT DLL isn't found.

* When looking for 32bit Python versions, it fails to take the recent "-32" 
change for the registry key, so it tells you no Python is installed.

This patch:
* Uses the static CRT, which IIRC, was the case in previous Python versions.
* Changes directory to the directory with pythonxx.dll before attempting to 
loadlibrary it - this allows the loadlibrary to succeed as the CRT DLL in that 
directory is found.
* Appends "-32" to registry keys on 32bit builds.

With these patches I can successfully get a pywin32 build working and 
installing.

Steve (or anyone), what do you think?

(Note that the attached patch does *not* include a newly built wininst-14.exe, 
but that would obviously need to be updated before checking in.)

--
components: Windows
files: bdist.patch
keywords: patch
messages: 257879
nosy: mhammond, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: bdist_wininst created binaries fail to start and find 32bit Pythons
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41561/bdist.patch

___
Python tracker 

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



[issue26058] Add dict.__version__ read-only property

2016-01-09 Thread Brett Cannon

Brett Cannon added the comment:

So min is the fastest time in a benchmark execution, average is the average 
across all benchmark executions, and the t-value is some statistics thing. 
Anything marked insignificant had such a small average difference it isn't 
worth reporting.

If you want to smooth out the numbers you should do a rigorous run that uses 
more loops per benchmark to help smooth out outliers. And if you are doing this 
on Linux there is a flag to measure memory usage as well.

--

___
Python tracker 

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



[issue26069] Remove the Deprecated API in trace module

2016-01-09 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This patch removes the deprecated apis from 3.6. After getting a review from 
one another core dev, I will commit this.

* No doc changes are required as the deprecated apis were not documented.
* README will be added during commit.

--
assignee:  -> orsenthil
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



[issue26065] python embedded 3.5 amd64 crash when using venv

2016-01-09 Thread Eryk Sun

Eryk Sun added the comment:

0xC409 (3221226505) is STATUS_STACK_BUFFER_OVERRUN due to the CRT calling 
__fastfail(FAST_FAIL_FATAL_APP_EXIT) in abort(). This is expected behavior in 
Windows 8+ [1].

Initially I couldn't reproduce this error because Python found the standard 
library from the system Python via the registry. After archiving (as .reg) and 
removing the key "HKLM\SOFTWARE\Python\PythonCore\3.5", I reproduced the 
problem as follows:

C:\Temp>myenv\Scripts\python.exe -Im ensurepip --upgrade --default-pip
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x0b9c (most recent call first):

venv didn't copy over python35.zip to the Scripts directory. I don't know 
whether there's ever a legitimate reason to look for and copy a zipped standard 
library, or whether venv is only supported for use with a standard Python 
installation.

I don't recommend doing this, but if you create the environment --without-pip, 
the command 'succeeds'. Then you'll have to manually copy python35.zip to 
Scripts and obtain activate.bat (edit this) and deactivate.bat from another 
install or the web. You still won't have ensurepip. If you want pip and 
setuptools, use get-pip.py from the web. This is all probably more trouble than 
you want. However, the embedding distribution is not intended to be a full 
Python installation that's suitable for development.

[1]: https://msdn.microsoft.com/en-us/library/dn774154

--
nosy: +eryksun

___
Python tracker 

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



  1   2   >