[Python-Dev] Summary of Python tracker Issues

2016-01-15 Thread Python tracker

ACTIVITY SUMMARY (2016-01-08 - 2016-01-15)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open5387 (+16)
  closed 32496 (+60)
  total  37883 (+76)

Open issues with patches: 2372 


Issues opened (51)
==

#25668: Deadlock in logging caused by a possible race condition with "
http://bugs.python.org/issue25668  reopened by fviard

#26050: Add new StreamReader.readuntil() method
http://bugs.python.org/issue26050  opened by mmarkk

#26051: Non-data descriptors in pydoc
http://bugs.python.org/issue26051  opened by Antony.Lee

#26052: pydoc for __init__ with not docstring
http://bugs.python.org/issue26052  opened by Antony.Lee

#26053: regression in pdb output between 2.7 and 3.5
http://bugs.python.org/issue26053  opened by doughellmann

#26057: Avoid nonneeded use of PyUnicode_FromObject()
http://bugs.python.org/issue26057  opened by serhiy.storchaka

#26058: PEP 509: Add ma_version to PyDictObject
http://bugs.python.org/issue26058  opened by haypo

#26059: Integer Overflow in strop.replace()
http://bugs.python.org/issue26059  opened by Ramin Farajpour Cami

#26060: Class __dict__ iteration order changing due to type instance k
http://bugs.python.org/issue26060  opened by ncoghlan

#26065: python embedded 3.5 amd64 crash when using venv
http://bugs.python.org/issue26065  opened by Laurent Dufrechou

#26067: test_shutil fails when gid name is missing
http://bugs.python.org/issue26067  opened by Dinesh Wijekoon

#26068: re.compile() repr end quote truncated
http://bugs.python.org/issue26068  opened by ThiefMaster

#26070: Launcher fails to find in-place built binaries from earlier Py
http://bugs.python.org/issue26070  opened by mhammond

#26071: bdist_wininst created binaries fail to start and find 32bit Py
http://bugs.python.org/issue26071  opened by mhammond

#26072: pdb fails to access variables closed over
http://bugs.python.org/issue26072  opened by Antony.Lee

#26073: Update the list of magic numbers in launcher
http://bugs.python.org/issue26073  opened by serhiy.storchaka

#26075: typing.Union unifies types too broadly
http://bugs.python.org/issue26075  opened by alex.gronholm

#26076: redundant checks in tok_get in Parser\tokenizer.c
http://bugs.python.org/issue26076  opened by Oren Milman

#26077: Make slicing of immutable structures return a view instead of 
http://bugs.python.org/issue26077  opened by Filip Haglund

#26079: Build with Visual Studio 2015 using PlatformToolset=v120
http://bugs.python.org/issue26079  opened by bjoernthiel

#26081: Implement asyncio Future in C to improve performance
http://bugs.python.org/issue26081  opened by yselivanov

#26082: functools.lru_cache user specified cachedict support
http://bugs.python.org/issue26082  opened by wdv4758h

#26085: Tkinter spoils the input text
http://bugs.python.org/issue26085  opened by fresh_nick

#26086: Bug in standardmodule os
http://bugs.python.org/issue26086  opened by Johano

#26089: Duplicated keyword in distutils metadata
http://bugs.python.org/issue26089  opened by Augustin Laville

#26090: More correct string truncating in PyUnicode_FromFormat()
http://bugs.python.org/issue26090  opened by serhiy.storchaka

#26092: doctest should allow custom sys.displayhook
http://bugs.python.org/issue26092  opened by Sergey.Kirpichev

#26093: __qualname__ different when calling generator object w/ functi
http://bugs.python.org/issue26093  opened by dino.viehland

#26094: ConfigParser.get() doc to be updated according to the configpa
http://bugs.python.org/issue26094  opened by khyox

#26095: Update porting HOWTO to special-case Python 2 code, not Python
http://bugs.python.org/issue26095  opened by brett.cannon

#26098: PEP 510: Specialize functions with guards
http://bugs.python.org/issue26098  opened by haypo

#26099: site ignores ImportError when running sitecustomize and usercu
http://bugs.python.org/issue26099  opened by haypo

#26100: Add test.support.optim_args_from_interpreter_flags()
http://bugs.python.org/issue26100  opened by haypo

#26101: Lib/test/test_compileall.py fails when run directly
http://bugs.python.org/issue26101  opened by haypo

#26102: access violation in PyErrFetch if tcur==null in PyGILState_Rel
http://bugs.python.org/issue26102  opened by cberger

#26103: Contradiction in definition of "data descriptor" between (dott
http://bugs.python.org/issue26103  opened by Aaron Hall

#26106: Move licences to literal blocks
http://bugs.python.org/issue26106  opened by sizeof

#26107: code.co_lnotab: use signed line number delta to support moving
http://bugs.python.org/issue26107  opened by haypo

#26108: Calling PyInitialize with 2.7.11 on Windows x64 terminates pro
http://bugs.python.org/issue26108  opened by David Heffernan

#26109: _Py_DumpTraceback should be PyAPI_FUNC
http://bugs.python.org/issue26109  opened by John.Malmberg

#26110: Speedup method calls 1.2x
http://bugs.pyt

[Python-Dev] Boolean value of an Enum member

2016-01-15 Thread Ethan Furman
When Enum was being designed one of the questions considered was where 
to start autonumbering: zero or one.


As I remember the discussion we chose not to start with zero because we 
didn't want an enum member to be False by default, and having a member 
with value 0 be True was discordant.  So the functional API starts with 
1 unless overridden.  In fact, according to the Enum docs:


   The reason for defaulting to ``1`` as the starting number and
   not ``0`` is that ``0`` is ``False`` in a boolean sense, but
   enum members all evaluate to ``True``.

However, if the Enum is combined with some other type (str, int, float, 
etc), then most behaviour is determined by that type -- including 
boolean evaluation.  So the empty string, 0 values, etc, will cause that 
Enum member to evaluate as False.


So the question now is:  for a standard Enum (meaning no other type 
besides Enum is involved) should __bool__ look to the value of the Enum 
member to determine True/False, or should we always be True by default 
and make the Enum creator add their own __bool__ if they want something 
different?


On the one hand we have backwards compatibility, which will take a 
version to change.


On the other hand we have a pretty basic difference in how zero/empty is 
handled between "pure" Enums and "mixed" Enums.


On the gripping hand we have . . .

Please respond with your thoughts on changing pure Enums to match mixed 
Enums or any experience you have had with relying on the "always True" 
behaviour or if you have implemented your own __bool__ to match the 
standard True/False meanings or if you have implemented your own 
__bool__ to match some other scheme entirely.


--
~Ethan~
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-ideas] Boolean value of an Enum member

2016-01-15 Thread Guido van Rossum
Honestly I think it's too late to change. The proposal to change plain
Enums to False when their value is zero (or falsey) would be a huge
backward incompatibility. I don't think there's a reasonable path forward,
and also don't think there's a big reason to regret the current semantics.

On Fri, Jan 15, 2016 at 10:22 AM, Ethan Furman  wrote:

> When Enum was being designed one of the questions considered was where to
> start autonumbering: zero or one.
>
> As I remember the discussion we chose not to start with zero because we
> didn't want an enum member to be False by default, and having a member with
> value 0 be True was discordant.  So the functional API starts with 1 unless
> overridden.  In fact, according to the Enum docs:
>
>The reason for defaulting to ``1`` as the starting number and
>not ``0`` is that ``0`` is ``False`` in a boolean sense, but
>enum members all evaluate to ``True``.
>
> However, if the Enum is combined with some other type (str, int, float,
> etc), then most behaviour is determined by that type -- including boolean
> evaluation.  So the empty string, 0 values, etc, will cause that Enum
> member to evaluate as False.
>
> So the question now is:  for a standard Enum (meaning no other type
> besides Enum is involved) should __bool__ look to the value of the Enum
> member to determine True/False, or should we always be True by default and
> make the Enum creator add their own __bool__ if they want something
> different?
>
> On the one hand we have backwards compatibility, which will take a version
> to change.
>
> On the other hand we have a pretty basic difference in how zero/empty is
> handled between "pure" Enums and "mixed" Enums.
>
> On the gripping hand we have . . .
>
> Please respond with your thoughts on changing pure Enums to match mixed
> Enums or any experience you have had with relying on the "always True"
> behaviour or if you have implemented your own __bool__ to match the
> standard True/False meanings or if you have implemented your own __bool__
> to match some other scheme entirely.
>
> --
> ~Ethan~
> ___
> Python-ideas mailing list
> python-id...@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Boolean value of an Enum member

2016-01-15 Thread Barry Warsaw
On Jan 15, 2016, at 10:22 AM, Ethan Furman wrote:

>So the question now is: for a standard Enum (meaning no other type besides
>Enum is involved) should __bool__ look to the value of the Enum member to
>determine True/False, or should we always be True by default and make the
>Enum creator add their own __bool__ if they want something different?

The latter.  I think in general enums are primarily a symbolic value and don't
have truthiness.  It's also so easy to override when you define the enum that
it's not worth changing the current behavior.

Cheers,
-Barry
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] 2.7.11 Windows Installer issues on Win2008R2

2016-01-15 Thread Rader, David
Problem 1:
The .manifest information for the VC runtime dll's has been changed in the
recent versions of the 2.7.x 64-bit installers for Windows. Python fails to
run on a clean Win2008R2 install after running the Python installer to
install "Just for me". The installation succeeds if "Install for all users"
is selected.

After install completes, trying to run python results in:
The application has failed to start because it's side-by-side configuration
is incorrect. Please see the application event log or use the command-line
sxstrace.exe tool for more detail.

The event viewer log shows:
Activation context generation failed for "C:\Python27\python.exe".Error in
manifest or policy file "C:\Python27\Microsoft.VC90.CRT.MANIFEST" on line
4. Component identity found in manifest does not match the identity of the
component requested. Reference is
Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
Definition is
Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30729.1".
Please use sxstrace.exe for detailed diagnosis.

This means that that VC2008 SP1 dll and manifest are included in the
installer, but the Python.exe is compiled against VC2008 (_not_ SP1).
Replacing the installed manifest and VC90 with one pulled from an older
distribution with the correct 9.0.21022.8 version enables python to run.

Problem 2:
The compiled DLLs in the DLLs folder incorrectly have the VC manifest
included in them as well. This breaks the side-by-side look up, since the
VC90 dll is not in the DLLs folder. So if you try to import socket, you get
an error message like:
Traceback (most recent call last):
  File "hub\scripts\pgc.py", line 9, in 
import socket
  File "C:\Python27\lib\socket.py", line 47, in 
import _socket
ImportError: DLL load failed: The application has failed to start because
its si
de-by-side configuration is incorrect. Please see the application event log
or u
se the command-line sxstrace.exe tool for more detail.

Previous versions of Python for windows have had this problem but it was
corrected. It looks like it has crept back in.

--
David Rader
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.7.11 Windows Installer issues on Win2008R2

2016-01-15 Thread Terry Reedy

On 1/15/2016 5:13 PM, Rader, David wrote:
[description of problems]

Please register at bugs.python.org and open a new issue for Versions 
2.7, Components: Installation, with 'benjamin.peterson' and 'loewis' on 
the Nosy List.  Copy what you wrote in the Comment: box.


--
Terry Jan Reedy

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] C struct for Str( )

2016-01-15 Thread Eddy Quicksall
I want to fill an Str() string from a C function. But I think I am using the
wrong structure (PyBytesObject). I have written a C function to dump the
Python class but as you can see the structure I'm using does not match the
data in the class. 

Can someone please tell me the correct structure:

- Python snip -
class _vendorRecord_2:
vendorListNumber= str()
vendorNumber= str()
vendorName  = str('x' * 20)

vendorRecord_2 = _vendorRecord_2()

print(len(vendorRecord_2.vendorName))
print(vendorRecord_2.vendorName + '|')
XBaseDump_PythonString(py_object(vendorRecord_2.vendorName))

- C function 
#define MS_NO_COREDLL
#undef _DEBUG
#include 
DSI_DLL void CALL_TYPE XBaseDump_PythonString( PyBytesObject *pBytesObject )
{
printf( "ob_size = %d, ob_shash = %X, ob_sval = %s\n",
pBytesObject->ob_base.ob_size, pBytesObject->ob_shash, pBytesObject->ob_sval
);
printf( "offsetof(ob_size) = %d, offsetof(ob_sval) = %d\n", offsetof(
PyBytesObject, ob_base.ob_size ),
offsetof( PyBytesObject, ob_sval ) );
printf( "sizeof(PyBytesObject) = %d\n", sizeof(PyBytesObject) );
DsmDumpBytes( pBytesObject, 32 );
}

 output 
20
|
ob_size = 20, ob_shash = 70768D53, ob_sval = σsci
offsetof(ob_size) = 8, offsetof(ob_sval) = 16
sizeof(PyBytesObject) = 20
: 03 00 00 00 60 B0 DC 1D 14 00 00 00 53 8D 76 70 -...
0016: E5 73 63 69 00 00 00 00 78 78 78 78 78 78 78 78 V...




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] C struct for Str( )

2016-01-15 Thread Brett Cannon
I don't quite see what this has to do with has to do with the development
of Python, Eddy. You can always reference the C API at
https://docs.python.org/3/c-api/index.html . And `PyBytesObject` is an
instance of `bytes` in Python.

On Fri, 15 Jan 2016 at 15:33 Eddy Quicksall  wrote:

> I want to fill an Str() string from a C function. But I think I am using
> the
> wrong structure (PyBytesObject). I have written a C function to dump the
> Python class but as you can see the structure I'm using does not match the
> data in the class.
>
> Can someone please tell me the correct structure:
>
> - Python snip -
> class _vendorRecord_2:
> vendorListNumber= str()
> vendorNumber= str()
> vendorName  = str('x' * 20)
>
> vendorRecord_2 = _vendorRecord_2()
>
> print(len(vendorRecord_2.vendorName))
> print(vendorRecord_2.vendorName + '|')
> XBaseDump_PythonString(py_object(vendorRecord_2.vendorName))
>
> - C function 
> #define MS_NO_COREDLL
> #undef _DEBUG
> #include 
> DSI_DLL void CALL_TYPE XBaseDump_PythonString( PyBytesObject *pBytesObject
> )
> {
> printf( "ob_size = %d, ob_shash = %X, ob_sval = %s\n",
> pBytesObject->ob_base.ob_size, pBytesObject->ob_shash,
> pBytesObject->ob_sval
> );
> printf( "offsetof(ob_size) = %d, offsetof(ob_sval) = %d\n", offsetof(
> PyBytesObject, ob_base.ob_size ),
> offsetof( PyBytesObject, ob_sval ) );
> printf( "sizeof(PyBytesObject) = %d\n", sizeof(PyBytesObject) );
> DsmDumpBytes( pBytesObject, 32 );
> }
>
>  output 
> 20
> |
> ob_size = 20, ob_shash = 70768D53, ob_sval = σsci
> offsetof(ob_size) = 8, offsetof(ob_sval) = 16
> sizeof(PyBytesObject) = 20
> : 03 00 00 00 60 B0 DC 1D 14 00 00 00 53 8D 76 70 -...
> 0016: E5 73 63 69 00 00 00 00 78 78 78 78 78 78 78 78 V...
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/brett%40python.org
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] C struct for Str( )

2016-01-15 Thread Eddy Quicksall
Sorry, I must be on the wrong list. Can you please give me the correct list?



Eddy



From: Brett Cannon [mailto:br...@python.org]
Sent: Friday, January 15, 2016 6:58 PM
To: Eddy Quicksall; python-dev@python.org
Subject: Re: [Python-Dev] C struct for Str( )



I don't quite see what this has to do with has to do with the development of 
Python, Eddy. You can always reference the C API at 
https://docs.python.org/3/c-api/index.html . And `PyBytesObject` is an instance 
of `bytes` in Python.



On Fri, 15 Jan 2016 at 15:33 Eddy Quicksall  wrote:

I want to fill an Str() string from a C function. But I think I am using the
wrong structure (PyBytesObject). I have written a C function to dump the
Python class but as you can see the structure I'm using does not match the
data in the class.

Can someone please tell me the correct structure:

- Python snip -
class _vendorRecord_2:
vendorListNumber= str()
vendorNumber= str()
vendorName  = str('x' * 20)

vendorRecord_2 = _vendorRecord_2()

print(len(vendorRecord_2.vendorName))
print(vendorRecord_2.vendorName + '|')
XBaseDump_PythonString(py_object(vendorRecord_2.vendorName))

- C function 
#define MS_NO_COREDLL
#undef _DEBUG
#include 
DSI_DLL void CALL_TYPE XBaseDump_PythonString( PyBytesObject *pBytesObject )
{
printf( "ob_size = %d, ob_shash = %X, ob_sval = %s\n",
pBytesObject->ob_base.ob_size, pBytesObject->ob_shash, pBytesObject->ob_sval
);
printf( "offsetof(ob_size) = %d, offsetof(ob_sval) = %d\n", offsetof(
PyBytesObject, ob_base.ob_size ),
offsetof( PyBytesObject, ob_sval ) );
printf( "sizeof(PyBytesObject) = %d\n", sizeof(PyBytesObject) );
DsmDumpBytes( pBytesObject, 32 );
}

 output 
20
|
ob_size = 20, ob_shash = 70768D53, ob_sval = σsci
offsetof(ob_size) = 8, offsetof(ob_sval) = 16
sizeof(PyBytesObject) = 20
: 03 00 00 00 60 B0 DC 1D 14 00 00 00 53 8D 76 70 -...
0016: E5 73 63 69 00 00 00 00 78 78 78 78 78 78 78 78 V...




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/brett%40python.org



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] C struct for Str( )

2016-01-15 Thread Victor Pantoja
Hi Eddy

You can try some of the lists in https://mail.python.org/mailman/listinfo.

Best,
victor

2016-01-15 22:23 GMT-02:00 Eddy Quicksall :

> Sorry, I must be on the wrong list. Can you please give me the correct
> list?
>
>
>
> Eddy
>
>
>
> *From:* Brett Cannon [mailto:br...@python.org]
> *Sent:* Friday, January 15, 2016 6:58 PM
> *To:* Eddy Quicksall; python-dev@python.org
> *Subject:* Re: [Python-Dev] C struct for Str( )
>
>
>
> I don't quite see what this has to do with has to do with the development
> of Python, Eddy. You can always reference the C API at
> https://docs.python.org/3/c-api/index.html . And `PyBytesObject` is an
> instance of `bytes` in Python.
>
>
>
> On Fri, 15 Jan 2016 at 15:33 Eddy Quicksall  wrote:
>
> I want to fill an Str() string from a C function. But I think I am using
> the
> wrong structure (PyBytesObject). I have written a C function to dump the
> Python class but as you can see the structure I'm using does not match the
> data in the class.
>
> Can someone please tell me the correct structure:
>
> - Python snip -
> class _vendorRecord_2:
> vendorListNumber= str()
> vendorNumber= str()
> vendorName  = str('x' * 20)
>
> vendorRecord_2 = _vendorRecord_2()
>
> print(len(vendorRecord_2.vendorName))
> print(vendorRecord_2.vendorName + '|')
> XBaseDump_PythonString(py_object(vendorRecord_2.vendorName))
>
> - C function 
> #define MS_NO_COREDLL
> #undef _DEBUG
> #include 
> DSI_DLL void CALL_TYPE XBaseDump_PythonString( PyBytesObject *pBytesObject
> )
> {
> printf( "ob_size = %d, ob_shash = %X, ob_sval = %s\n",
> pBytesObject->ob_base.ob_size, pBytesObject->ob_shash,
> pBytesObject->ob_sval
> );
> printf( "offsetof(ob_size) = %d, offsetof(ob_sval) = %d\n", offsetof(
> PyBytesObject, ob_base.ob_size ),
> offsetof( PyBytesObject, ob_sval ) );
> printf( "sizeof(PyBytesObject) = %d\n", sizeof(PyBytesObject) );
> DsmDumpBytes( pBytesObject, 32 );
> }
>
>  output 
> 20
> |
> ob_size = 20, ob_shash = 70768D53, ob_sval = σsci
> offsetof(ob_size) = 8, offsetof(ob_sval) = 16
> sizeof(PyBytesObject) = 20
> : 03 00 00 00 60 B0 DC 1D 14 00 00 00 53 8D 76 70 -...
> 0016: E5 73 63 69 00 00 00 00 78 78 78 78 78 78 78 78 V...
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/brett%40python.org
>
>
> 
>  This
> email has been sent from a virus-free computer protected by Avast.
> www.avast.com
> 
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/victor.pantoja%40gmail.com
>
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com