[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks.  I will look at it tomorrow and if it seems ok, prepare a new combined 
backport and see if it passes.

--

___
Python tracker 

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



[issue28638] Optimize namedtuple creation

2017-07-18 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Thanks Joe! I adapted your benchmark suite to also run my implementation. See 
https://github.com/JelleZijlstra/cnamedtuple/commit/61b6fbf4de37f8131ab43c619593327004974e52
 for the code and results. The results are consistent with what we've seen 
before.

Joe's cnamedtuple is about 40x faster for class creation than the current 
implementation, and my PR only speeds class creation up by 4x. That difference 
is big enough that I think we should seriously consider using the C 
implementation.

--

___
Python tracker 

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



[issue30965] Unexpected behavior of operator "in"

2017-07-18 Thread Tim Peters

Tim Peters added the comment:

Not a bug.  For an explanation, I just answered a very similar question on 
StackOverflow:

https://stackoverflow.com/questions/45180899/unexpected-result-from-in-operator/45180967#45180899

--
nosy: +tim.peters

___
Python tracker 

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



[issue30965] Unexpected behavior of operator "in"

2017-07-18 Thread Ammar Askar

Ammar Askar added the comment:

Sorry, forgot the actual link. 
https://docs.python.org/3/reference/expressions.html#operator-precedence

--

___
Python tracker 

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



[issue30965] Unexpected behavior of operator "in"

2017-07-18 Thread Ammar Askar

Ammar Askar added the comment:

Check out this section of the documentation, notably this part:

"Note that comparisons, membership tests, and identity tests, all have the same 
precedence and have a left-to-right chaining feature"

Chaining lets you write stuff like this:

>>> x = 1
>>> 0 < x < 2
True

And since membership tests and identity tests are chained, the code you posted 
above essentially turns into:

(1 in [1]) and ([1] is True)

The former part of that expression is True but the latter is false.

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



[issue30965] Unexpected behavior of operator "in"

2017-07-18 Thread Mihai Cara

New submission from Mihai Cara:

Unexpected behavior of operator "in" when checking if a list/tuple/etc. 
contains a value:
>>> 1 in [1] is True
False
>>> (1 in [1]) is True
True

Is this a bug? If not, please explain why first variant return False.

--
messages: 298633
nosy: mcara
priority: normal
severity: normal
status: open
title: Unexpected behavior of operator "in"
type: behavior
versions: Python 2.7, Python 3.5

___
Python tracker 

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



[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2017-07-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace

2017-07-18 Thread Kubilay Kocak

Changes by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue11230] "Full unicode import system" not in 3.2

2017-07-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python 3.2 is out of maintenance. Full Unicode path support was added in Python 
3.3 by issue3080.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30730] [security] Injecting environment variable in subprocess on Windows

2017-07-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28638] Optimize namedtuple creation

2017-07-18 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

I benchmarked some common namedtuple operations with the following script:

#!/bin/bash
echo 'namedtuple creation'
./python -m timeit -s 'from collections import namedtuple' 'x = namedtuple("x", 
["a", "b", "c"])'

echo 'namedtuple instantiation'
./python -m timeit -s 'from collections import namedtuple; x = namedtuple("x", 
["a", "b", "c"])' 'x(1, 2, 3)'

echo 'namedtuple attribute access'
./python -m timeit -s 'from collections import namedtuple; x = namedtuple("x", 
["a", "b", "c"]); i = x(1, 2, 3)' 'i.a'

echo 'namedtuple _make'
./python -m timeit -s 'from collections import namedtuple; x = namedtuple("x", 
["a", "b", "c"])' 'x._make((1, 2, 3))'


--
With my patch as it stands now I get:

$ ./ntbenchmark.sh 
namedtuple creation
2000 loops, best of 5: 101 usec per loop
namedtuple instantiation
50 loops, best of 5: 477 nsec per loop
namedtuple attribute access
500 loops, best of 5: 59.9 nsec per loop
namedtuple _make
50 loops, best of 5: 430 nsec per loop


--
With unpatched CPython master I get:

$ ./ntbenchmark.sh 
namedtuple creation
500 loops, best of 5: 409 usec per loop
namedtuple instantiation
50 loops, best of 5: 476 nsec per loop
namedtuple attribute access
500 loops, best of 5: 60 nsec per loop
namedtuple _make
100 loops, best of 5: 389 nsec per loop


So creating a class is about 4x faster (similar to the benchmarks various other 
people have run) and calling _make() is 10% slower. That's probably because of 
the line "if len(result) != cls._num_fields:" in my implementation, which would 
have been something like "if len(result) != 3" in the exec-based implementation.

I also cProfiled class creation with my patch. These are results for creating 
1 3-element namedtuple classes:

 390005 function calls in 2.793 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0530.0002.8260.000 
:1(make_nt)
11.0990.0002.7730.000 
/home/jelle/qython/cpython/Lib/collections/__init__.py:380(namedtuple)
10.9480.0000.9810.000 {built-in method builtins.exec}
   100.3160.0000.3160.000 {method 'format' of 'str' objects}
10.0690.0000.2200.000 {method 'join' of 'str' objects}
40.0710.0000.1520.000 
/home/jelle/qython/cpython/Lib/collections/__init__.py:439()
10.0440.0000.0440.000 {built-in method builtins.repr}
30.0330.0000.0330.000 {method 'startswith' of 'str' 
objects}
40.0310.0000.0310.000 {method 'isidentifier' of 'str' 
objects}
40.0250.0000.0250.000 {method '__contains__' of 
'frozenset' objects}
10.0220.0000.0220.000 {method 'replace' of 'str' 
objects}
10.0220.0000.0220.000 {built-in method sys._getframe}
30.0200.0000.0200.000 {method 'add' of 'set' objects}
20.0180.0000.0180.000 {built-in method builtins.len}
10.0130.0000.0130.000 {built-in method 
builtins.isinstance}
10.0090.0000.0090.000 {method 'get' of 'dict' objects}

So about 35% of time is still spent in the exec() call to create __new__. 
Another 10% is in .format() calls, so using f-strings instead of .format() 
might also be worth it.

--

___
Python tracker 

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



[issue28638] Optimize namedtuple creation

2017-07-18 Thread Joe Jevnik

Joe Jevnik added the comment:

I added a benchmark suite (using Victor's perf utility) to cnamedtuple. The 
results are here: https://github.com/ll/cnamedtuple#benchmarks

To summarize: type creation is much faster; instance creation and named 
attribute access are a bit faster.

--
nosy: +ll

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-18 Thread Berker Peksag

Berker Peksag added the comment:


New changeset a739000db55ef55e69a53ca6966ea8657cac4354 by Berker Peksag (Ammar 
Askar) in branch '2.7':
[2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net 
(GH-2755)
https://github.com/python/cpython/commit/a739000db55ef55e69a53ca6966ea8657cac4354


--

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-18 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +2817

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-18 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +2816

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-18 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +2815

___
Python tracker 

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



[issue30730] [security] Injecting environment variable in subprocess on Windows

2017-07-18 Thread Ned Deily

Ned Deily added the comment:


New changeset e46f1c19642ea1882f427d8246987ba49351a97d by Ned Deily (Serhiy 
Storchaka) in branch '3.3':
[security][3.3] bpo-30730: Prevent environment variables injection in 
subprocess on Windows. (GH-2325) (#2363)
https://github.com/python/cpython/commit/e46f1c19642ea1882f427d8246987ba49351a97d


--

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-18 Thread Berker Peksag

Berker Peksag added the comment:

I merged Ammar's PR in d81bea6520892e0428aec61c73e0631a69db11bb, but it looks 
like I missed that the PR title and commit message was different and the latter 
didn't contain bpo-30883.

--
stage: needs patch -> backport needed
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue22650] set up and use VM for net access in the test suite

2017-07-18 Thread Ammar Askar

Ammar Askar added the comment:

Opened up https://github.com/python/cpython/pull/2755/ in order to address 
https://bugs.python.org/issue30883

This changes the ftp servers from debian.org to pythontest.net

--
nosy: +ammar2

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-18 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +2814

___
Python tracker 

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



[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-18 Thread Louie Lu

Louie Lu added the comment:

PR 2754 changed it to use `read_string`.

--

___
Python tracker 

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



[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-18 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +2813

___
Python tracker 

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



[issue29144] Implicit namespace packages in Python 3.6

2017-07-18 Thread Nick Coghlan

Nick Coghlan added the comment:

Are you able to confirm the version of setuptools involved is the same in both 
cases?

The reason I ask is that the interaction between pkg_resources-style namespace 
packages and native ones is known to be temperamental 
(https://packaging.python.org/guides/packaging-namespace-packages/#creating-a-namespace-package),
 and the suggested resolution is to make sure that if you're using 
pkg_resources namespaces at all then *all* packages contributing to the 
namespace should be using them.

--

___
Python tracker 

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



[issue30958] Scripts folder is empty

2017-07-18 Thread Ned Deily

Changes by Ned Deily :


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



[issue30958] Scripts folder is empty

2017-07-18 Thread Leo kerr

Leo kerr added the comment:

Nvm turns out the modules in the folder were hidden for some reason. Thanks 
anyway.

Sent from Mail for Windows 10

From: Ned Deily
Sent: Wednesday, 19 July 2017 10:08 AM
To: leo.kerr...@gmail.com
Subject: [issue30958] Scripts folder is empty

Ned Deily added the comment:

Sorry, but you are going to have supply more information for anyone to attempt 
to give an answer.  Please indicated exactly how you are trying to install 
Python (building from source, with one of the binary installers, etc), which 
operating system and version, which version of Python, and the path to the 
empty Scripts folder.

--
nosy: +ned.deily

___
Python tracker 

___

--

___
Python tracker 

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



[issue30964] Mention ensurepip in package installation docs

2017-07-18 Thread Nick Coghlan

New submission from Nick Coghlan:

The package installation docs at 
https://github.com/python/cpython/blob/master/Doc/installing/index.rst have a 
section on "Common Installation Issues": 
https://docs.python.org/3/installing/#common-installation-issues

A new entry should be added to this section to cover the case where pip isn't 
installed by default (e.g. because it was deselected when running the 
installer), and to suggest trying "python -m ensurepip --default-pip" as a 
potential remedy.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 298622
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Mention ensurepip in package installation docs
type: enhancement
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



[issue30585] [security][3.3] Backport smtplib fix for TLS stripping vulnerability, CVE-2016-0772

2017-07-18 Thread Ned Deily

Ned Deily added the comment:

Merged for release in 3.3.7rc1

--
priority: release blocker -> 
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30585] [security][3.3] Backport smtplib fix for TLS stripping vulnerability, CVE-2016-0772

2017-07-18 Thread Ned Deily

Ned Deily added the comment:


New changeset 3625f7fd11679ecb390ffa58ef36d487acc8159b by Ned Deily (Victor 
Stinner) in branch '3.3':
[3.3] bpo-30585: [security] raise an error when STARTTLS fails (#225)
https://github.com/python/cpython/commit/3625f7fd11679ecb390ffa58ef36d487acc8159b


--
nosy: +ned.deily

___
Python tracker 

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



[issue30958] Scripts folder is empty

2017-07-18 Thread Ned Deily

Ned Deily added the comment:

Sorry, but you are going to have supply more information for anyone to attempt 
to give an answer.  Please indicated exactly how you are trying to install 
Python (building from source, with one of the binary installers, etc), which 
operating system and version, which version of Python, and the path to the 
empty Scripts folder.

--
nosy: +ned.deily

___
Python tracker 

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



[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The deepcopy does not work on 3.6.  Any fix should be applied to 3.7 as well.  
If nothing else, we should try to reload with read_string.

This is a blocker for merging anything else into config and test_config.

--

___
Python tracker 

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



[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-18 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2812

___
Python tracker 

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



[issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact

2017-07-18 Thread Jim Jewett

New submission from Jim Jewett:

https://github.com/python/cpython/blob/master/Modules/xxlimited.c#L28

#define XxoObject_Check(v)  (Py_TYPE(v) == Xxo_Type)

assumes that the type cannot be subclassed, but does not say so.  Since this is 
demo code, it would be better to use something like decimal:

#define PyDec_CheckExact(v) (Py_TYPE(v) == _Type)
#define PyDec_Check(v) PyObject_TypeCheck(v, _Type)

I *believe* (but haven't verified) that would be:

#define XxoObject_CheckExact(v) (Py_TYPE(v) == _Type)
#define XxoObject_Check(v) PyObject_TypeCheck(v, _Type)

--
components: Extension Modules
messages: 298617
nosy: Jim.Jewett
priority: normal
severity: normal
stage: needs patch
status: open
title: xxlimited.c XxoObject_Check should be XxoObject_CheckExact
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



[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset f776eb0f0e046f2fa3a96540bb42d8cf970f6c55 by terryjreedy (Louie 
Lu) in branch 'master':
bpo-30917: IDLE: Add config.IdleConf unittests (#2691)
https://github.com/python/cpython/commit/f776eb0f0e046f2fa3a96540bb42d8cf970f6c55


--

___
Python tracker 

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



[issue30962] Add caching to logging.Logger.isEnabledFor()

2017-07-18 Thread STINNER Victor

STINNER Victor added the comment:

>> Benchmark code is in the referenced pull request
> Does this speed up actual logging calls such logger.info, etc?

According to the benchmark in the PR, it's 50% faster when the log is ignored, 
like a debug call in production.

--
nosy: +haypo

___
Python tracker 

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



[issue30962] Add caching to logging.Logger.isEnabledFor()

2017-07-18 Thread Avram

Avram added the comment:

Yes, though the bottleneck for normal logging is more likely in other areas so 
the speedup will be less noticeable. Where I notice it is with debug statements 
when debugging is disabled. In that scenario the bulk of the time is spent 
checking if the level is enabled anywhere in the ancestry.

--

___
Python tracker 

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



[issue30962] Add caching to logging.Logger.isEnabledFor()

2017-07-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Does this speed up actual logging calls such logger.info, etc?

--
nosy: +pitrou

___
Python tracker 

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



[issue30962] Add caching to logging.Logger.isEnabledFor()

2017-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue30962] Add caching to logging.Logger.isEnabledFor()

2017-07-18 Thread Avram

New submission from Avram:

Checking to see if a log level is enabled can add non-insignificant time to 
programs with a large number of logging statements. This issue is to track a 
pull request which introduces caching to the logging module so checking to see 
if a log level is enabled takes half the current time.

Benchmark code is in the referenced pull request

--
components: Library (Lib)
messages: 298612
nosy: aviso
priority: normal
pull_requests: 2811
severity: normal
status: open
title: Add caching to logging.Logger.isEnabledFor()
type: performance
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



[issue30956] ftplib behaves oddly if socket timeout is greater than the default

2017-07-18 Thread R. David Murray

Changes by R. David Murray :


--
type: crash -> behavior
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue30956] ftplib behaves oddly if socket timeout is greater than the default

2017-07-18 Thread R. David Murray

R. David Murray added the comment:

I changed the title to reflect the problem, but note that I'm *assuming* it is 
"greater than the default" that is the issue, I haven't actually tested that 
theory.

--
title: ftplib socket timeout can't be handled -> ftplib behaves oddly if socket 
timeout is greater than the default

___
Python tracker 

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



[issue30956] ftplib socket timeout can't be handled

2017-07-18 Thread R. David Murray

R. David Murray added the comment:

I would like to leave this issue open.  It is clear that the behavior for long 
timeouts does not match the docs, and that should be investigated if someone 
has the motivation :)

--
resolution: works for me -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-07-18 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests:  -2809

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-18 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +2810

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-18 Thread Steve Dower

Steve Dower added the comment:

Zach - did this get backported to 2.7 or 3.5? It doesn't look like it.

--
stage: commit review -> backport needed

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-07-18 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +2809

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-18 Thread Steve Dower

Steve Dower added the comment:


New changeset 5feda33a35d9413e2073411b848dc49d94c57497 by Steve Dower in branch 
'master':
bpo-30450: Fix logic for retrying nuget.exe download (#2744)
https://github.com/python/cpython/commit/5feda33a35d9413e2073411b848dc49d94c57497


--

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

https://www.python.org/community/lists/
https://www.python.org/community/irc/

--

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue30960] Python script is failing to run

2017-07-18 Thread Megha HR

Megha HR added the comment:

Hi,

python-list mailing list, or the #python irc channel on freenode.  

May I know python mailing list please?

--

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset cb3f024f3ac91e468d581f0682e63685c977c80d by Xiang Zhang in branch 
'3.5':
bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2749)
https://github.com/python/cpython/commit/cb3f024f3ac91e468d581f0682e63685c977c80d


--

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 241c4a28d9fec7f2beffc9cbd21f15659a9d by Xiang Zhang in branch 
'3.6':
bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) (#2748)
https://github.com/python/cpython/commit/241c4a28d9fec7f2beffc9cbd21f15659a9d


--

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +2808

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +2807

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

New submission from Xiang Zhang:


New changeset 4ed5ad79ec6c6270e6018bd0a55656305ee60907 by Xiang Zhang in branch 
'master':
bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747)
https://github.com/python/cpython/commit/4ed5ad79ec6c6270e6018bd0a55656305ee60907


--

___
Python tracker 

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



[issue30956] ftplib socket timeout can't be handled

2017-07-18 Thread Arlo Clarke

Arlo Clarke added the comment:

Thanks David. Lowering the timeout to below 60s seems to have resolved this 
issue. Or at least the error isn't being thrown anymore. I don't know why the 
error couldn't be handled in the first place, however.

--
resolution:  -> works for me
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



[issue28638] Optimize namedtuple creation

2017-07-18 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> Should we consider a C-based implementation like 
> https://github.com/ll/cnamedtuple? 
> It could improve speed even more, but would be harder to maintain and
> test and harder to keep compatible. My sense is that it's not worth
> it unless benchmarks show a really dramatic difference.

I've just filed a ticket for this: 
https://github.com/ll/cnamedtuple/issues/7

--

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +2806

___
Python tracker 

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



[issue30961] Py_Decref a borrowed reference in _tracemalloc

2017-07-18 Thread Xiang Zhang

Changes by Xiang Zhang :


--
components: Extension Modules
nosy: xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Py_Decref a borrowed reference in _tracemalloc
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



[issue30794] Add multiprocessing.Process.kill()

2017-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> not a bug
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread R. David Murray

R. David Murray added the comment:

This is a bug tracker for Python.  3.2 is out of maintenance, so such a 
question is not appropriate for this forum. In any case it is an issue with 
your install, not with Python itself, so again not appropriate for this forum. 
You should ask for help on the python-list mailing list, or the #python irc 
channel on freenode.  

I wish we could help you here, but we need to keep this forum focused on bugs 
in Python itself.  Please do not reopen the issue.

louielu, if you want to continue to help Megha, which would be great, please 
take it to private email.

--
nosy: +r.david.murray
status: open -> closed

___
Python tracker 

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



[issue30794] Add multiprocessing.Process.kill()

2017-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution: not a bug -> fixed

___
Python tracker 

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



[issue30794] Add multiprocessing.Process.kill()

2017-07-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset ba75af713078966cc594fc7f0809ed53c532c58f by Antoine Pitrou (Vitor 
Pereira) in branch 'master':
bpo-30794: added kill() method to multiprocessing.Process (#2528)
https://github.com/python/cpython/commit/ba75af713078966cc594fc7f0809ed53c532c58f


--

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Megha HR

Megha HR added the comment:

Thanks louielu for your response.

Yes I did check related to env & its python path, this looks ok.


#!/usr/sunos/bin/sh -x

# This script is a wrapper for the official OSS python

PYTHON=/opt/python/python/python3.2
PYTHON_ENV=/etc/opt/ericsson/3ppenv/python.env

if [ -r $PYTHON_ENV ]; then
  . $PYTHON_ENV && export PYTHONHOME && export PYTHONPATH
  $PYTHON $*
else
  echo "reading $PYTHON_ENV failed"
  exit 1
fi

Do you still suggest to export it again ?

May I know 
in which scenarios
1)We can see the mentioned error message
2) core dump will happen for python?

Appreciate your comment.


Also we can see lots and lots of core files of python;



-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.14513
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.14551
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.14651
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.14739
-rw---   1 nmsadm   nms  7410460 Jul 14 07:05 python3.2.15279
-rw---   1 nmsadm   nms  7410460 Jul 14 07:05 python3.2.15291
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.15290
-rw---   1 nmsadm   nms  7430940 Jul 14 07:05 python3.2.15288
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.15368
-rw---   1 nmsadm   nms  7410460 Jul 14 07:05 python3.2.15374
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.15575
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.15641
-rw---   1 nmsadm   nms  7426844 Jul 14 07:05 python3.2.15792
-rw---   1 nmsadm   nms  7410460 Jul 14 07:06 python3.2.16645
-rw---   1 nmsadm   nms  7430940 Jul 14 07:06 python3.2.16652
-rw---   1 nmsadm   nms  7410460 Jul 14 07:06 python3.2.16728
-rw---   1 nmsadm   nms  7410460 Jul 14 07:06 python3.2.16895
-rw---   1 nmsadm   nms  7426844 Jul 14 07:06 python3.2.17082
-rw---   1 nmsadm   nms  7426844 Jul 14 07:06 python3.2.17273
-rw---   1 nmsadm   nms  7426844 Jul 14 07:06 python3.2.17305
-rw---   1 nmsadm   nms  7426844 Jul 14 07:06 python3.2.17365
-rw---   1 nmsadm   nms  7426844 Jul 14 07:06 python3.2.17462
#date
Tue Jul 18 16:24:44 IST 2017

--

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2017-07-18 Thread Mark Dickinson

Mark Dickinson added the comment:

Ah, sorry; I see. That was just for the docstring, not for the docs. My bad.

--

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2017-07-18 Thread Mark Dickinson

Mark Dickinson added the comment:

Serhiy: I thought your GitHub PR (https://github.com/python/cpython/pull/2740) 
already included the new wording?

--

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2017-07-18 Thread R. David Murray

R. David Murray added the comment:

We don't need to burden Mark with doing a PR for this (unless he wants to).  
This is a good new contributer practice issue :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue30946] readline module has obsolete code

2017-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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



[issue30946] readline module has obsolete code

2017-07-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset f474c5a3f3c1fbc0383800b88e8518d43a52d1d1 by Antoine Pitrou in 
branch 'master':
bpo-30946: Remove obsolete fallback code in readline module (#2738)
https://github.com/python/cpython/commit/f474c5a3f3c1fbc0383800b88e8518d43a52d1d1


--

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Louie Lu

Louie Lu added the comment:

Your information isn't that clear, this is what I found on the Internet:

https://techglimpse.com/error-executing-python3-5-command-solution/
https://unix.stackexchange.com/questions/17863/py3compile-error-unable-to-get-the-locale-encoding

Maybe your environment variable PYTHONHOME or PYTHONPATH had some problem.

--
nosy: +louielu

___
Python tracker 

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



[issue30821] unittest.mock.Mocks with specs aren't aware of default arguments

2017-07-18 Thread Max Rothman

Max Rothman added the comment:

Hi, just wanted to ping this again and see if there was any movement.

--

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Megha HR

Megha HR added the comment:

Hi Serhiy,

Thanks a lot for your comment.

Yes we do aware that 3.2V is outdated.
Our plan is to upgrade to latest version.

Otherside, It'll be great if you can let us know any root cause for below 
mentioned error message and how to overcome the same.

./python32.sh
Fatal Python error: Py_Initialize: Unable to get the locale encoding
EOFError: EOF read where not expected
Abort (core dumped)

--
status: closed -> open

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python 3.2 is not supported version. Try to upgrade to newer version.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions:  -Python 3.3

___
Python tracker 

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



[issue30960] Python script is failing to run

2017-07-18 Thread Megha HR

New submission from Megha HR:

Hi,

We are facing below error message whenever we use python.

Could you please let me know root cause and steps to overcome this problem.

./python32.sh
Fatal Python error: Py_Initialize: Unable to get the locale encoding
EOFError: EOF read where not expected
Abort (core dumped)

Python version:

# ./python3.2 -V
Python 3.2.2
root@atclvm820>

--
components: Extension Modules
messages: 298589
nosy: Megha
priority: normal
severity: normal
status: open
title: Python script is failing to run
type: crash
versions: Python 3.3

___
Python tracker 

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



[issue29672] `catch_warnings` context manager causes all warnings to be printed every time, even after exiting

2017-07-18 Thread Gerrit Holl

Changes by Gerrit Holl :


--
title: `catch_warnings` context manager should reset warning registry to 
previous state upon exiting, to prevent warnings from being reprinted -> 
`catch_warnings` context manager causes all warnings to be printed every time, 
even after exiting

___
Python tracker 

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



[issue29672] `catch_warnings` context manager should reset warning registry to previous state upon exiting, to prevent warnings from being reprinted

2017-07-18 Thread Gerrit Holl

Gerrit Holl added the comment:

I get bitten by this frequently, and find myself patching many libraries just 
to avoid them from calling .catch_warnings.

Does anyone know whether to fix this it would suffice to edit warnings.py, or 
would I need to dig into _warnings.c as well?

--

___
Python tracker 

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



[issue29144] Implicit namespace packages in Python 3.6

2017-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brett.cannon, eric.snow, ncoghlan

___
Python tracker 

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



[issue28638] Optimize namedtuple creation

2017-07-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: resolved -> patch review

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2017-07-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please make a PR for your suggestion Mark?

--

___
Python tracker 

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



[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-18 Thread Charles Wohlganger

Charles Wohlganger added the comment:

I (foolishly) was committing to master for a different IDLE enhancement. Until 
that one is pulled, I don't think I can make a new PR without it also having 
all the changes from my previous one. 

New uploaded file has docstrings for the ParenClose class and I've run and 
fixed it against pep8 until it gave no errors. Namespaces should conform to 
PEP8, apart from the module name, which must match the class name due to how 
IDLE works with extensions.

--
Added file: http://bugs.python.org/file47023/ParenClose.py

___
Python tracker 

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



[issue30958] Scripts folder is empty

2017-07-18 Thread ppperry

Changes by ppperry :


--
type: performance -> behavior

___
Python tracker 

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



[issue30957] pathlib: Path and PurePath cannot be subclassed

2017-07-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue24132.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Direct sub-classing of pathlib.Path

___
Python tracker 

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



[issue30957] pathlib: Path and PurePath cannot be subclassed

2017-07-18 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Python 3.4, 3.5 and 3.6 are in feature-freeze, so this enhancement can only 
apply to 3.7.

You say that pathlib.Path "can't be subclassed", but then immediately show an 
example of subclassing it:

>>> class MyPath(pathlib.Path):
...   pass
... 

Which works fine. If you run:

issubclass(MyClass, pathlib.Path)

it returns True. Unfortunately, it looks like your subclass broke one of the 
class invariants, but you don't find out until you try to instantiate it:

>>> p = MyPath('/home')
Traceback (most recent call last):
  ...
AttributeError: type object 'MyPath' has no attribute '_flavour'


_flavour is a private attribute, and is not documented, so I don't think 
subclassing is supported. If that is the case:

- the documentation should say that subclassing is not supported;
- or the Path class should actively prohibit subclassing (will 
  probably require a metaclass);
- or both.

If subclassing is supported, then I think there ought to be a better way than 
this:


py> class MyPath(pathlib.Path):
... _flavour = pathlib.Path('.')._flavour
...
py> MyPath('.')
MyPath('.')

--
nosy: +pitrou, steven.daprano
versions:  -Python 3.4, 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



[issue28414] SSL match_hostname fails for internationalized domain names

2017-07-18 Thread Nick Lamb

Nick Lamb added the comment:

Did I miss Christian's "PEP Broadcast"?

--

___
Python tracker 

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



[issue30959] Constructor signature is duplicated in the help of namedtuples

2017-07-18 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The docstring of namedtuple class starts with the signature of the constructor. 
But pydoc now outputs the signature of the constructor for classes (see 
issue29338). As a result, the signature is duplicated in the output.

For example:

$ ./python -m pydoc functools._CacheInfo
Help on class CacheInfo in functools:

functools._CacheInfo = class CacheInfo(builtins.tuple)
 |  functools._CacheInfo(hits, misses, maxsize, currsize)
 |  
 |  CacheInfo(hits, misses, maxsize, currsize)
 |  
 |  Method resolution order:
...

--
components: Library (Lib)
messages: 298582
nosy: ncoghlan, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Constructor signature is duplicated in the help of namedtuples
type: behavior
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



[issue28638] Optimize namedtuple creation

2017-07-18 Thread Christoph Reiter

Christoph Reiter added the comment:

Why not just do the following:

>>> from collections import namedtuple
>>> Point = namedtuple('Point', ['x', 'y'])
>>> Point._source
"from collections import namedtuple\nPoint = namedtuple('Point', ['x', 'y'])\n"
>>> 

The docs make it seems as if the primary use case of the _source attribute is
to serialize the definition. Returning a source which produces a class with
different performance/memory characteristics goes against that.

--
nosy: +lazka

___
Python tracker 

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



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2017-07-18 Thread Kubilay Kocak

Changes by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-18 Thread pfreixes

pfreixes added the comment:

The Java client 
https://gist.github.com/pfreixes/13fedf2a589c260e6c7c64ae73653bb1

Works as is expected the buffer can be read till it gets empty, no matter when 
the RST was sent.

--

___
Python tracker 

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



[issue29144] Implicit namespace packages in Python 3.6

2017-07-18 Thread Lumír Balhar

Lumír Balhar added the comment:

Hello.

I've met this issue again in moksha project [0] where namespace package is used.

- module moksha.common is installed via RPM to site-packages and there isn't 
file moksha/__init__.py so the implicit way to create namespace package is used 
there.
- moksha.hub module is built in a buildroot and there is moksha/__init__.py 
file so this module uses different way which causes that import of 
moksha.common is failing.

We can delete moksha/__init__.py from buildroot of moksha.hub but then we 
cannot run tests with `python setup.py test`.

Error message is:
error in moksha.hub setup command: Distribution contains no modules or packages 
for namespace package 'moksha'

The second possibility is ship moksha/__init__.py file in python-moksha-common 
RPM. The question is: Why there isn't moksha/__init__.py file in RPM even when 
the source tarball contains it? Because of setuptools!

Setuptools skips installation of __init__.py file when namespace package is 
recognized with the message:
Skipping installation of 
/builddir/build/BUILDROOT/python-moksha-common-1.2.5-1.fc27.x86_64/usr/lib/python3.6/site-packages/moksha/__init__.py
 (namespace package)

Questions summary:
- Why there is such big difference between Python 3.5 and Python 3.6?
- Why does setuptools skip installation of __init__.py file but it needs them 
to run tests of namespace subpackage?

Thank you!
Lumír

[0] https://github.com/mokshaproject/moksha

--

___
Python tracker 

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



[issue12857] Expose called function on frame object

2017-07-18 Thread Jakub Stasiak

Changes by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue30958] Scripts folder is empty

2017-07-18 Thread Leo kerr

New submission from Leo kerr:

The Scripts folder is empty when i installed python.

--
components: Installation
messages: 298578
nosy: Onixiya
priority: normal
severity: normal
status: open
title: Scripts folder is empty
type: performance
versions: Python 3.6

___
Python tracker 

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



[issue30957] pathlib: Path and PurePath cannot be subclassed

2017-07-18 Thread Simon Bernier St-Pierre

New submission from Simon Bernier St-Pierre:

Because of the special way Path and PurePath are instantiated, they can't be 
inherited like a normal class. Here's an example of the issue:

>>> import pathlib
>>> class MyPath(pathlib.Path):
...   pass
... 
>>> p = MyPath('/home')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.5/pathlib.py", line 969, in __new__
self = cls._from_parts(args, init=False)
  File "/usr/lib/python3.5/pathlib.py", line 651, in _from_parts
drv, root, parts = self._parse_args(args)
  File "/usr/lib/python3.5/pathlib.py", line 644, in _parse_args
return cls._flavour.parse_parts(parts)
AttributeError: type object 'MyPath' has no attribute '_flavour'

A solution is to get the concrete type of Path via type(Path()) and inherit the 
class it yields, but it isn't pretty or intuitive. Perhaps a declaration that 
directs to the proper class could be added to the module.

PlatformPath = WindowsPath if os.name == 'nt' else PosixPath
PurePlatformPath = ...

--
components: Library (Lib)
messages: 298577
nosy: Simon Bernier St-Pierre
priority: normal
severity: normal
status: open
title: pathlib: Path and PurePath cannot be subclassed
type: enhancement
versions: 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