[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller

New submission from Thomas Heller:

The documentation states that 'from module import *' imports all symbols that 
are listed in the module's __all__ list.
In Python 3, unlike Python 2, only symbols that do NOT start with an underscore 
are actually imported.

The following code works in Python 2.7, but raises a NameError
in Python 3.5:
python -c "from ctypes.wintypes import *; print(_ULARGE_INTEGER)"

--
components: Interpreter Core
messages: 283721
nosy: theller
priority: normal
severity: normal
status: open
title: 'from module import *' and __all__
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28838] Using consistent naming for arguments of "call" functions (C API)

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since no one on Python-Dev has objections, I'm fine with this too. I was 
opposed not so much to the changes themselves, as to making large changes to 
one of basic files that could affect everybody without wider discussion. Excuse 
me if I looked unfriendly.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Also, I created a reg file with the commands in a txt file and when I merged 
it, it was able to show the "Edit with IDLE" but it would do nothing. IDLE 
isn't there. Very perplexing.

--

___
Python tracker 

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



[issue29032] How does the __self__ attribute of method become a class rather a instance?

2016-12-21 Thread woo yoo

New submission from woo yoo:

The documentation of instance methods confused me, it classifies methods into 
two types:the one is retrieved by an instance of a class, the other is created 
by retrieving a method from a class or instance.

According to the description,

>When an instance method object is created by retrieving a class method >object 
>from a class or instance, its __self__ attribute is the class >itself, and its 
>__func__ attribute is the function object underlying the >class method.

the  __self__ attribute of the more complex methods is a class. How does this 
happen? Is this description incorrect?

--
assignee: docs@python
components: Documentation
messages: 283724
nosy: docs@python, woo yoo
priority: normal
severity: normal
status: open
title: How does the __self__ attribute of method become a class rather a 
instance?
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue29032] How does the __self__ attribute of method become a class rather a instance?

2016-12-21 Thread woo yoo

woo yoo added the comment:

The quotation section :

When an instance method object is created by retrieving a class method object 
from a class or instance, its __self__ attribute is the class itself, and its 
__func__ attribute is the function object underlying the class method.

The associated link is 
https://docs.python.org/3.6/reference/datamodel.html#the-standard-type-hierarchy
 ,which lies in the 'instance mthods' section.

--

___
Python tracker 

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



[issue29033] Windows Python installer rolls back when run under SYSTEM account (SCCM)

2016-12-21 Thread Mr B Jones

New submission from Mr B Jones:

Hi,
When I try to use the Python 3.5 and later installer for windows to make an 
automated unattended install via SCCM, it seems to work, but some time later it 
rolls back leaving only a few files installed (seems to be pip.exe and friends).

I have attached all the Python installer logs from a test machine from the temp 
folder used by the SYSTEM account (%SystemRoot%\Temp).

Manually installing from an account which is a member of the Administrators 
group works fine (not for 800+ machines though).
Thanks,
Bryn

--
components: Installation, Windows
files: python352logs.zip
messages: 283726
nosy: Mr B Jones, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows Python installer rolls back when run under SYSTEM account (SCCM)
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file45980/python352logs.zip

___
Python tracker 

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



[issue29032] How does the __self__ attribute of method become a class rather a instance?

2016-12-21 Thread woo yoo

woo yoo added the comment:

Not a bug,sorry to bother

--
status: open -> closed

___
Python tracker 

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



[issue29032] How does the __self__ attribute of method become a class rather a instance?

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The description looks correct to me. Note that it says about class methods.

>>> class A:
... @classmethod
... def f(cls): pass
... 
>>> a = A()
>>> A.f
>
>>> A.f.__self__

>>> a.f
>
>>> a.f.__self__


--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved

___
Python tracker 

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



[issue29032] How does the __self__ attribute of method become a class rather a instance?

2016-12-21 Thread woo yoo

woo yoo added the comment:

Thanks for your reply.

--

___
Python tracker 

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



[issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Addressed comments, added the versionchanged directives, the code in _decimal.c 
is now more obvious.

--
Added file: http://bugs.python.org/file45981/PyUnicode_AsUTF8-const-2.patch

___
Python tracker 

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



[issue28838] Using consistent naming for arguments of "call" functions (C API)

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka added the comment:
> Since no one on Python-Dev has objections, I'm fine with this too. I was 
> opposed not so much to the changes themselves, as to making large changes to 
> one of basic files that could affect everybody without wider discussion. 
> Excuse me if I looked unfriendly.

No problem. Well, it's just reformating. It doesn't change the API for
example. It should only impact people maintaining large external
patches on Python 3.6. I'm not aware of any pending patch modifying
abstract.h. And as I wrote, if there is such patch, contact me, I will
help to rebase your change.

--

___
Python tracker 

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



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

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Previous related work:

changeset:   89836:bc06f67234d0
user:Victor Stinner 
date:Tue Mar 18 01:18:21 2014 +0100
files:   Doc/whatsnew/3.5.rst Lib/test/test_sys.py Misc/NEWS Python/pythonru
description:
Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
:py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
``surrogateescape`` error handler, instead of the ``strict`` error handler.

--

___
Python tracker 

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



[issue28988] Switch dict and set structures to PyVarObject

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Raymond Hettinger:
> Please leave the set object patch for me.  I would like to do it a bit 
> differently.

Differently? How?

--

___
Python tracker 

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



[issue29031] 'from module import *' and __all__

2016-12-21 Thread Martin Panter

Martin Panter added the comment:

Python 3 doesn’t have an __all__ list; it was removed in r85073 (Issue 3612).

I don’t understand why it was removed. Maybe Hirokazu didn’t understand what it 
does. Since this is a regression, perhaps it should be added back.

--
components: +Library (Lib) -Interpreter Core
nosy: +martin.panter
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue28988] Switch dict and set structures to PyVarObject

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since I don't see a benefit from this change I leave both patches to you 
Raymond.

--

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue29034] refleak in path_converter on error case

2016-12-21 Thread Xiang Zhang

New submission from Xiang Zhang:

It looks like the bytes variable should be Py_DECREFed on error cases as the 
patch shows.

--
components: Library (Lib)
files: path_converter.patch
keywords: patch
messages: 283736
nosy: haypo, steve.dower, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: refleak in path_converter on error case
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45982/path_converter.patch

___
Python tracker 

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



[issue29034] refleak in path_converter on error case

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Oh crap, memory leaks on Windows are rarely checked. I recall that I found a 
huge memory leak on Windows just before Python 3.6 beta 1 release:

changeset:   103956:6232e610e310
branch:  3.6
parent:  103954:c1d9052996f1
user:Victor Stinner 
date:Mon Sep 19 11:55:44 2016 +0200
files:   Misc/NEWS Modules/posixmodule.c
description:
Fix memory leak in path_converter()

Issue #28200: Replace PyUnicode_AsWideCharString() with
PyUnicode_AsUnicodeAndSize().

--

___
Python tracker 

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



[issue29034] refleak in path_converter on error case

2016-12-21 Thread Xiang Zhang

Xiang Zhang added the comment:

Ohh, I haven't read all related code so I didn't realize that's a leak. But if 
that is, there is still a wide = PyUnicode_AsWideCharString around the codes I 
altered.

--

___
Python tracker 

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



[issue28871] Destructor of ElementTree.Element is recursive

2016-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue28871] Destructor of ElementTree.Element is recursive

2016-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 957091874ea0 by Serhiy Storchaka in branch '3.5':
Issue #28871: Fixed a crash when deallocate deep ElementTree.
https://hg.python.org/cpython/rev/957091874ea0

New changeset 78bf34b6a713 by Serhiy Storchaka in branch '2.7':
Issue #28871: Fixed a crash when deallocate deep ElementTree.
https://hg.python.org/cpython/rev/78bf34b6a713

--
nosy: +python-dev

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 44c62456de75 by Serhiy Storchaka in branch 'default':
Issue #28992: Use bytes.fromhex().
https://hg.python.org/cpython/rev/44c62456de75

--
nosy: +python-dev

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-21 Thread Manish Singh

Manish Singh added the comment:

Hi David,

How can i port it to main python-dev list.

Need to mail on it or some other group is there so that we can send the message 
to it.

--

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Xiang Zhang

Xiang Zhang added the comment:

v2 applies the comments. And another separate change is to change 
PyUnicode_AsWideCharString to PyUnicode_AsUnicodeAndSize.

--
title: refleak in path_converter on error case -> Fix memory leak in 
path_converter
Added file: http://bugs.python.org/file45983/path_converter-v2.patch

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You could just reuse to_cleanup instead of to_cleanup2.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2016-12-21 Thread Jakub Mateusz Kowalski

Jakub Mateusz Kowalski added the comment:

Python 2.7
I think note to the docs is enough.

Python 3.5+
I have a doubt. Isn't .seed(a, version=1) still coupled with PYTHONHASHSEED? 
The manual says version 1 is "reproducing random sequences from older versions 
of Python", and for 3.1 (and earlier) hash() is used, which (according to the 
manual) depends on PYTHONHASHSEED. Also, in Python 3.2-3.4 it is stated 
explicitly, that hash() is used.

--

___
Python tracker 

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



[issue28538] _socket module cross-compilation error on android-24

2016-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e248bfb0f520 by Xavier de Gaye in branch '3.6':
Issue #28538: Fix the compilation error that occurs because if_nameindex() is
https://hg.python.org/cpython/rev/e248bfb0f520

New changeset 55bf0b79ec55 by Xavier de Gaye in branch 'default':
Issue #28538: Merge 3.6.
https://hg.python.org/cpython/rev/55bf0b79ec55

--
nosy: +python-dev

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

> You could just reuse to_cleanup instead of to_cleanup2.

Ah, it would be better to avoid a new variable, but this code is too complex 
for my head. I don't understand what is to_cleanup in this code path :-)

--

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Unhappy buildbot:

buildbot.python.org/all/builders/AMD64 Debian root 
3.x/builds/103/steps/test/logs/stdio

Example:


==
ERROR: test_complex_address_list 
(test.test_email.test_headerregistry.TestAddressHeader)
--
Traceback (most recent call last):
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_email/test_headerregistry.py",
 line 1243, in test_complex_address_list
h = self.make_header('to', source)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_email/test_headerregistry.py",
 line 78, in make_header
return self.factory(name, value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/headerregistry.py", 
line 586, in __call__
return self[name](name, value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/headerregistry.py", 
line 197, in __new__
cls.parse(value, kwds)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/headerregistry.py", 
line 337, in parse
kwds['parse_tree'] = address_list = cls.value_parser(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/headerregistry.py", 
line 328, in value_parser
address_list, value = parser.get_address_list(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 2336, in get_address_list
token, value = get_address(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 2313, in get_address
token, value = get_group(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 2269, in get_group
token, value = get_display_name(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 2095, in get_display_name
token, value = get_phrase(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 1770, in get_phrase
token, value = get_word(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 1751, in get_word
token, value = get_atom(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 1668, in get_atom
token, value = get_encoded_word(value)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_header_value_parser.py",
 line 1444, in get_encoded_word
text, charset, lang, defects = _ew.decode('=?' + tok + '?=')
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_encoded_words.py", 
line 166, in decode
bstring, defects = _cte_decoders[cte](bstring)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_encoded_words.py", 
line 69, in decode_q
return _q_byte_subber(encoded), []
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/email/_encoded_words.py", 
line 65, in 
lambda m: bytes.fromhex(m.group(1)))
TypeError: fromhex() argument must be str, not bytes

--
nosy: +haypo
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue29031] 'from module import *' and __all__

2016-12-21 Thread eryk sun

eryk sun added the comment:

Python 3 does not skip names in __all__ that start with an underscore. 

wintypes in 2.x uses `from ctypes import *`, so it needs to define __all__. In 
3.x it uses `import ctypes`, so it doesn't define __all__, and the private 
names _COORD, _FILETIME, _LARGE_INTEGER, _POINTL, _RECTL, _SMALL_RECT, and 
_ULARGE_INTEGER are skipped by a star import. That said, why are these private 
names (and also "tag" names) defined? And why isn't COORD defined instead of or 
in addition to _COORD?

--
nosy: +eryk sun

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6ced540a92bc by Serhiy Storchaka in branch 'default':
Fixed a type error introduced in issue #28992.
https://hg.python.org/cpython/rev/6ced540a92bc

--

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh how could I make such error?! Thanks Victor.

--

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy: "Oh how could I make such error?! Thanks Victor.

It's simple: shit happens :-) Don't worry.

--

___
Python tracker 

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



[issue28762] configure links with lockf and F_LOCK is not declared in Android API 24

2016-12-21 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

FYI: Since Android NDK r14 beta1, F_LOCK is defined in unified headers. [1] In 
$ANDROID_NDK/sysroot/usr/include/bits/lockf.h:

#define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
#define F_TEST 3

[1] 
https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md

--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-21 Thread R. David Murray

R. David Murray added the comment:

The python-list mailing list subscription info can be found on the 
mail.python.org web page.  It is also gatewayed to a usenet news group.

--

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Xiang Zhang

Xiang Zhang added the comment:

Hmm, while considering Victor's comment, I find some new:

path->object refers to the original object o, it owns a borrowed reference. But 
when received a PathLike object, o is assigned the return value of __fspath__ 
and decrefed at end. So path->object could refer to a already freed object.

And the PyUnicode_AsWideCharString can't be simply replaced with 
PyUnicode_AsUnicodeAndSize since wo is decrefed and object->wide could then 
refer to freed memory.

The logic is complex and I get headache reading the code. Did I miss something?

--

___
Python tracker 

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



[issue29035] regrtest: simplify regex to match test names for the --fromfile option

2016-12-21 Thread STINNER Victor

New submission from STINNER Victor:

Lib/test/libregrtest/main.py uses a complex regex to find "test_builtin" in 
lines like '0:00:00 [  4/400] test_builtin -- test_dict took 1 sec'. Recently, 
I changed (change d8222c197831) the regex to support a filename containing a 
list of filenames. Example:

haypo@selma$ ls Lib/test/test_*xml*py >| list

haypo@selma$ cat list 
Lib/test/test_docxmlrpc.py
Lib/test/test_xml_dom_minicompat.py
Lib/test/test_xml_etree_c.py
Lib/test/test_xml_etree.py
Lib/test/test_xmlrpc_net.py
Lib/test/test_xmlrpc.py

haypo@selma$ ./python -m test --fromfile=list --list
test_docxmlrpc
test_xml_dom_minicompat
test_xml_etree_c
test_xml_etree
test_xmlrpc_net
test_xmlrpc

Serhiy sent me a private message to suggest to simply the regex. So here is a 
patch.

--
components: Tests
files: regrtest_regex.patch
keywords: patch
messages: 283755
nosy: haypo, inada.naoki, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
status: open
title: regrtest: simplify regex to match test names for the --fromfile option
versions: Python 3.7
Added file: http://bugs.python.org/file45984/regrtest_regex.patch

___
Python tracker 

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



[issue29035] regrtest: simplify regex to match test names for the --fromfile option

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

FYI initially my idea was to use a very strict to avoid false positives. But 
when I used the feature, I found that the regex is more annoying than helping 
(ex: I had to modify the regex to accept filenames with directories). So I now 
prefer to use a very simple regex matching "test_xxx" anywhere, to have 
something simple and convenient.

--

___
Python tracker 

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



[issue28762] configure links with lockf and F_LOCK is not declared in Android API 24

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

> The patch fixes the following error:

Do you mean that the patch adds posix.F_LOCK constant on Android?

--
nosy: +haypo

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

> The logic is complex ...

Yeah, that's why I first proposed to add a dummy to_cleanup2 object.

Another option is to use your first patch.

I don't care much about the exact implementation :-) Maybe Serhiy has
a better understanding of the code and can help to decide on this
issue ;-)

--

___
Python tracker 

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



[issue28762] configure links with lockf and F_LOCK is not declared in Android API 24

2016-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

No, the patch prevents posix.flock() to be defined on Android API 24 with 
android-ndk-r13. But I plan to change it so that the test is skipped when posix 
does not have the F_LOCK attribute as this problem is not worth a change in the 
build machinery. It makes even more sense now that android-ndk-r14 will be 
released with "Unified Headers". BTW thanks Chi Hsuan Yen for this important 
information.

--

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file45986/path_converter-bytes.patch

___
Python tracker 

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



[issue29034] Fix memory leak in path_converter

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are many ways to write a solution of the original issue. You can just add 
a number of "Py_DECREF(bytes)" (path_converter.patch), or add new variable 
to_cleanup2 (path_converter-v2.patch), or reuse to_cleanup 
(path_converter-to_cleanup.patch), or clean ups bytes 
(path_converter-bytes.patch). All these ways look equivalent.

The issue mentioned in msg283754 is more severe. It can be solved by making 
path->object referring an original argument (but some code checks the type of 
path->object), or making path->object owning a reference.

It seems to me that path->narrow can be not initialized for str path on Windows.

--
nosy: +brett.cannon
Added file: http://bugs.python.org/file45985/path_converter-to_cleanup.patch

___
Python tracker 

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



[issue29035] regrtest: simplify regex to match test names for the --fromfile option

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Reading file names from a file looks misleading.

$ ls Lib/ctypes/test/*.py > list
$ head list
Lib/ctypes/test/__init__.py
Lib/ctypes/test/__main__.py
Lib/ctypes/test/test_anon.py
Lib/ctypes/test/test_array_in_pointer.py
Lib/ctypes/test/test_arrays.py
Lib/ctypes/test/test_as_parameter.py
Lib/ctypes/test/test_bitfields.py
Lib/ctypes/test/test_buffers.py
Lib/ctypes/test/test_bytes.py
Lib/ctypes/test/test_byteswap.py
$ ./python -m test --fromfile=list 
Run tests sequentially
0:00:00 [ 1/51] test_anon
test test_anon crashed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 152, in 
runtest_inner
the_module = importlib.import_module(abstest)
  File "/home/serhiy/py/cpython/Lib/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 978, in _gcd_import
  File "", line 961, in _find_and_load
  File "", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'test.test_anon'
...

I wouldn't add this feature unless support full file names.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Steve Dower

Steve Dower added the comment:

But you definitely have idle installed, right? The commands earlier made an 
assumption about your installation that could be wrong, so that would explain 
it.

I'm still not entirely clear whether you've done these steps yet:

1. Right-click a .py file and select Open With
1a. If this gives you a deeper menu, select Another App
2. Find the Python launcher in the window that appears and select it.
3. Select Always Open with this app check box
4. Click Open/ok/whatever button is on there

That should reset your personal customization back to the original shortcut.

--

___
Python tracker 

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



[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller

Thomas Heller added the comment:

Thanks Martin and eryk for correcting me and finding the real cause of
the problem.

Am 21.12.2016 um 13:04 schrieb eryk sun:
> ...  the private names _COORD, _FILETIME, _LARGE_INTEGER,
> _POINTL, _RECTL, _SMALL_RECT, and _ULARGE_INTEGER are skipped by a
> star import. That said, why are these private names (and also "tag"
> names) defined? And why isn't COORD defined instead of or in addition
> to _COORD?

These 'private' names and "tag" names were defined for compatibility
with the windows SDK C header files.  I didn't want to apply
the Python 'private' convention to the C names, so they were added to
the __all__ list.
It was an oversight that COORD wasn't defined, I developed a different
solution for the windows SDK names afterwards, but my code (which I'm
porting to Python 3) still uses 'from ctypes.wintypes import *'
and stumbled over the regression just now.

--

___
Python tracker 

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



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

2016-12-21 Thread Akira Li

Changes by Akira Li <4kir4...@gmail.com>:


--
nosy: +akira

___
Python tracker 

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



[issue29036] logging module: Add `full_module_name` to LogRecord details

2016-12-21 Thread Ram Rachum

New submission from Ram Rachum:

LogRecord currently supplies `module` that you can show in your messages, but 
it's just the name of the module without the path. It'll be nice to have 
`full_module_name` that has the qualified name (e.g. foo.bar.baz instead of 
baz.)

Usually it's the logger's name, but not always.

--
components: Library (Lib)
messages: 283764
nosy: cool-RR
priority: normal
severity: normal
status: open
title: logging module: Add `full_module_name` to LogRecord details
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue28538] _socket module cross-compilation error on android-24

2016-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

These changes break the darwin platform, socket.if_nameindex() is not defined 
anymore. On Darwin, 'net/if.h' requires that 'sys/socket.h' be included 
beforehand (see the autoconf documentation).

--

___
Python tracker 

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



[issue28912] collections.abc.OrderedMapping

2016-12-21 Thread Joshua Bronson

Joshua Bronson added the comment:

For the record, it looks like Victor Stinner suggested doing this in 
https://mail.python.org/pipermail/python-dev/2016-September/146349.html

Brett Cannon replied in 
https://mail.python.org/pipermail/python-dev/2016-September/146350.html to 
suggest adding "ordered mapping" to the glossary instead. I took a quick look 
at https://docs.python.org/3.6/glossary.html and don't see it there.

--
nosy: +brett.cannon, haypo

___
Python tracker 

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



[issue28762] configure links with lockf and F_LOCK is not declared in Android API 24

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Oh ok, the issue is more subtle than what I understood.

I reviewed test_posix_flock.patch and proposed some changes to the comment/doc.

--

___
Python tracker 

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



[issue28538] _socket module cross-compilation error on android-24

2016-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f34dac552ad8 by Xavier de Gaye in branch '3.6':
Issue #28538: On Darwin net/if.h requires that sys/socket.h be included 
beforehand.
https://hg.python.org/cpython/rev/f34dac552ad8

New changeset c568b6ac5e89 by Xavier de Gaye in branch 'default':
Issue #28538: Merge 3.6.
https://hg.python.org/cpython/rev/c568b6ac5e89

--

___
Python tracker 

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



[issue29035] regrtest: simplify regex to match test names for the --fromfile option

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

Ah right, "Lib/ctypes/test/test_anon.py" doesn't work. I don't think
that it's worth to support running directly such test. I don't think
that it's worth it to modify the regex to exclude this case.

--fromfile is written for developers who understand what they do, it's
just an helper. It doesn't prevent any kind of mistakes.

But please keep support for simple lists like "ls
Lib/test/test_*xml*py >| list", it's useful for me.

--

___
Python tracker 

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



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

2016-12-21 Thread Steve Dower

Steve Dower added the comment:

Guess I should at least pose the question - Ned, would you consider the change 
in my patch for 3.6.0? Only the one file is affected, and it only contributes 
to one DLL that is (a) recommended, (b) not widely used and (c) very 
incompatible with the included headers.

--
nosy: +ned.deily

___
Python tracker 

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



[issue16058] ConfigParser no longer deepcopy compatible in 2.7

2016-12-21 Thread Łukasz Langa

Łukasz Langa added the comment:

Solved in 3.2+ by making it compatible with the Mapping protocol. So while you 
can't do deepcopy(), you can `parser2.read_dict(parser1)`.

--
dependencies:  -Regex objects became uncopyable in 2.5
resolution:  -> fixed

___
Python tracker 

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



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

2016-12-21 Thread A.B., Khalid

New submission from A.B., Khalid:

I updated my Python 2.7.12 to 2.7.13 on Windows 10 x64. When I run it in 
Windows command prompt shell, Python prints the version header and then exits 
immediately. Like so:

"""
E:\Users\thisuser>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

E:\Users\thisuser>
"""

This did not happen before.

The same happens when Python is run from a powershell. I have no problems 
running ipython or jupyter notebook, however. And Python does the right thing 
when run under MSYS2, like so:

"""
$ python -i
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
"""

Could this be an encoding problem? Because MSYS2 is fairly new and I think it 
might be more friendly to the encoding issues related to Windows shell 
programming.

--
components: Windows
messages: 283773
nosy: abkhd, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python 2.7.13 prints version header and exits immediately on Windows 10 
x64
versions: Python 2.7

___
Python tracker 

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



[issue29035] regrtest: simplify regex to match test names for the --fromfile option

2016-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> --fromfile is written for developers who understand what they do, it's
> just an helper.

I don't understand the use case of it ;) , but when you need it, the patch LGTM.

You can call just .group() instead of .group(0).

--

___
Python tracker 

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



[issue28992] Use bytes.fromhex()

2016-12-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue29038] Duplicate entry for SSLContext.get_ca_certs() in ssl

2016-12-21 Thread Daniel Bolgheroni

New submission from Daniel Bolgheroni:

There is a duplicate entry for SSLContext.get_ca_certs() in ssl section 17.3.3. 
They are not equal, and the one that appears first has a more detailed 
description.

--
assignee: docs@python
components: Documentation
messages: 283775
nosy: dbolgheroni, docs@python
priority: normal
severity: normal
status: open
title: Duplicate entry for SSLContext.get_ca_certs() in ssl
versions: Python 2.7

___
Python tracker 

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



[issue24672] shutil.rmtree fails on non ascii filenames

2016-12-21 Thread Jason R. Coombs

Jason R. Coombs added the comment:

In https://github.com/pypa/setuptools/issues/706, I've addressed this 
additional concern.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue28538] _socket module cross-compilation error on android-24

2016-12-21 Thread Xavier de Gaye

Changes by Xavier de Gaye :


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



[issue29039] Segmentation fault when using PyUnicode_FromString

2016-12-21 Thread Matteo Cafasso

New submission from Matteo Cafasso:

The following code snippet:

--
#include 
#include 

int main()
{
char *broken_string[8];
char broken_char = 4294967252;

sprintf(broken_string, "%c", broken_char);

PyUnicode_FromString(broken_string);
}
--

Produces a Segmentation Fault.

Is this behaviour the expected one? 

The real life example comes when reading a malformed path on a Ext4 filesystem. 
The read string causes PyUnicode_FromString to segfault.

--
components: Extension Modules
messages: 283777
nosy: noxdafox
priority: normal
severity: normal
status: open
title: Segmentation fault when using PyUnicode_FromString
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



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

2016-12-21 Thread Sworddragon

Changes by Sworddragon :


--
nosy: +Sworddragon

___
Python tracker 

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



[issue29040] building Android with android-ndk-r14

2016-12-21 Thread Xavier de Gaye

New submission from Xavier de Gaye:

android-ndk-r14 introduces "Unified Headers" [1] and is planned to be released 
late january/early february 2017 [2].

__ANDROID_API__ is not anymore defined in 'android/api-level.h' that is 
currently included by Include/pyport.h, and is passed instead with 
-D__ANDROID_API__=$API when compiling. And 'android/api-level.h' is now used to 
set the API level to 1 as a Magic version number for a current development 
build when __ANDROID_API__ is not defined (see attached file).

Adoption of android-ndk-r14 should be made with the following changes:
* Remove the include of  in Include/pyport.h.
* Update configure.ac to abort when __ANDROID__ is defined and __ANDROID_API__ 
is not defined.
* Revert the changes made in issues #28538 and #28762, android-ndk-r14 fixes 
the problems raised in these two issues.

[1] 
https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md
[2] https://github.com/android-ndk/ndk/wiki

--
components: Cross-Build
files: api-level.h
messages: 283778
nosy: Alex.Willmer, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: building Android with android-ndk-r14
type: compile error
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45987/api-level.h

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Yes, I have IDLE installed, and Launcher is installed as well. I can open up 
IDLE from the shortcut, however I am not able to access it within "Open With" 
or "Default Programs" or "Change" (within Properties). I _can_ open up the file 
only if I open up IDLE first then click "File" and then "Open" of the .py file 
in question. But the process of doing that compared to just double-clicking the 
IDLE-associated .py file is enormous and a workaround I'm trying to avoid. 

I've done steps 1-4 on a clean installation however there is one thing missing: 
the Python Launcher. It does not appear in the list of programs to choose. I 
tried everything up to and including idle.bat. But I'm not going to use 
idle.bat, that is a workaround I'm also trying to avoid. I just want a correct 
installation. I think it has something to do with my OS preventing the Python 
Installer from tinkering with the "Open With" options. 

The original shortcut for a clean installation for me is the python run command 
in the command-prompt. I need to able to see the code in IDLE when I double 
click on a .py file. 

Thank you for your help.

--

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2016-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

issue #29040: building Android with android-ndk-r14

--
dependencies: +building Android with android-ndk-r14

___
Python tracker 

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



[issue28762] configure links with lockf and F_LOCK is not declared in Android API 24

2016-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Thanks for the review Victor.

I have created issue 29040: building Android with android-ndk-r14.

--

___
Python tracker 

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



[issue28695] Add SSL_CTX_set_client_cert_engine

2016-12-21 Thread Gennady Kovalev

Gennady Kovalev added the comment:

Why not to call OPENSSL_config() to use openssl.cnf?

--- ./Modules/_ssl.c.orig   2016-12-21 23:30:36.277184891 +0300
+++ ./Modules/_ssl.c2016-12-21 23:35:18.488508435 +0300
@@ -4514,6 +4514,8 @@
 PySocketModule = *socket_api;
 
 /* Init OpenSSL */
+OPENSSL_config(NULL);
+
 SSL_load_error_strings();
 SSL_library_init();
 #ifdef WITH_THREAD

(Patch for example, for 3.5.2 source, not try to compile)

--
nosy: +gik

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread eryk sun

eryk sun added the comment:

There are many possible points of failure, so I'd like to get a clearer picture 
of your system configuration. Please download and run the attached batch file 
"dump_py_config.bat" and upload the "py_config.txt" file that it creates.

--
Added file: http://bugs.python.org/file45988/dump_py_config.bat

___
Python tracker 

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



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

2016-12-21 Thread Ned Deily

Ned Deily added the comment:

I don't know enough about how python3.dll is used in the Windows world to ask 
the right questions.  One obvious one: would this change likely affect any 
third-party binaries already built for 3.6.0?  On the other hand, if we have to 
have one, it would be better to have a compatibility break at 3.6.0 rather than 
at 3.6.1.  I really don't want to take any more changes at this point for 3.6.0 
but if you are convinced it is the right thing to do and won't break anything, 
get it in for 3.6.1 now and I'll reluctantly cherrypick it for 3.6.0.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread eryk sun

Changes by eryk sun :


Removed file: http://bugs.python.org/file45988/dump_py_config.bat

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Eryk Sun

Changes by Eryk Sun :


Added file: http://bugs.python.org/file45989/dump_py_config.bat

___
Python tracker 

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



[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2016-12-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

New patch.
Please use autoreconf before running the patch (autoreconf instead of autoconf 
because the description of HAVE_LOCKF has been updated).

--
title: configure links with lockf and F_LOCK is not declared in Android API 24 
-> lockf() is available now on Android API level 24, but the F_LOCK macro is 
not defined
Added file: http://bugs.python.org/file45990/test_posix_lockf_2.patch

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Thank you for your help. Attached is the py_config.txt that your .bat file gave 
me.

--
Added file: http://bugs.python.org/file45991/py_config.txt

___
Python tracker 

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



[issue29039] Segmentation fault when using PyUnicode_FromString

2016-12-21 Thread Christoph Reiter

Christoph Reiter added the comment:

You're missing a call to Py_Initialize() [0]

[0] https://docs.python.org/3/c-api/init.html#c.Py_Initialize

--
nosy: +lazka

___
Python tracker 

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



[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2016-12-21 Thread STINNER Victor

STINNER Victor added the comment:

The new patch now looks good to me.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Steve Dower

Steve Dower added the comment:

It looks like PyCharm has taken over your shortcut:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\UserChoice
HashREG_SZ55jxudRhknE=
ProgIdREG_SZPyCharm2016.3

If you delete the entire "FileExts\.py" key with registry editor then it should 
reset back to either our launcher, or give you the ability to choose.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Couple things: I installed PyCharm after all other options where exhausted. I 
needed to do some work on multiple projects. 

And also, I deleted .py key and it still doesn't show up. I tried associating 
it with idle.pyw and that didn't work either: Windows said it can't run that on 
my PC.

--

___
Python tracker 

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



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

2016-12-21 Thread Steve Dower

Steve Dower added the comment:

> would this change likely affect any third-party binaries already built for 
> 3.6.0?  On the other hand, if we have to have one, it would be better to have 
> a compatibility break at 3.6.0 rather than at 3.6.1.

Assuming we only make additive changes, then nothing that currently exists will 
break. However, extensions may then be built using 3.6.1 that will fail on 
earlier versions. This goes against the entire purpose of the limited API - 
making the change for 3.6.0 at least means they will work for the entire 3.6 
series.

This is one of those "all options are bad" scenarios. Making the change today 
will prevent us from fixing the functions that should not have leaked into the 
limited API, but then again they've already leaked and people can compile 
against them.

Perhaps the best approach is to revise all functions in the limited API, 
restrict back to those that were in 3.3 and carefully add new ones from there. 
Then we just apologise for 3.5.[0-2] and 3.6.0 potentially producing invalid 
binaries and recommend getting a newer version to build with.

I've convinced myself that 3.6.0 is too soon to make the right fix here, so 
it'll probably always be a bad version in this respect. Hopefully by 3.6.1 we 
can fix up the limited API and make it reliable again :(

--

___
Python tracker 

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



[issue29041] Reference leaks on Windows

2016-12-21 Thread Zachary Ware

New submission from Zachary Ware:

Discussion in #29034 inspired me to run a refleak check on Windows, with the 
following results from a 32-bit build of the current 3.6 branch:

C:\cpython\3.6>PCbuild\build.bat -e -d
C:\cpython\3.6>python -m test -uall -R 3:3:refleak_log.txt --timeout=7200

...

24 tests failed:
test_atexit test_capi test_concurrent_futures test_fileio
test_functools test_glob test_idle test_io test_math
test_multiprocessing_spawn test_ntpath test_os test_platform
test_posixpath test_shutil test_ssl test_sys test_tarfile
test_tempfile test_threading test_unicode_file_functions
test_unittest test_warnings test_winconsoleio

1 test altered the execution environment:
test_distutils

28 tests skipped:
test_crypt test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl
test_kqueue test_nis test_openpty test_ossaudiodev test_pipes
test_poll test_posix test_pty test_pwd test_readline test_resource
test_spwd test_syslog test_threadsignals test_wait3 test_wait4
test_zipfile64

Total duration: 190 min 60 sec
Tests result: FAILURE

test_atexit leaked [12, 12, 12] references, sum=36
test_atexit leaked [4, 6, 6] memory blocks, sum=16
test_capi leaked [6, 6, 6] references, sum=18
test_capi leaked [2, 4, 4] memory blocks, sum=10
test_concurrent_futures leaked [792, 783, 765] references, sum=2340
test_concurrent_futures leaked [264, 263, 257] memory blocks, sum=784
test_fileio leaked [1, 2, 2] memory blocks, sum=5
test_functools leaked [0, 3, 2] memory blocks, sum=5
test_glob leaked [265, 266, 266] memory blocks, sum=797
test_idle leaked [471, 471, 471] references, sum=1413
test_idle leaked [209, 211, 211] memory blocks, sum=631
test_io leaked [2, 3, 3] memory blocks, sum=8
test_multiprocessing_spawn leaked [168, 117, 144] references, sum=429
test_multiprocessing_spawn leaked [55, 43, 50] memory blocks, sum=148
test_ntpath leaked [103, 104, 104] memory blocks, sum=311
test_os leaked [33, 33, 33] references, sum=99
test_os leaked [58, 60, 60] memory blocks, sum=178
test_platform leaked [12, 12, 12] references, sum=36
test_platform leaked [4, 6, 6] memory blocks, sum=16
test_posixpath leaked [3, 4, 4] memory blocks, sum=11
test_shutil leaked [5, 6, 6] memory blocks, sum=17
test_ssl leaked [3, 4, 4] memory blocks, sum=11
test_sys leaked [9, 9, 9] references, sum=27
test_sys leaked [3, 5, 5] memory blocks, sum=13
test_tarfile leaked [4, 5, 5] memory blocks, sum=14
test_tempfile leaked [82, 83, 83] memory blocks, sum=248
test_threading leaked [12, 12, 12] references, sum=36
test_threading leaked [4, 6, 6] memory blocks, sum=16
test_unicode_file_functions leaked [5, 6, 6] memory blocks, sum=17
test_winconsoleio leaked [38, 38, 38] references, sum=114
test_winconsoleio leaked [0, 1, 2] memory blocks, sum=3

--
components: Windows
messages: 283792
nosy: haypo, paul.moore, serhiy.storchaka, steve.dower, tim.golden, 
xiang.zhang, zach.ware
priority: high
severity: normal
stage: needs patch
status: open
title: Reference leaks on Windows
type: resource usage
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Eryk Sun

Eryk Sun added the comment:

Let's do a bit of house cleaning. Run the following commands in a command 
prompt:

reg delete HKCU\SOFTWARE\Classes\.py /f
reg delete HKCU\SOFTWARE\Classes\py_auto_file /f
reg delete HKCU\SOFTWARE\Classes\Applications\python.exe /f
reg delete HKCU\SOFTWARE\Classes\Applications\py.exe /f
reg delete 
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py /f

HKCU\SOFTWARE\Classes\.py is selecting the PyCharm2016.3 ProgId. This takes 
precedence over HKLM\SOFTWARE\Classes\.py, the key that selects Python.File. I 
expect this causes Explorer to automatically reselect the PyCharm2016.3 ProgId. 
Deleting it in combination with deleting "...\Explorer\FileExts\.py" may fix 
the problem, i.e. restore the Edit with IDLE menu.

The "...\Applications\python.exe" and "...\Applications\py.exe" keys were 
created by manually associating with the given executable. Note how the open 
commands have the script path (%1) but no command-line arguments (%*). It's 
harmless to delete these keys.

--
nosy: +eryksun

___
Python tracker 

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



[issue29031] 'from module import *' and __all__

2016-12-21 Thread Eryk Sun

Changes by Eryk Sun :


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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Couple things to note: I was not able to delete a couple of the keys. 
Regardless I've made some progress which I will outline in the next comment.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Following your instructions on key deletion, I have now 2 "Edit with IDLE" 
options now. The top one does *not* work. The second one, however, does work. 
But when I tried to associate the .py with idle (so it opens up in IDLE) it 
reverted back to the command-line run of the .py file and eliminated the "Edit 
with IDLE" options from the right-click menu. Very odd. 

Thank you so much for staying with this issue.

--
Added file: http://bugs.python.org/file45992/progress so far.png

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Eryk Sun

Eryk Sun added the comment:

To remove the broken "Edit with IDLE" entry, open an elevated (administrator) 
command prompt and run the following:

reg delete "HKLM\SOFTWARE\Classes\Python.File\shell\Edit with IDLE" /f

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

I did that, and now all the options are gone.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Also, just to clarify, I want this to be a regular installation of Python 
wherein I can associate .py files with IDLE (i.e. when I double click on a .py 
file, it takes me straight to the code) *as well as* having the option to "Edit 
with IDLE" when right-clicking on a .py file. For some reason, on this machine, 
I'm not able to replicate the same installation as on my other Windows machine 
not matter how much I try.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Also, just to clarify, I want this to be a regular installation of Python 
wherein I can associate .py files with IDLE (i.e. when I double click on a .py 
file, it takes me straight to the code) *as well as* having the option to "Edit 
with IDLE" when right-clicking on a .py file. For some reason, on this machine, 
I'm not able to replicate the same installation as on my other Windows machine 
not matter how much I try.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Eryk Sun

Eryk Sun added the comment:

> I did that, and now all the options are gone.

Removing the broken HKLM entry shouldn't have removed all of the options. The 
"Edit with IDLE" menu should be there as long as Python.File is selected for 
the file association. It's defined for the current user on your system, under 
the following key:

HKCU\SOFTWARE\Classes\Python.File\Shell\editwithidle

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Eryk Sun

Eryk Sun added the comment:

> I want this to be a regular installation of Python wherein I can 
> associate .py files with IDLE

That isn't a regular installation. It's not even an optional configuration, and 
never has been. You'd have to set that up manually. Are you looking to [-r]un 
files in IDLE by double clicking on them, or simply open them in the editor?

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Before re-installing Windows 10, I was able to open up all my .py files  by 
double-clicking on them and it would open them up in the IDLE (where I could 
edit the code manually and what have you). I'm not sure why it's never been a 
feature: I was doing that for many months.

--
Added file: http://bugs.python.org/file45993/double clicking on .py should show 
this.PNG

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread Eryk Sun

Eryk Sun added the comment:

openwithidle_for_frostyelsa.reg adds an open command for the current user that 
opens the target file in IDLE. This will take precedence over the per-machine 
open command that executes the file using the launcher. 

It also adds "Run" and "Run as administrator" commands to execute the file 
using the launcher.

--
Added file: http://bugs.python.org/file45994/openwithidle_for_frostyelsa.reg

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-21 Thread David

David added the comment:

Thank you so much! This solved it.

--

___
Python tracker 

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



[issue29038] Duplicate entry for SSLContext.get_ca_certs() in ssl

2016-12-21 Thread Xiang Zhang

Xiang Zhang added the comment:

The codes in py2.7 looks same as in py3.4+, so make the doc same as in py3.4+.

--
keywords: +patch
nosy: +christian.heimes, xiang.zhang
stage:  -> patch review
Added file: http://bugs.python.org/file45995/duplicate-doc-entry.patch

___
Python tracker 

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



[issue29039] Segmentation fault when using PyUnicode_FromString

2016-12-21 Thread Xiang Zhang

Xiang Zhang added the comment:

Just as Christoph said, you need to initialize first.

--
nosy: +xiang.zhang
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



[issue29042] os.path.exists should not throw "Embedded NUL character" exception

2016-12-21 Thread Dolda2000

New submission from Dolda2000:

Currently, calling os.path.exists on a path which contains NUL characters 
behaves consistently with most file-system calls by throwing an exception:

>>> os.path.exists('\0')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.5/genericpath.py", line 19, in exists
os.stat(path)
ValueError: embedded null byte

However, os.path.exists is supposed to be a predicate returning whether there 
exists a file named by the path; it does not specify any particular method or 
system call for doing the test, and so reflecting the behavior of the 
underlying syscall used is not obviously desirable. A path containing an 
embedded NUL character simply cannot name an existing file, and therefore 
os.path.exists should return False for such a path.

--
components: Library (Lib)
messages: 283807
nosy: Dolda2000
priority: normal
severity: normal
status: open
title: os.path.exists should not throw "Embedded NUL character" exception
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



[issue29043] dict view string representations are misleading

2016-12-21 Thread Tadhg McDonald-Jensen

New submission from Tadhg McDonald-Jensen:

Currently the string representation for dictionary views are a bit misleading 
as they look like valid expression but isn't:

>>> {'a':1, 'b':2}.keys()
dict_keys(['b', 'a'])
>>> dict_keys = type({}.keys()) #get a reference to the type
>>> dict_keys(['b', 'a'])
Traceback (most recent call last):
  File "", line 1, in 
dict_keys(['b', 'a'])
TypeError: cannot create 'dict_keys' instances


This seems inconsistent with the documentation for 'repr' 
https://docs.python.org/3/reference/datamodel.html#object.__repr__

"If at all possible, this should look like a valid Python expression that could 
be used to recreate an object with the same value (given an appropriate 
environment). If this is not possible, a string of the form <...some useful 
description...> should be returned."

So I'd think the representation for dictionary views should look something like 
this instead:

 

to indicate that it cannot be reproduced by a simple expression but still shows 
it's contents.

--
messages: 283808
nosy: Tadhg McDonald-Jensen
priority: normal
severity: normal
status: open
title: dict view string representations are misleading
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28923] Nonexisting encoding specified in Tix.py

2016-12-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef03aff3b195 by Terry Jan Reedy in branch '2.7':
Issue 28923: Remove editor artifacts from Tix.py,
https://hg.python.org/cpython/rev/ef03aff3b195

--
nosy: +python-dev

___
Python tracker 

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



[issue29043] dict view string representations are misleading

2016-12-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

In this case, practicality beats purity.  We want to repr to show the contents 
of the dictionary (that improves usability).  The general rule that repr's need 
to round-trip is only a general rule and has many exceptions.  As of course, in 
this case, it isn't possible to reinstantiate.

This repr has been already been published and present long enough that it is 
set is stone (this ship sailed long ago, it is even present in Python 2.7).  
Also, the proposed repr looks a little weird to my eyes and I don't think 
changing it would be of benefit to any one.

So, thank you for the suggestion, but I'm going to pass on this one.

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



  1   2   >