[issue32657] Mutable Objects in SMTP send_message Signature

2018-01-25 Thread Chason Chaffin

Chason Chaffin  added the comment:

I'm writing a PR for this right now. Is it worth it to write a test to make 
sure that mail_options isn't being mutated or is it enough just to update the 
code to use non-mutable defaults? Interesting side effect of looking into this 
is #32663 where I found the tests for the UTF8 code weren't being run.

--

___
Python tracker 

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



[issue32640] Python 2.7 str.join documentation is incorrect

2018-01-25 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

GH-5333 clarifies that str.join can return a Unicode object if iterable 
contains a Unicode object, and that it will raise TypeError if there is any non 
string or non unicode object.

--

___
Python tracker 

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



[issue32640] Python 2.7 str.join documentation is incorrect

2018-01-25 Thread Mariatta Wijaya

Change by Mariatta Wijaya :


--
keywords: +patch
pull_requests: +5179
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



[issue32672] .then execution of actions following a future's completion

2018-01-25 Thread R. David Murray

R. David Murray  added the comment:

I think this requires a discussion on the python-ideas mailing list, since API 
changes to Future need consideration in the asyncio context as well.

--
components: +Library (Lib) -Interpreter Core
nosy: +r.david.murray
type:  -> enhancement
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue29237] Create enum for pstats sorting options

2018-01-25 Thread Ethan Furman

Ethan Furman  added the comment:


New changeset 863b1e4d0e95036bca4e97c1b8b2ca72c19790fb by Ethan Furman 
(mwidjaja) in branch 'master':
bpo-29237: Create enum for pstats sorting options (GH-5103)
https://github.com/python/cpython/commit/863b1e4d0e95036bca4e97c1b8b2ca72c19790fb


--

___
Python tracker 

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



[issue32673] update tutorial dict part to reflect dict is ordered

2018-01-25 Thread Xiang Zhang

New submission from Xiang Zhang :

Ordered builtin dict is the rule in 3.7, the tutorial part about dict[1] needs 
updating.

[1] https://docs.python.org/3.7/tutorial/datastructures.html#dictionaries

--
assignee: docs@python
components: Documentation
messages: 310737
nosy: docs@python, xiang.zhang
priority: normal
severity: normal
stage: needs patch
status: open
title: update tutorial dict part to reflect dict is ordered
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



[issue27931] Email parse IndexError <""@wiarcom.com>

2018-01-25 Thread Xiang Zhang

Change by Xiang Zhang :


--
type:  -> behavior
versions: +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



[issue32674] minor documentation fix for '__import__'

2018-01-25 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

minor documentation?

I don't understand, the documentation of __import__ is well done, could you 
explain ?

https://docs.python.org/3/library/functions.html#__import__

thank you

--
nosy: +matrixise

___
Python tracker 

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



[issue32571] Speed up and clean up getting optional attributes in C code

2018-01-25 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset e76daebc0c8afa3981a4c5a8b54537f756e805de by INADA Naoki in branch 
'master':
bpo-32571: Fix reading uninitialized memory (GH-5332)
https://github.com/python/cpython/commit/e76daebc0c8afa3981a4c5a8b54537f756e805de


--

___
Python tracker 

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



[issue32673] update tutorial dict part to reflect dict is ordered

2018-01-25 Thread Xiang Zhang

Xiang Zhang  added the comment:

Thanks for reminding, Martin.

--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Dict order is now guaranteed, so add tests and doc for it

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2018-01-25 Thread Dean Liao

Dean Liao  added the comment:

I planned to upgrade Chromium OS's mock module to 2.0.0. I also encountered the 
issue that classmethod cannot be patched as callable mock.

Reviewers, can we start the review process?

--
nosy: +deanliao

___
Python tracker 

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



[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Right, I *knew* I should be nervous about calling into Python from a C-level 
destructor... what's happening is:

- Somehow, that coroutine object is managing to survive until the very, very 
end of the shutdown sequence (PyImport_Cleanup). I'm not sure how exactly; Yury 
suspects it somehow involves _asynciomodule.c holding a reference.

- At the very end of PyImport_Cleanup, there's a final call to the cycle 
collector, which destroys the coroutine object

- _PyGen_Finalize notices it's unawaited, and calls 
_PyErr_WarnUnawaitedCoroutine

- _PyErr_WarnUnawaitedCoroutine attempts to call 
warnings._warn_unawaited_coroutine, in a very careful and defensive manner

- But it doesn't matter how careful and defensive you are, because at this 
stage in the shutdown, we have sys.module = None, which freaks out the import 
system so badly that when we try to look up the warnings module, it doesn't 
even raise an error, it just abort()s the whole interpreter.

We can get a similar crash by doing:

import sys
async def f(): pass
sys.corocycle = [f]
sys.corocycle.append(sys.corocycle)

If you run the same code on 3.6, then it gets collected at the same time, and 
it issues a warning using the regular PyErr_WarnEx. It turns out that code is 
even *more* careful and defensive and notices that the interpreter is being 
shutdown, so it just skips printing the warning entirely.

I guess what we have to do is add a similar check to 
_PyErr_WarnUnawaitedCoroutine.

You can imagine how excited I am that I started working on this patch so I 
could make sure people get more reliable notice of unawaited coroutines 
(bpo-30491), and not only has that been rejected, but now I'm writing code to 
explicitly hide unawaited coroutine warnings. Just saying'...

--

___
Python tracker 

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



[issue32674] minor documentation fix for '__import__'

2018-01-25 Thread Qian Yun

Qian Yun  added the comment:

Sorry, a typo, it's "minor documentation fix".

See https://github.com/python/cpython/pull/5339

diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index d8971bef2a..80b4f9447c 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -317,7 +317,7 @@ PyDoc_STRVAR(import_doc,
 "__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module\n\
 \n\
 Import a module. Because this function is meant for use by the Python\n\
-interpreter and not for general use it is better to use\n\
+interpreter and not for general use, it is better to use\n\
 importlib.import_module() to programmatically import a module.\n\
 \n\
 The globals argument is only used to determine the context;\n\
@@ -326,8 +326,8 @@ should be a list of names to emulate ``from name import 
...'', or an\n\
 empty list to emulate ``import name''.\n\
 When importing a module from a package, note that __import__('A.B', ...)\n\
 returns package A when fromlist is empty, but its submodule B when\n\
-fromlist is not empty.  Level is used to determine whether to perform \n\
-absolute or relative imports. 0 is absolute while a positive number\n\
+fromlist is not empty.  The level argument is used to determine whether to\n\
+perform absolute or relative imports, 0 is absolute while a positive number\n\
 is the number of parent directories to search relative to the current 
module.");

--

___
Python tracker 

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



[issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code

2018-01-25 Thread bbayles

Change by bbayles :


--
pull_requests: +5175

___
Python tracker 

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



[issue31972] Inherited docstrings for pathlib classes are confusing

2018-01-25 Thread Chason Chaffin

Change by Chason Chaffin :


--
nosy: +chason

___
Python tracker 

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



[issue2793] Dictionary fails to index when adding list when in a deeply nested loop

2018-01-25 Thread Jay Yin

Change by Jay Yin :


--
pull_requests: +5177

___
Python tracker 

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



[issue32674] minor documentation fix for '__import__'

2018-01-25 Thread Qian Yun

New submission from Qian Yun :

This is a minor documentation for builtin function '__import__'.

--
assignee: docs@python
components: Documentation
messages: 310741
nosy: Qian Yun, docs@python
priority: normal
severity: normal
status: open
title: minor documentation fix for '__import__'
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



[issue32674] minor documentation fix for '__import__'

2018-01-25 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Don't worry, but in fact, I did not understand because when you post
your issue, there was no associated PR.

Now, I do understand.

Thank you

--

___
Python tracker 

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



[issue27931] Email parse IndexError <""@wiarcom.com>

2018-01-25 Thread Jay Yin

Change by Jay Yin :


--
pull_requests: +5174
stage: commit review -> patch review

___
Python tracker 

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



[issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code

2018-01-25 Thread bbayles

Change by bbayles :


--
pull_requests: +5176

___
Python tracker 

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



[issue32672] .then execution of actions following a future's completion

2018-01-25 Thread dancollins34

Change by dancollins34 :


--
keywords: +patch
pull_requests: +5182
stage:  -> patch review

___
Python tracker 

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



[issue32657] Mutable Objects in SMTP send_message Signature

2018-01-25 Thread Chason Chaffin

Chason Chaffin  added the comment:

> It's probably enough to fix it.  I fear that if we also change them in 
> sendmail we'll break someone's code, but maybe we should do that anyway, for 
> 3.7 only.

Should I make a separate issue for that, or attach it to this PR?

--

___
Python tracker 

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



[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

Maybe it's better to roll this back and take a deep breath. The feature freeze 
should not be treated as an excuse to cram in things at the last minute. Before 
this week I had never heard of this proposal. And the sarcasm is a bad start of 
your stint as a core dev, Nathaniel.

--

___
Python tracker 

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



[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 4112c5b97d9c1c7b034653d0e017ffa894a45c74 by Yury Selivanov in 
branch 'master':
bpo-32662: Try making test_asyncio.test_server more reliable (#5338)
https://github.com/python/cpython/commit/4112c5b97d9c1c7b034653d0e017ffa894a45c74


--

___
Python tracker 

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



[issue32596] Lazy import concurrent.futures.process and thread

2018-01-25 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 4666ec597c38eea06a22bcfb4157d92a0abf891c by INADA Naoki in branch 
'master':
bpo-32596: Make lazy-load portable (GH-5316)
https://github.com/python/cpython/commit/4666ec597c38eea06a22bcfb4157d92a0abf891c


--

___
Python tracker 

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



[issue29237] Create enum for pstats sorting options

2018-01-25 Thread Ethan Furman

Change by Ethan Furman :


--
pull_requests: +5183

___
Python tracker 

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



[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue32657] Mutable Objects in SMTP send_message Signature

2018-01-25 Thread Chason Chaffin

Change by Chason Chaffin :


--
keywords: +patch
pull_requests: +5180
stage:  -> patch review

___
Python tracker 

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



[issue32672] .then execution of actions following a future's completion

2018-01-25 Thread dancollins34

New submission from dancollins34 :

To my knowledge, python currently has no capability to chain future execution, 
requiring another future to begin executing with the result from the first.

I have submitted a pr to enable this functionality with a .then(self, fn) 
method on the concurrent.futures.Future object.

-dancollins34

--
components: Interpreter Core
messages: 310730
nosy: dancollins34
priority: normal
pull_requests: 5181
severity: normal
status: open
title: .then execution of actions following a future's completion
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



[issue32672] .then execution of actions following a future's completion

2018-01-25 Thread dancollins34

dancollins34  added the comment:

Okay, I'll post something.

--

___
Python tracker 

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



[issue32674] minor documentation fix for '__import__'

2018-01-25 Thread Qian Yun

Change by Qian Yun :


--
keywords: +patch
pull_requests: +5186
stage:  -> patch review

___
Python tracker 

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



[issue32673] update tutorial dict part to reflect dict is ordered

2018-01-25 Thread Martin Panter

Martin Panter  added the comment:

See Issue 32337

--
nosy: +martin.panter

___
Python tracker 

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



[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

The following snippet crashes with SIGABRT:

import asyncio
async def f(): pass
asyncio.gather(f())

llvm tells that the crash is in _PyGen_Finalize/_PyErr_WarnUnawaitedCoroutine

--

___
Python tracker 

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



[issue32571] Speed up and clean up getting optional attributes in C code

2018-01-25 Thread INADA Naoki

Change by INADA Naoki :


--
pull_requests: +5178

___
Python tracker 

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



[issue32657] Mutable Objects in SMTP send_message Signature

2018-01-25 Thread R. David Murray

R. David Murray  added the comment:

It's probably enough to fix it.  I fear that if we also change them in sendmail 
we'll break someone's code, but maybe we should do that anyway, for 3.7 only.

--
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.8

___
Python tracker 

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



[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-01-25 Thread Nathaniel Smith

Change by Nathaniel Smith :


--
pull_requests: +5184
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



[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5185

___
Python tracker 

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



[issue32673] update tutorial dict part to reflect dict is ordered

2018-01-25 Thread Chason Chaffin

Change by Chason Chaffin :


--
nosy: +chason

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

You guys both need to calm down.

Stefan, what's your objection against this, assuming the crash is fixed?

--

___
Python tracker 

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



[issue32571] Speed up and clean up getting optional attributes in C code

2018-01-25 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset f320be77ffb73e3b9e7fc98c37b8df3975d84b40 by INADA Naoki (Serhiy 
Storchaka) in branch 'master':
 bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code 
(GH-5222)
https://github.com/python/cpython/commit/f320be77ffb73e3b9e7fc98c37b8df3975d84b40


--

___
Python tracker 

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



[issue29708] support reproducible Python builds

2018-01-25 Thread Alexandru Ardelean

Alexandru Ardelean  added the comment:

Hey,

Sorry, if I'm a bit late to the party with this.
The road to reproducible builds has a few more steps.

The way I validate whether Python is reproducible is with this link:
https://tests.reproducible-builds.org/lede/lede_ar71xx.html

There is a need to also patch getbuildinfo.c to make Python reproducible.

I have opened a PR for this : https://github.com/python/cpython/pull/5313

I've waited for the periodic build to trigger on that reproducible page.
In OpenWrt, the packages to look for [that is affected by this getbuildinfo.c 
patch] are python-base & python3-base.

There are still some python3 packages that need patching.
Seems that python3-asyncio, pydoc, and some other pyc files need investigation.
I'll check.
Maybe this isn't an issue in 3.7.

Alex

--

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Hunting reference leaks with "./python -m test -R 3:3 test_datetime" crashs 
since the commit 04af5b1ba9eb546a29735fac6cb5298159069b53.

***
vstinner@apu$ ./python -m test -R 3:3 test_datetime 
Run tests sequentially
0:00:00 load avg: 1.05 [1/1] test_datetime
beginning 6 repetitions
123456
Fatal Python error: Segmentation fault

Current thread 0x7ff71fe33040 (most recent call first):
  File "/home/vstinner/prog/python/master/Lib/test/datetimetester.py", line 
5464 in test_utc_capi
  (...)
Segmentation fault (core dumped)
***

Shorter example without -R, just run the same test twice:
***
vstinner@apu$ ./python -m test -v test_datetime test_datetime -m test_utc_capi
== CPython 3.7.0a4+ (heads/master:cab0b2b053, Jan 25 2018, 09:06:01) [GCC 7.2.1 
20170915 (Red Hat 7.2.1-2)]
== Linux-4.14.13-300.fc27.x86_64-x86_64-with-fedora-27-Twenty_Seven 
little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_26308
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 1.26 [1/2] test_datetime
test_utc_capi (test.datetimetester.CapiTest_Pure) ... skipped 'Not relevant in 
pure Python'
test_utc_capi (test.datetimetester.CapiTest_Fast) ... ok

--
Ran 2 tests in 0.001s

OK (skipped=1)
0:00:00 load avg: 1.26 [2/2] test_datetime
test_utc_capi (test.datetimetester.CapiTest_Pure) ... skipped 'Not relevant in 
pure Python'
test_utc_capi (test.datetimetester.CapiTest_Fast) ... Fatal Python error: 
Segmentation fault

Current thread 0x7f9836b31040 (most recent call first):
  File "/home/vstinner/prog/python/master/Lib/test/datetimetester.py", line 
5464 in test_utc_capi
  (...)
Segmentation fault (core dumped)
***

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

___
Python tracker 

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



[issue32652] test_distutils: BuildRpmTestCase tests fail on RHEL buildbots

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 2b822a0bb1de2612c85d8f75e3ce89eda2ac9f68 by Victor Stinner in 
branch 'master':
bpo-32652: Defer pymain_set_global_config() call (#5303)
https://github.com/python/cpython/commit/2b822a0bb1de2612c85d8f75e3ce89eda2ac9f68


--

___
Python tracker 

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



[issue32663] SMTPUTF8SimTests are not actually being run

2018-01-25 Thread Chason Chaffin

New submission from Chason Chaffin :

In the tests for smtplib, the suite of tests for SMTPUTF8SimTests (added by 
issue 24218)  are not actually being run. This is troublesome in particular, 
because the test test_send_message_error_on_non_ascii_addrs_if_no_smtputf8 
calls assertRaises incorrectly and thus fails.

--
components: Tests
messages: 310664
nosy: chason
priority: normal
severity: normal
status: open
title: SMTPUTF8SimTests are not actually being run
type: behavior

___
Python tracker 

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



[issue32664] Connector "|" missing between ImportError and LookupError

2018-01-25 Thread Richard Neumann

New submission from Richard Neumann :

In the documentation of the built-in exceptions hierarchy, there is a "|" 
missing connecting ImportError and LookupError.

https://docs.python.org/3/library/exceptions.html#exception-hierarchy

>From LookupError.__mro__ we can tell, that it is actually derived from 
>Exception, thus there should be a "|" connecting it to the hierarchy under 
>Exception to emphasize that (like between ArithmeticError and AssertionError).

--
assignee: docs@python
components: Documentation
messages: 310666
nosy: Richard Neumann, docs@python
priority: normal
severity: normal
status: open
title: Connector "|"  missing between ImportError and LookupError
type: enhancement
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



[issue27505] Missing documentation for setting module __class__ attribute

2018-01-25 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +5165
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



[issue32668] deepcopy() fails on ArgumentParser instances

2018-01-25 Thread Martin Kolman

New submission from Martin Kolman :

We (the Anaconda OS intaller team) are in the process of switching to a new 
version of a library (Pykickstart), which among other things switched from 
using optparse to argparse. And during this endeavour we found that it's 
apparently not possible to deepcopy ArgumentParser instances:


$ ipython3
Python 3.6.3 (default, Oct  9 2017, 12:07:10) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import argparse

In [2]: from copy import deepcopy

In [3]: parser = argparse.ArgumentParser()

In [4]: deepcopy(parser)
---
TypeError Traceback (most recent call last)
 in ()
> 1 deepcopy(parser)

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181 
182 # If is its own copy, don't memoize.

/usr/lib64/python3.6/copy.py in _reconstruct(x, memo, func, args, state, 
listiter, dictiter, deepcopy)
278 if state is not None:
279 if deep:
--> 280 state = deepcopy(state, memo)
281 if hasattr(y, '__setstate__'):
282 y.__setstate__(state)

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:

/usr/lib64/python3.6/copy.py in _deepcopy_dict(x, memo, deepcopy)
238 memo[id(x)] = y
239 for key, value in x.items():
--> 240 y[deepcopy(key, memo)] = deepcopy(value, memo)
241 return y
242 d[dict] = _deepcopy_dict

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:

/usr/lib64/python3.6/copy.py in _deepcopy_list(x, memo, deepcopy)
213 append = y.append
214 for a in x:
--> 215 append(deepcopy(a, memo))
216 return y
217 d[list] = _deepcopy_list

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181 
182 # If is its own copy, don't memoize.

/usr/lib64/python3.6/copy.py in _reconstruct(x, memo, func, args, state, 
listiter, dictiter, deepcopy)
278 if state is not None:
279 if deep:
--> 280 state = deepcopy(state, memo)
281 if hasattr(y, '__setstate__'):
282 y.__setstate__(state)

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:

/usr/lib64/python3.6/copy.py in _deepcopy_dict(x, memo, deepcopy)
238 memo[id(x)] = y
239 for key, value in x.items():
--> 240 y[deepcopy(key, memo)] = deepcopy(value, memo)
241 return y
242 d[dict] = _deepcopy_dict

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
178 y = x
179 else:
--> 180 y = _reconstruct(x, memo, *rv)
181 
182 # If is its own copy, don't memoize.

/usr/lib64/python3.6/copy.py in _reconstruct(x, memo, func, args, state, 
listiter, dictiter, deepcopy)
278 if state is not None:
279 if deep:
--> 280 state = deepcopy(state, memo)
281 if hasattr(y, '__setstate__'):
282 y.__setstate__(state)

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
148 copier = _deepcopy_dispatch.get(cls)
149 if copier:
--> 150 y = copier(x, memo)
151 else:
152 try:

/usr/lib64/python3.6/copy.py in _deepcopy_dict(x, memo, deepcopy)
238 memo[id(x)] = y
239 for key, value in x.items():
--> 240 y[deepcopy(key, memo)] = deepcopy(value, memo)
241 return y
242 d[dict] = _deepcopy_dict

/usr/lib64/python3.6/copy.py in deepcopy(x, memo, _nil)
159 copier = getattr(x, "__deepcopy__", None)
160 if copier:
--> 161 y = copier(memo)
162 else:
163 reductor = dispatch_table.get(cls)

TypeError: cannot deepcopy this pattern object


This should either be fixed or documented in proper places (the argparse 
documentation does not mention any pottential deepcopy issues as far as we can 
tell).

--
components: Library (Lib)
messages: 310686
nosy: mkolman
priority: normal
severity: normal
status: open
title: deepcopy() fails on ArgumentParser instances
type: crash
versions: Python 3.6

___

[issue32657] Mutable Objects in SMTP send_message Signature

2018-01-25 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

On Thu, Jan 25, 2018 at 02:28:17PM +, R. David Murray wrote:

> obviously I missed that mutation of the value 
> in the code review of the patch that added those lines :(

The docstring for send_message does say 

If the sender or any of the recipient addresses contain non-ASCII
and the server advertises the SMTPUTF8 capability, the policy is
cloned with utf8 set to True for the serialization, and SMTPUTF8
and BODY=8BITMIME are asserted on the send.

which I don't really understand, but I thought that perhaps it was a 
typo for *inserted* on the send, in the sense of inserted into the mail 
options:

mail_options += ['SMTPUTF8', 'BODY=8BITMIME']

So are we agreed this is a bug? What about the default for rcpt_options 
being a dict?

--

___
Python tracker 

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



[issue27505] Missing documentation for setting module __class__ attribute

2018-01-25 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +5166

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

I wrote PR 5305 for Paul Peny who uses cheap devices (less than 50$, maybe less 
20$? I'm not sure) for development, but these devices use old Android versions.

It seems like some people are exchanging patches, in private or in public, for 
Android API 19. My intent is to make patches upstream, especially small patches 
which fix compilation of Python on Android API 19.

I'm not sure that we should support API 19.

Xavier de Gaye wants to focus on the future, support API 24 and newer:
https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst

His document gives many good reasons to not support API < 24.

My intent is not to "fully support" Python on Android API 19. Just to make sure 
that we can compile Python and that python3 -c pass doesn't crash :-) So only 
merge the most critical fixes for API 19.

IMHO merging further changes to fix other Python functions should be discussed 
on a case by base basis.

--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread Ned Deily

Ned Deily  added the comment:

I don't think we should be adding this platform-version-specific code unless we 
are going to fully support that particular platform and version.  That means at 
a minimum adding a buildbot for it and then having a core developer signed up 
to maintain the platform version.  It's not fair to other code developers and 
to downstream users to falsely imply that we support something that we are not 
set up to support, especially an already out-of-date version when we don't yet 
support any version of Android.  We will end up with another support headache 
as has been the case with other non-mainstream (with regard to Python) 
platforms.

--
nosy: +ned.deily

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, PR 5317 title mentionned this bpo number, but the merged change omits the 
bpo number and so wasn't mentioned on this issue.

PR 5317 added:

commit 58dc03c737a71de93edef7723c9f6186116288ef (upstream/master, master)
Author: Paul Ganssle 
Date:   Thu Jan 25 08:58:07 2018 -0500

Cleanup dangling reference in get_timezone_utc_capi (#5317)

--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread pmpp

pmpp  added the comment:

Thanks ! I tested your PR it just built out of the box with the help of a one 
line change to Xavier de Gaye's android build support tool ( configure-android 
script + Android folder from bpo-30386 ). 

I'll forward to you the result of testsuite on a $10 Arm cortex-a7 board 
running Android kitkat 4.4.2 ( H3droid ) as soon as it finishes as i run a 
testbot on it.

My point of view is that "out of date" doesn't mean people don't actually *use* 
it : vstinner is indeed right , vendors provides almost no updates for hardware 
which actually can live long and have the power of some low power i** cpu but 
without the actual drawbacks we heard about recently.

--

___
Python tracker 

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



[issue32640] Python 2.7 str.join documentation is incorrect

2018-01-25 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Oops.
Thanks, I will work on reverting the change later today.

--
assignee: docs@python -> Mariatta

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

I discussed with Jay Yin on IRC and we understood the issue on his setup: the 
last entry of his PATH environment variable is a path to an existing *file*, 
not a directory.

In this case, subprocess.Popen() fails with ENOTDIR if the program cannot be 
found in any other directory of the PATH.

Copy of _posixmodule.c:
---
/* This loop matches the Lib/os.py _execvpe()'s PATH search when */
/* given the executable_list generated by Lib/subprocess.py. */
saved_errno = 0;
for (i = 0; exec_array[i] != NULL; ++i) {
const char *executable = exec_array[i];
if (envp) {
execve(executable, argv, envp);
} else {
execv(executable, argv);
}
if (errno != ENOENT && errno != ENOTDIR && saved_errno == 0) {
saved_errno = errno;
}
}
/* Report the first exec error, not the last. */
if (saved_errno)
errno = saved_errno;
---

If the first execv() calls with ENOENT and the last one fails with ENOTDIR, the 
function fails with ENOTDIR.

--
nosy: +vstinner
title: Failing test_dtrace and test_subprocess on Ubuntu 16.04 on master -> 
test_subprocess and test_dtrace fails if the last entry of $PATH is a file

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +5167
stage:  -> patch review

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

Agree with Ned Deily here. If CPython is going to be support android-19, it's 
better to fully support it. I'm optimistic here - I believe there won't be many 
android-19-specific patches beyond locale-related ones. Once android-24 is 
done, we can revisit this part and see how many patches are needed.

--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Attached PR 5322 fixes the issue.

Example to reproduce the bug:

$ touch file
$ PATH=$PATH:$PWD/file ./python -m test test_subprocess -m test_invalid_args -v
(...)
==
ERROR: test_invalid_args (test.test_subprocess.ContextManagerTests)
--
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_subprocess.py", line 
3050, in test_invalid_args
stderr=subprocess.PIPE) as proc:
  File "/home/vstinner/prog/python/master/Lib/subprocess.py", line 743, in 
__init__
restore_signals, start_new_session)
  File "/home/vstinner/prog/python/master/Lib/subprocess.py", line 1431, in 
_execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'nonexisting_i_hope'
(...)


With PR 5322 applied, the whole Python test suite pass with 
PATH=$PATH:$PWD/file.

--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Ned Deily: "I don't think we should be adding this platform-version-specific 
code unless we are going to fully support that particular platform and version."

I know the theory and I know the practice :-)

I started to list platforms that are "supported" by Python, with various 
support levels:
http://vstinner.readthedocs.io/cpython.html#supported-platforms

For example, Linux has an excellent support, whereas OpenBSD is more on the 
"best effort" side. "grep OpenBSD" in CPython shows me at least 51 lines of 
code, whereas OpenBSD has no buildbot and no dedicated developer to handle 
OpenBSD specific issues. For example, test_crypt is broken since at least 2 
years on OpenBSD, as many test_socket tests.

For OpenBSD, IMHO it's ok to have a best effort support, basically apply 
proposed patches.

For Android, the situation is somehow different. There are more and more people 
working on supporting officially Python on Android, like Xavier de Gaye and me 
who are core developers. Xavier is working on that for 2 years, and IMHO the 
port is done at 95%. The last part is just to setup a buildbot for Android API 
24.

The question is the added maintenance cost of Android API 19 #ifdef code, 
compared to pain of building Python on Android.

Technically, it should be possible to setup a buildbot for Android API 19, but 
only with a subset of tests. Either explicitly only run a subset of tests on 
this hypothetic buildbot, or even modify the Python test suite to skip some 
tests on Android API 19. While I expect a few patches for fix Python 
compilation on Android API 19, I do expect a lot of @skipIf() in tests, since 
API 19 has many broken or missing features. The thing is that most people don't 
care of these missing or broken features, it's not an issue for most 
applications on Android.

Note: Kivy is using Python on Android for years, but they use CrystaX NDK and 
not Google NDK. This issue is about supporting Google NDK: have the maximum 
compatibility.

--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset b31206a223955d614d7769f95fb979d60f77bf87 by Victor Stinner in 
branch 'master':
bpo-32667: Fix tests when $PATH contains a file (#5322)
https://github.com/python/cpython/commit/b31206a223955d614d7769f95fb979d60f77bf87


--

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Another example of platform with best effort support is AIX. Until very 
recently, ctypes.util.find_library() didn't work on AIX which causes many tests 
failure. The AIX buildbot is red as far as I can remember. *Many* tests are 
failing on AIX for various reasons. While a few people sometimes propose fixes, 
basically the AIX support didn't evolved much last years in AIX...

AIX is a platform with a buildbot, but no real dedicated developer to fix all 
AIX specific issues.

--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +5168

___
Python tracker 

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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

By the way, I started to take notes on Python on Android, since the topic is 
wide and complex:
http://vstinner.readthedocs.io/python_android.html

--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Stefan Krah

Stefan Krah  added the comment:

I realize that you had to fight massive mailing list distractions
during the PEP discussions, but this is very close to the beta ...


Let's start here:

>>> from decimal import *
==18887== Invalid read of size 8
==18887==at 0x5324E0: contextvar_new (context.c:744)
==18887==by 0x53141A: PyContextVar_New (context.c:137)
==18887==by 0xFED052B: PyInit__decimal (_decimal.c:5542)
==18887==by 0x51FC56: _PyImport_LoadDynamicModuleWithSpec (importdl.c:159)
==18887==by 0x51F29F: _imp_create_dynamic_impl (import.c:2145)
==18887==by 0x51A4BA: _imp_create_dynamic (import.c.h:289)
==18887==by 0x43257A: _PyMethodDef_RawFastCallDict (call.c:530)
==18887==by 0x432710: _PyCFunction_FastCallDict (call.c:582)
==18887==by 0x432DD6: PyCFunction_Call (call.c:787)
==18887==by 0x4FAA44: do_call_core (ceval.c:4659)
==18887==by 0x4F58CC: _PyEval_EvalFrameDefault (ceval.c:3232)
==18887==by 0x4E7F99: PyEval_EvalFrameEx (ceval.c:545)
==18887==  Address 0xcf589a8 is 8 bytes before a block of size 64 alloc'd
==18887==at 0x4C2A9A1: malloc (vg_replace_malloc.c:299)
==18887==by 0x470498: _PyMem_RawMalloc (obmalloc.c:75)
==18887==by 0x470FFC: PyMem_RawMalloc (obmalloc.c:503)
==18887==by 0x471DEF: _PyObject_Malloc (obmalloc.c:1560)
==18887==by 0x471312: PyObject_Malloc (obmalloc.c:616)
==18887==by 0x4A35D6: PyUnicode_New (unicodeobject.c:1293)
==18887==by 0x4CA16B: _PyUnicodeWriter_PrepareInternal 
(unicodeobject.c:13423)
==18887==by 0x4B1843: PyUnicode_DecodeUTF8Stateful (unicodeobject.c:4806)
==18887==by 0x4A5E67: PyUnicode_FromString (unicodeobject.c:2105)
==18887==by 0x5313F5: PyContextVar_New (context.c:133)
==18887==by 0xFED052B: PyInit__decimal (_decimal.c:5542)
==18887==by 0x51FC56: _PyImport_LoadDynamicModuleWithSpec (importdl.c:159)
==18887==

--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +5169

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

> I realize that you had to fight massive mailing list distractions
> during the PEP discussions, but this is very close to the beta ...

Oh thanks, but I see no reason for you to be condescending here.

I cannot reproduce this on Mac OS / Linux.  Are you sure you've built your 
Python correctly?  Can you run 'make distclean; ./configure --with-pydebug; 
make -j4'?

--

___
Python tracker 

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



[issue32583] Crash during decoding using UTF-16/32 and custom error handler

2018-01-25 Thread Xiang Zhang

Change by Xiang Zhang :


--
pull_requests: +5170

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-25 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5171

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

(Just in case I rebased my patch onto the latest master)

--

___
Python tracker 

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



[issue29708] support reproducible Python builds

2018-01-25 Thread Brett Cannon

Change by Brett Cannon :


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

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

I think I found what cause this, but I have no idea why it has surfaced only 
now :)

https://github.com/python/cpython/pull/5326/files
(see the added PyType_IS_GC(Py_TYPE(name)) check)

I'll merge that PR and rebase the decimal patch again.

--

___
Python tracker 

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



[issue32669] cgitb file to print OSError exceptions

2018-01-25 Thread steven Michalske

New submission from steven Michalske :

With the source

```
import cgitb
import sys

try:
f = open('non_exitant_file_path.foo')
except Exception as e:
cgitb.text(sys.exc_info())
```

we get the output

```
Traceback (most recent call last):
  File "foo.py", line 22, in 
f = open('non_exitant_file_path.foo')
FileNotFoundError: [Errno 2] No such file or directory: 
'non_exitant_file_path.foo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "foo.py", line 24, in 
cgitb.text(sys.exc_info())
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/cgitb.py", 
line 245, in text
value = pydoc.text.repr(getattr(evalue, name))
AttributeError: characters_written
```

In bug #30554 it was brought up that there are attributes designed as invariant 
os some other as designed behavior.  Unfortunately it was closed "as designed" 

So this means that cgitb has a bug when text formatting a sys_exc traceback of 
an OSError.

This is hidden in the by the hook with this code form cgitb.py
by falling back to the standard formatter...

line 277
```
try:
doc = formatter(info, self.context)
except: # just in case something goes wrong
doc = ''.join(traceback.format_exception(*info))
plain = True
```

--
messages: 310702
nosy: hardkrash
priority: normal
severity: normal
status: open
title: cgitb file to print OSError exceptions
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



[issue32436] Implement PEP 567

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 6ab62920c87930dedc31fe633ecda3e51d3d7503 by Yury Selivanov in 
branch 'master':
bpo-32436: Fix a refleak; var GC tracking; a GCC warning (#5326)
https://github.com/python/cpython/commit/6ab62920c87930dedc31fe633ecda3e51d3d7503


--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

I pushed a fix (already in the master branch) and rebased the patch once again. 
 I expect it to work now :)

--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread Jay Yin

Change by Jay Yin :


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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread Jay Yin

Change by Jay Yin :


--
resolution:  -> fixed

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread Jay Yin

Change by Jay Yin :


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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread Jay Yin

Change by Jay Yin :


--
versions: +Python 2.7

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Mark Dickinson

Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue29302] add contextlib.AsyncExitStack

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 1aa094f74039cd20fdc7df56c68f6848c18ce4dd by Yury Selivanov (Ilya 
Kulakov) in branch 'master':
bpo-29302: Implement contextlib.AsyncExitStack. (#4790)
https://github.com/python/cpython/commit/1aa094f74039cd20fdc7df56c68f6848c18ce4dd


--

___
Python tracker 

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



[issue29302] add contextlib.AsyncExitStack

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

Thank you Alexander and Ilya!

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



[issue32669] cgitb file to print OSError exceptions

2018-01-25 Thread R. David Murray

R. David Murray  added the comment:

Yep, this one might get closed as "as designed", too ;)  cgitb has to cope with 
something going wrong with trying to print out values, because there are a 
number of ways to break that in Python, not just the one you are pointing to.

If you have a thought about how to move the exception handling deeper into the 
module in a generalized way, we could consider that option.

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 6996f284d4d90aa05c46d9fe6f38d1030454b224 by Victor Stinner in 
branch '2.7':
bpo-32667: Fix tests when $PATH contains a file (#5324)
https://github.com/python/cpython/commit/6996f284d4d90aa05c46d9fe6f38d1030454b224


--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Thank you Jay Yin for your bug report. I fixed the bug in Python 2.7, 3.6 and 
master.

--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 255dbd2102d5dec5ffbd0b94084377e98c3b56c4 by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
bpo-32667: Fix tests when $PATH contains a file (GH-5322) (#5323)
https://github.com/python/cpython/commit/255dbd2102d5dec5ffbd0b94084377e98c3b56c4


--

___
Python tracker 

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



[issue32667] test_subprocess and test_dtrace fails if the last entry of $PATH is a file

2018-01-25 Thread Jay Yin

Jay Yin  added the comment:

no problem, thanks for helping and fixing the issue, I can now help contribute 
to python =D

--

___
Python tracker 

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



[issue32670] Enforce PEP 479—StopIteration and generators—in Python 3.7 by default

2018-01-25 Thread Yury Selivanov

New submission from Yury Selivanov :

As per PEP 479, in Python 3.7 it should be a RuntimeError when a StopIteration 
exception is raised manually in a generator, a coroutine, or an async generator.

--
assignee: yselivanov
components: Interpreter Core
messages: 310712
nosy: gvanrossum, ncoghlan, ned.deily, yselivanov
priority: release blocker
severity: normal
status: open
title: Enforce PEP 479—StopIteration and generators—in Python 3.7 by default
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



[issue32670] Enforce PEP 479—StopIteration and generators—in Python 3.7 by default

2018-01-25 Thread Yury Selivanov

Change by Yury Selivanov :


--
keywords: +patch
pull_requests: +5172
stage:  -> patch review

___
Python tracker 

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



[issue32657] Mutable Objects in SMTP send_message Signature

2018-01-25 Thread R. David Murray

R. David Murray  added the comment:

On Thu, 25 Jan 2018 15:18:01 +, Steven D'Aprano  
wrote:
> On Thu, Jan 25, 2018 at 02:28:17PM +, R. David Murray wrote:
> The docstring for send_message does say 
> 
> If the sender or any of the recipient addresses contain non-ASCII
> and the server advertises the SMTPUTF8 capability, the policy is
> cloned with utf8 set to True for the serialization, and SMTPUTF8
> and BODY=8BITMIME are asserted on the send.

"Asserted" means sent with the SMTP commands.  It could be reworded to
be clearer.

> which I don't really understand, but I thought that perhaps it was a 
> typo for *inserted* on the send, in the sense of inserted into the mail 
> options:
> 
> mail_options += ['SMTPUTF8', 'BODY=8BITMIME']

Even if that had been true, it would still be a bug to do it to the
mutable argument :)

> So are we agreed this is a bug? What about the default for rcpt_options 
> being a dict?

I didn't look at that, but it probably is.

--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Change by Yury Selivanov :


--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Stefan Krah

Change by Stefan Krah :


--
priority: release blocker -> normal

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

Stefan, I do think that this is a release blocker.  We want to get this change 
as early as possible to ensure that it's well tested.

AFAIK Guido also wants decimal to be updated and well supported in async/await 
code.

--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Stefan Krah

Stefan Krah  added the comment:

Sure, and *I* am the one running the extended decimal test suite as we speak,
not Guido.

You are playing power games here, and you did that from the start by choosing
the nosy list.

--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

> Sure, and *I* am the one running the extended decimal test suite as we speak, 
> not Guido.

Thank you.

> You are playing power games here, and you did that from the start by choosing 
> the nosy list.

Please.  I thought it was pretty much decided that we will update decimal if 
there is no significant performance degradation, so there's no need for a 
conspiracy.  I put Guido to the nosy-list not because I want to force 
something, but just because we've discussed decimal and PEP 567/550 with him 
numerous times.

--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-25 Thread STINNER Victor

Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset c9070d03f5169ad6e171e641b7fa8feab18bf229 by Yury Selivanov in 
branch 'master':
bpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312)
https://github.com/python/cpython/commit/c9070d03f5169ad6e171e641b7fa8feab18bf229


--

___
Python tracker 

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



[issue32662] Implement Server.serve_forever and corresponding APIs

2018-01-25 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue31698] Add REQ_NAME to the node.h API

2018-01-25 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
type:  -> enhancement

___
Python tracker 

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



[issue32645] test_asyncio: TLS tests fail on "x86 Windows7" buildbot

2018-01-25 Thread STINNER Victor

STINNER Victor  added the comment:

Build 537 of x86 Tiger 3.x failed, whereas the previous build was a success. 
Hum, maybe these asyncio failures are "just" race conditions, trigger if the 
system load is too high? I recall that the Windows 7 buildbot is usually 
slow/busy.

http://buildbot.python.org/all/#/builders/30/builds/537

==
ERROR: test_start_tls_client_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_sslproto.py",
 line 225, in test_start_tls_client_1
asyncio.wait_for(client(srv.addr), loop=self.loop, timeout=10))
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 
436, in run_until_complete
return future.result()
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/tasks.py", line 
406, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
==
ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_sslproto.py",
 line 285, in test_start_tls_server_1
asyncio.wait_for(main(), loop=self.loop, timeout=10))
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 
436, in run_until_complete
return future.result()
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/tasks.py", line 
406, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

--

___
Python tracker 

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



[issue27505] Missing documentation for setting module __class__ attribute

2018-01-25 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Thanks Nick.  I've made the PRs for the versionadded and to add __class__ to 
the 3.6 docs.

--
stage: patch review -> needs patch
versions: +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



  1   2   >