[issue25988] collections.abc.Indexable

2017-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If we want to add programming warnings, we should replace 
sys.modules['collections'] with an instance of a module type subclass with 
corresponding properties raising a DeprecationWarning.

--

___
Python tracker 

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



[issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete

2017-07-22 Thread Lovesh Harchandani

New submission from Lovesh Harchandani:

At `/Lib/logging/handlers.py` in `TimedRotatingFileHandler`'s 
`getFilesToDelete` method, filenames are sorted using `result.sort()` 
regardless of `len(result)`, if `len(result)` < backupCount, sorting is not 
required.

--
messages: 298839
nosy: Lovesh Harchandani
priority: normal
severity: normal
status: open
title: Sort only when needed in TimedRotatingFileHandler's getFilesToDelete
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



[issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete

2017-07-22 Thread Lovesh Harchandani

Changes by Lovesh Harchandani :


--
type:  -> enhancement

___
Python tracker 

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



[issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete

2017-07-22 Thread Lovesh Harchandani

Changes by Lovesh Harchandani :


--
components: +Library (Lib)

___
Python tracker 

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



[issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete

2017-07-22 Thread Lovesh Harchandani

Changes by Lovesh Harchandani :


--
pull_requests: +2863

___
Python tracker 

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



[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-07-22 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Therefore, should we implement the behavior of assuming the first day of the 
week if none is provided or not?

--
nosy: +matheus.v.portela

___
Python tracker 

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2017-07-22 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

The patch is broken against Python 3.7. I'll try working on it.

--
nosy: +matheus.v.portela
Added file: http://bugs.python.org/file47032/issue1100942_20170722.patch

___
Python tracker 

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2017-07-22 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Also, may I move this issue to a GitHub PR?

--

___
Python tracker 

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



[issue28060] Clean up division fast paths in Objects/longobject.c

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

What's the status of this?

--
nosy: +pitrou

___
Python tracker 

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



[issue26549] co_stacksize is calculated from unoptimized code

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo, serhiy.storchaka

___
Python tracker 

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



[issue26732] multiprocessing sentinel resource leak

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is expected with the "fork" method, but also happens with the "forkserver" 
method.

--
nosy: +pitrou
stage:  -> needs patch
versions: +Python 3.6, Python 3.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



[issue26732] multiprocessing sentinel resource leak

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +2865

___
Python tracker 

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



[issue26732] multiprocessing sentinel resource leak

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue28060] Clean up division fast paths in Objects/longobject.c

2017-07-22 Thread Mark Dickinson

Mark Dickinson added the comment:

> What's the status of this?

Forgotten, rather than abandoned. :-( I'll unassign so that someone else can 
pick this up. I believe the patch is ready to go, except that of course now it 
needs a PR.

--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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



[issue27151] multiprocessing.Process leaves read pipes open (Process.sentinel)

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> rejected
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
status: pending -> closed

___
Python tracker 

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



[issue26732] multiprocessing sentinel resource leak

2017-07-22 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



[issue26732] multiprocessing sentinel resource leak

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 896145d9d266ee2758cfcd7691238cbc1f9e1ab8 by Antoine Pitrou in 
branch 'master':
bpo-26732: fix too many fds in processes started with the "forkserver" method 
(#2813)
https://github.com/python/cpython/commit/896145d9d266ee2758cfcd7691238cbc1f9e1ab8


--

___
Python tracker 

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



[issue30990] Calls to C functions using `.__call__` don't get sent to profiler.

2017-07-22 Thread ppperry

New submission from ppperry:

If you create a file called `inputtest.py` with the contents 
`input.__call__()`, and run the built-in profile module on it, it doesn't 
notice the call to `input`, and produces a report not including that call.
 4 function calls in 0.000 seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 :0(exec)
10.0000.0000.0000.000 :0(setprofile)
10.0000.0000.0000.000 inputtest.py:1()
10.0000.0000.0000.000 profile:0( 
at 0x029880C0, file "inputtest.py", line 1>)
00.000 0.000  profile:0(profiler)

--
components: Interpreter Core, Library (Lib)
messages: 298847
nosy: ppperry
priority: normal
severity: normal
status: open
title: Calls to C functions using `.__call__` don't get sent to profiler.
type: behavior
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2017-07-22 Thread Kubilay Kocak

Changes by Kubilay Kocak :


--
stage: resolved -> backport needed

___
Python tracker 

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



[issue27790] test_distutils spews linker messages on Windows

2017-07-22 Thread Segev Finer

Segev Finer added the comment:

We are getting those warnings because distutils builds extension modules 
without /GL (https://msdn.microsoft.com/en-us/library/0zza0de8.aspx) but with 
/LTCG (https://msdn.microsoft.com/en-us/library/xbf3tbeh.aspx). We should 
either add /GL to truly enable whole program optimizations/link-time code 
generation or remove it.

It is added in 
https://github.com/python/cpython/blob/896145d9d266ee2758cfcd7691238cbc1f9e1ab8/Lib/distutils/_msvccompiler.py#L233-L241.

--
nosy: +Segev Finer
type:  -> behavior
versions: +Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue25571] Improve the lltrace feature with the Py_Debug mode

2017-07-22 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

@gwk no problem for a review of your patch

@haypo as discussed before, maybe we could remove the lltrace feature because 
this one is never used by the developers.

or we could ask on @python-dev ML.

If there is a better solution and this one could replace the current `lltrace`, 
I am ok with that.

--

___
Python tracker 

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



[issue27790] test_distutils spews linker messages on Windows

2017-07-22 Thread Segev Finer

Segev Finer added the comment:

Investigated some more. We are adding /GL for release but not in debug. But 
adding /LTCG for both debug and release.

--

___
Python tracker 

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



[issue27790] test_distutils spews linker messages on Windows

2017-07-22 Thread Segev Finer

Changes by Segev Finer :


--
pull_requests: +2866

___
Python tracker 

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



[issue30222] make_zip.py had a bug when setting up full 64 bit distribution.

2017-07-22 Thread Steve Dower

Steve Dower added the comment:

I have a separate PR out that fixes this one, just waiting on Zach to review 
(but since it only touches the more obscure release files, it's rare for anyone 
but me to have an opinion). 

The script is supposed to take the build path rather than the architecture, but 
that got reverted at some point.

--

___
Python tracker 

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



[issue30986] Add --include-py argument to Tools/msi/make_zip.py

2017-07-22 Thread Steve Dower

Steve Dower added the comment:

The nuget package doesn't suffer from this - why not? Should you have been 
using the full layout rather than the embedding layout?

--

___
Python tracker 

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



[issue30986] Add --include-py argument to Tools/msi/make_zip.py

2017-07-22 Thread Segev Finer

Segev Finer added the comment:

I used the full one. I doubt virtualenv (used by tox) will work with the 
embedding layout :P.

I remember getting an exception from something because it was missing the .py 
source files but I don't remember what it was and wasn't able to reproduce it 
now.

--

___
Python tracker 

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



[issue30222] make_zip.py had a bug when setting up full 64 bit distribution.

2017-07-22 Thread Segev Finer

Segev Finer added the comment:

I did make a PR which only changes -a/--arch to a choices argument. 
https://github.com/python/cpython/pull/2808

I guess the PR you are talking about is 
https://github.com/python/cpython/pull/2750/files which changes this entirely.

--

___
Python tracker 

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



[issue30991] test_ctypes , test_dbm and test_ssl fail on arm64 (aarch64) architecture

2017-07-22 Thread jonny

New submission from jonny:

I am running debian stretch on 64bit arm system. I am trying to install python 
3.6.2. But facing errors in these tests while running make test.
I have installed these libraries :: apt install liblzma-dev  libz-dev 
libreadline-dev  libncursesw5-dev libssl-dev libgdbm-dev libsqlite3-dev 
libbz2-dev tk-dev libc6-dev libdb-dev libmpdec-dev

test_ctype test_pass_by_value is still a issue for aarch64 as I found here :: 
https://bugs.python.org/issue29804.
So is with test_ssl as mentioned here :: https://bugs.python.org/issue30714
But I have no idea why test_dbm is failing as I have installed req. libraries 
as stated here :: http://bugs.python.org/issue14120

As test_ctypes test_pass_by_value has been fixed 
[https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582#diff-8e60f1d7697d458dee7303f92bc5a5c0L250
 ]
 in Python version 3.7.0 alpha 1 [https://github.com/python/cpython]. So I 
tried to build python 3.7.0. But this time only test_dbm and test_ssl failed 
showing same errors.

Please guide me , how to resolve these.

--
components: Tests
files: python3.6.2 build  aarch64 log.txt
messages: 298855
nosy: jonny789
priority: normal
severity: normal
status: open
title: test_ctypes ,test_dbm and test_ssl  fail on arm64 (aarch64) architecture
type: crash
versions: Python 3.6
Added file: http://bugs.python.org/file47033/python3.6.2 build  aarch64 log.txt

___
Python tracker 

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



[issue30713] Reject newline character (U+000A) in URLs in urllib.parse

2017-07-22 Thread ecbftw

ecbftw added the comment:

I'm the guy that did the original security research on this issue.  I've been a 
pentester for over 12 years, where I am regularly helping developers understand 
how to best correct their injection flaws. Please carefully consider what I'm 
trying to tell you. I've been trying to get this message through to Python for 
nearly 2 years now. =(


Serhiy has the right idea.  His email here shows a firm understanding of the 
issue and the correct remediation approach:
  https://mail.python.org/pipermail/python-dev/2017-July/148715.html

It seems every developer initially assumes input validation is the way you deal 
with injection flaws. But this creates a false sense of a "trade off" between 
security and usability. Rejecting evil-looking things up front just creates 
more problems for you. Also, you can't be sure every code path leading from 
user input to the injection point is addressed. (What other ways can new lines 
reach the FTP library?)

Instead, the problem needs to be dealt with in the lines of code just before 
the injection occurs. Ideally, any special character should be encoded/escaped, 
in which case you get the best of both worlds: security and full usability. 
However, when you're dealing with a syntax that was poorly designed and doesn't 
have a standard way to escape special characters, then you are forced to reject 
them. Still, it is better to do this rejection right before the commands are 
dropped onto the TCP stream. That way, if you later decide that there's an 
acceptable way to encode new lines for *specific* commands, then you can 
perform that encoding right there and relax the restrictions in specific cases.

I like Serhiy's idea of optionally supporting escaping via the syntax defined 
in RFC 2640. This should be disabled by default, and a short-term security 
patch shouldn't try to tackle it. But in a new Python release, a switch could 
be added that causes new lines to be escaped for specific commands, such as the 
CWD and GET commands.  It is likely that this escaping is only going to be 
useful in specific commands, based on what FTP servers actually support. Of 
course none of this is possible if you use a heavy-handed approach of blocking 
%0a in URLs up front.

--
nosy: +ecbftw

___
Python tracker 

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



[issue30403] PEP 547: Running extension modules using -m switch

2017-07-22 Thread Stefan Behnel

Stefan Behnel added the comment:

FYI, I've finally managed to find the time for implementing PEP 489 style 
module initialisation in Cython. It was so easy that I'm sorry it took me so 
long to get started. Cython 0.26 is fresh out, so the feature should go into 
0.27.
https://github.com/cython/cython/pull/1794

Note that I ended up implementing the Py_mod_create function which is now 
copying attributes from the spec right after creation. While not strictly 
required, I guess, it turned out to be easiest, but it seems like this does now 
conflict with the current "-m" implementation. I asked on the github commit why 
that restriction exists.

One thing I stumbled over: exec_in_module() is a Python level function. Would 
that make it possible to re-execute an already imported module? That could be 
dangerous, because C level module code often initialises resources that a 
simple re-execution of the module exec function would overwrite without 
cleaning up the old state. I did not (yet?) implement support for m_clear() 
etc., and that might actually turn out to be really risky when it comes to 
supporting arbitrary user code.

OTOH, that case is easy to detect because the module is already completely 
initialised at that point.

As far as I understand it, all that this PEP really changes from the POV of the 
extension module is that it calls the exec function with a different module 
name ("__main__"). Cython already provides that feature itself (by embedding 
CPython in a C main function), so this should be easy to support.

--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-22 Thread Utkarsh Upadhyay

Changes by Utkarsh Upadhyay :


--
pull_requests: +2867

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-22 Thread Utkarsh Upadhyay

Changes by Utkarsh Upadhyay :


--
pull_requests: +2868

___
Python tracker 

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



[issue30992] Invalid PGP Key Prevents Archive Validation

2017-07-22 Thread Chris White

New submission from Chris White:

When trying to validate the Python 3.6.1 tgz using the ASC file, I can't import 
all the keys due to the following error:

```
gpg: Note: signatures using the MD5 algorithm are rejected
gpg: key ED9D77D5: no valid user IDs
gpg: this may be caused by a missing self-signature
```

This is using Ubuntu 16.04 and gpg (GnuPG) 1.4.20, running the command

```
wget https://www.python.org/static/files/pubkeys.txt
gpg --import pubkeys.txt
```

If I take out the key ID manually out of the entire list and import the keys by 
their IDs instead it works.

--
components: Installation
messages: 298858
nosy: cwprogram
priority: normal
severity: normal
status: open
title: Invalid PGP Key Prevents Archive Validation
type: security
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



[issue27790] test_distutils spews linker messages on Windows

2017-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

With the patch, I still see the Creating ... messages but without the LINK: 
warning.  It *seems* like a no-brainer to apply the patch. 

With those gone, it would seem reasonable to intercept the message as Steve 
described and only print it if it contains 'LINK' or if the test fails.

--

___
Python tracker 

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



[issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters

2017-07-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:


New changeset 2b1e6e9696cb433c0e0da11145157d54275d119f by Giampaolo Rodola 
(Dong-hee Na) in branch 'master':
bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command 
(#1214)
https://github.com/python/cpython/commit/2b1e6e9696cb433c0e0da11145157d54275d119f


--

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-22 Thread Larry Hastings

Larry Hastings added the comment:


New changeset 34fae03cd6c9e304e02c571b3bf9e8df0cfe76be by larryhastings (Serhiy 
Storchaka) in branch '3.4':
[3.4] bpo-26617: Ensure gc tracking is off when invoking weakref callbacks. 
(#2695)
https://github.com/python/cpython/commit/34fae03cd6c9e304e02c571b3bf9e8df0cfe76be


--

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Terry J. Reedy

New submission from Terry J. Reedy:

This follows #30981 and the comments on PR 2805 after the close notice.
* Causal chains in a directed acyclic graph link user actions to provisional 
entries in changes and and changes in the example displays.  Explain these 
better in the docstring. Each font test function tests pieces of the graph.
*test_font_set should run even if not run first.

--
assignee: terry.reedy
components: IDLE
messages: 298862
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Document and fix configdialog font tests.
type: enhancement
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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-22 Thread Larry Hastings

Larry Hastings added the comment:

Sorry for the delay in merging your PR.  I believe Ned is planning to tag the 
next 3.3 rc1 tomorrow (Sunday).  If you see this, and you have time, it'd be 
great if you could make a PR for the 3.3 backport.

Note that 3.3 is probably *not* getting converted to use "blurb".  So if you do 
make the backport, please just edit Misc/NEWS directly.

Thanks!

--

___
Python tracker 

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



[issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds

2017-07-22 Thread Larry Hastings

Larry Hastings added the comment:


New changeset 3b3a5a5b70dc468dcfacb17a3d6b342820b480ff by larryhastings (Ned 
Deily) in branch '3.4':
bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2724)
https://github.com/python/cpython/commit/3b3a5a5b70dc468dcfacb17a3d6b342820b480ff


--

___
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-22 Thread Larry Hastings

Larry Hastings added the comment:


New changeset b1549175ed30f2931e2bb980a7e3c360ed19e1c9 by larryhastings (Victor 
Stinner) in branch '3.4':
[3.4] Backport CI config from master (#2475)
https://github.com/python/cpython/commit/b1549175ed30f2931e2bb980a7e3c360ed19e1c9


--

___
Python tracker 

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



[issue30231] test_imaplib needs a TLS server accepting self-signed certificates

2017-07-22 Thread Larry Hastings

Larry Hastings added the comment:


New changeset b1549175ed30f2931e2bb980a7e3c360ed19e1c9 by larryhastings (Victor 
Stinner) in branch '3.4':
[3.4] Backport CI config from master (#2475)
https://github.com/python/cpython/commit/b1549175ed30f2931e2bb980a7e3c360ed19e1c9


--
nosy: +larry

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +2869

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-07-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
dependencies: +IDLE: Document and fix configdialog font tests.

___
Python tracker 

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



[issue30981] IDLE: Test config dialog font bold button and sample change

2017-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Followup issue is #30993.

--
nosy:  -haypo

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2017-07-22 Thread Lele Gaifax

Lele Gaifax added the comment:

Monthly offer to do whatever is needed to easy the path to adoption :-)

--

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems this isn't reproducible with 3.3.

--
priority: release blocker -> normal
status: open -> closed

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests:  -953

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2017-07-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2870

___
Python tracker 

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



[issue30576] http.server should support HTTP compression (gzip)

2017-07-22 Thread Pierre Quentel

Pierre Quentel added the comment:

Thank you Terry and Victor for your comments. I understand that you agree on 
adding HTTP compression to http.server, but don't want it to be enabled by 
default.

@terry.reedy

With the implementation proposed in the Pull Request, to disable compression by 
default, all it takes is to set the attribute 
SimpleHTTPRequestHandler.compressed_types to the empty list.

Users who want to enable compression for some types would create subclasses of 
Simple... that set compressed_types. For instance :

import http.server

class CompressedHandler(http.server.SimpleHTTPRequestHandler):

compressed_types = ["text/html", "text/plain"]

http.server.test(HandlerClass=CompressedHandler)


Would that be ok ?

For a command line argument --gzip, compressed_types could be set to a list of 
commonly compressed types - I don't think we want to pass a list of types on 
the command line.

For CGI scripts, I may be missing something but for me it is up to the script 
to determine the response headers and content, I don't think a mixin class in 
http.server could help.

@haypo

I fully agree on your comment about content-length, the implementation in the 
PR is not optimal.

The alternative would be to send the answer using chunked transfer encoding, 
which is currently not used in http.server, and would also be relevant for 
other use cases than gzipped files. It shouldn't be difficult to add, and I 
volunteer to propose an implementation, but it's yet another feature to add to 
the server. Do you think it's relevant ?

--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue28965] Multiprocessing spawn/forkserver fails to pass Queues

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, this is really an error in your script.  If you add `p.join()` to wait for 
the process to end, you'll see no error pops up.  What really happens is that 
the parent process ends before the child is fully started, and the resource 
underlying the queue is cleaned up at this point.

--
nosy: +pitrou

___
Python tracker 

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



[issue28965] Multiprocessing spawn/forkserver fails to pass Queues

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

More exactly, since the child process is not "daemonic", the parent process 
waits for it to end, but after collecting the queue's resources.

--

___
Python tracker 

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



[issue28965] Multiprocessing spawn/forkserver fails to pass Queues

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

So, while it might be possible to improve on this, it would risk fragilizing 
other use cases, and besides, this is not a problem that is likely to happen in 
real usage.  Therefore, I'd rather close this issue.

--
resolution:  -> wont fix
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



[issue30576] http.server should support HTTP compression (gzip)

2017-07-22 Thread Christian Heimes

Christian Heimes added the comment:

I share RDM's sentiment and I'm not keen to add more complexity.

The http.server module in Python's stdlib is a useful example implementation of 
a simple HTTP server. I'd rather keep it simple and see a full featured HTTP 
server on PyPI. These days we don't have to include all batteries in Python's 
standard library. PyPI and pip made it super easy to install additional 
packages.

I might be convinced to add transparent gzip compression if it is done 
properly. A temporary file, compress-than-send, and whole content handling 
(content-length) are all wrong. Your current implementation will result in at 
least one CVE and a bunch of mails to Python security mailing list. Transparent 
compression must use chunked encoding with a small in-memory buffer instead of 
a file and zlib.compressobj() instead of gzip.GzipFile.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue28382] Possible deadlock on sys.stdout/stderr when combining multiprocessing with threads

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, after a bit of diagnosing, the issue is combining multi-threading with use 
of fork().  The problem is file objects (such as sys.stdout) have locks but 
those locks may be taken at the exact point where fork() happens, in which case 
the child will block when trying to take the lock again.

This is mostly a duplicate of issue 6721, but perhaps multiprocessing could at 
least improve things for sys.stdout and sys.stderr (though I'm not sure how).

This is also compounded by the fact that Process._bootstrap() flushed the 
standard streams at the end.

--
nosy: +davin, pitrou
title: Possible deadlock after many multiprocessing.Process are launch -> 
Possible deadlock on sys.stdout/stderr when combining multiprocessing with 
threads
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



[issue27833] Process is locked when try to execute Queue.put() inside

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed the simple solution here is to consume items in the queue before trying 
to join the process.

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

___
Python tracker 

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



[issue26692] cgroups support in multiprocessing

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +neologix, pitrou

___
Python tracker 

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



[issue26692] cgroups support in multiprocessing

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue26762] test_multiprocessing_spawn leaves processes running in background

2017-07-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm not able to reproduce.  Can you try again with latest master?

--
nosy: +pitrou

___
Python tracker 

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



[issue17140] Document multiprocessing.pool.ThreadPool

2017-07-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Patch ready for test on linux and review.

--
nosy: +csabella, louielu

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2871

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2017-07-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> The copying approach likely won't work ...

Then it seems like just adding a note to the docs is the way to go. That's 
probably okay though.  I don't think we've every gotten much benefit from the 
programmatic deprecation warnings.

--

___
Python tracker 

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



[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-22 Thread Nir Soffer

New submission from Nir Soffer:

Asyncore is not thread safe, and cannot be called from multiple threads. Hence 
it does not need to copy the socket_map when preparing for poll or
select.

The copy was introduced in:

commit d74900ebb5a22b387b49684990da1925e1d6bdc9
Author: Josiah Carlson 
Date:   Mon Jul 7 04:15:08 2008 +

Committing Py3k version of changelist 64080 and 64257, along with updated 
tests
for smtpd, which required updating with the new semantics.

This is a huge patch, looks like port of asyncore to python 3, trying to 
keep the behavior of the python 2 code.

Converting map.items() to list(map.items()) is correct, but on python 3 we
can take advantage of the fact that items() does not copy anything.

--
components: Library (Lib)
messages: 298880
nosy: Nir Soffer, giampaolo.rodola, haypo
priority: normal
severity: normal
status: open
title: Asyncore does not need to copy map.items() before polling
versions: Python 2.7, 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



[issue12528] Implement configurable bitfield allocation strategy

2017-07-22 Thread Charles Machalow

Charles Machalow added the comment:

Was browsing and found this.

This option would be very useful as it could help avoid a current bug I've had 
to deal with : https://bugs.python.org/issue29753. My use case works with 
data/structs from another device all-together, so I can't control it's packing. 
However since GCC/Linux builds currently have the specified bug, I can't get 
around it. This option would have allowed me to just specify the MSVC strategy, 
which in general is what I want to not have to have OS-specific behavior. With 
the bug in mind, this could have almost be a bug-workaround for me.

--
nosy: +Charles Machalow

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Works on linux.  I just had one question on github about a test for sizelist 
and moving the initialization of the Tk variables into setUp.

I also deleted a second comment that was just a wrong comment, but it's led me 
to another question.

For test_indent_scale, you have the widget test and the `changes` test in the 
same place.  I know you mentioned that you had thought about this before, but 
now that you have the widget tests for the font name, font bold, (and soon) 
font size, would there be any reason to split the test_font_set tests into the 
same place where each of the widgets is tested?  That way, all the pieces of 
the graph flow would be in one place for each widget/Tk Variable/trace function.

--

___
Python tracker 

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



[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-22 Thread Nir Soffer

Changes by Nir Soffer :


--
pull_requests: +2872

___
Python tracker 

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



[issue30995] Support logging.getLogger(style='{')

2017-07-22 Thread Mitar

New submission from Mitar:

Currently, using non-legacy formatting in logging message is really cumbersome. 
I think a new style could be supported much easier using the following:

logger = logging.getLogger(style='{')
logger.misc('User {} logged in', username}

This is both backwards compatible, and does not interfere with 3rd party 
packages which might use a different logger with different style. You only have 
to make sure they do not use this logger without knowing about new format, 
which can be done in various ways (like prefixing the name of the logger, for 
example).

See https://bugs.python.org/issue14031 for more information, where this has 
also been proposed but not really commented upon.

--
components: Library (Lib)
messages: 298883
nosy: mitar
priority: normal
severity: normal
status: open
title: Support logging.getLogger(style='{')
type: enhancement
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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am thinking that the tab title should be 'Font/Indent' rather than 
'Font/Tabs' to avoid the confusion between the simulated file-folder tab that 
we click on and the tab key that indents. Opinions?

But maybe the indent widget will be moved, eliminating the issue, or maybe more 
will be added, as part of converting 'extensions' to features, requiring a 
different rename.  'Reformat paragraph, also affect text layout.

--

___
Python tracker 

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



[issue30222] make_zip.py had a bug when setting up full 64 bit distribution.

2017-07-22 Thread Steve Dower

Steve Dower added the comment:

That's the PR I meant (on phone today, so navigating gh is out). If you look 
through history you'll see it's mostly a revert of a revert, at least for that 
script.

--

___
Python tracker 

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



[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This issue is really about managing the set of var,callback pairs. The idea of 
wrapping vars just clouded the issue.  

class VarTrace:
def __init__(self):
self.tracers = []  # or set if need to delete
def add(self, var, callback):
if isinstance(callback, tuple):
callback = self.make_callback(var, callback)
self.vartrace.add((var, callback))
return var
def make_callback(self, var, args):  # Used for 6 vars.
def var_callback(*params):
changes.add_item(*args, var.get())
return var_callback
def attach(self):
for var, callback in self.tracers:
var.trace_add('write', callback)
def remove(cls):  # detach?
for var, _ in self.tracers:
var.trace_remove('write', var.trace_info()[0][1]) # doc this

# A functionalist would define a function that returns a sequence of closures.

tracers = VarTrace()

# write tests, then patch creation of tested vars, retest, patch rest.

-self.font_name = StringVar(parent)
+self.font_name = tracers.add(StringVar(parent), var_changed_font)

--
nosy: +csabella
title: IDLE: configdialog -- factor out Variable subclass -> IDLE: configdialog 
-- factor out Tracer subclass

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2017-07-22 Thread Guido van Rossum

Guido van Rossum added the comment:

I think it's not worth the hack that Serhiy suggests. But we should make
some noise around this change in the 3.7 announcement.

--

___
Python tracker 

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




[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yes, test_font_set could be split up.  But then the setup would have to be 
repeated for each, and it would be harder to verify that each .set() call was 
being tested the same way.  

The event graph for indent_scale is a simple linear chain, and the simple liner 
test mirrors that.

The combined test of bold_toggle and set_samples is not what I wanted, but I 
prefer it to the alternative of depending on an undocumented internal detail of 
the tcl wrapper maker (_tkinter, I suspect).

--

___
Python tracker 

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



[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2017-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in 
branch '3.5':
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30876] SystemError on importing module from unloaded package

2017-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in 
branch '3.5':
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae


--

___
Python tracker 

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



[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-22 Thread Kevin williams

Changes by Kevin williams :


--
nosy:  -Nir Soffer, giampaolo.rodola, haypo

___
Python tracker 

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



[issue26367] importlib.__import__ does not fail for invalid relative import

2017-07-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in 
branch '3.5':
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae


--
nosy: +serhiy.storchaka

___
Python tracker 

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