[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



[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



[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



[issue32655] File mode should be a constant

2018-01-25 Thread Nitish

Nitish  added the comment:

It appears some files like Lib/tokenize.py changes the mode of TextIOWrapper:

text = TextIOWrapper(buffer, encoding, line_buffering=True)
text.mode = 'r'

setting of mode via _PyObject_SetAttrId(wrapper, &PyId_mode, modeobj) is done 
in some source files too.

What I don't understand is since TextIOWrapper doesn't store the mode 
explicitly, this only adds 'mode' variable to the the object's dict. So why 
bother setting the mode in all these files?

--
nosy: +nitishch

___
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

Change by Chason Chaffin :


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

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-25 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'll look at the hash question later today. It's sufficiently complex that I 
really want to sit down and work through all of the cases.

--

___
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

2018-01-25 Thread Lele Gaifax

Lele Gaifax  added the comment:

I suspect this won't land in 3.7...

Let me know if I can do something to make that happen, or instead if I should 
try to rebase the change on top of current master and rectify references to the 
Python version.

--

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2018-01-25 Thread INADA Naoki

Change by INADA Naoki :


--
pull_requests: +5161

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2018-01-25 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 2812d3d99287c50bab99625d7240bcf1c2e32369 by INADA Naoki in branch 
'master':
bpo-32360: Remove OrderedDict usage from json.tool (GH-5315)
https://github.com/python/cpython/commit/2812d3d99287c50bab99625d7240bcf1c2e32369


--

___
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

Change by INADA Naoki :


--
pull_requests: +5162

___
Python tracker 

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



[issue32665] pathlib.Path._from_parsed_parts should call cls.__new__(cls)

2018-01-25 Thread qb-cea

New submission from qb-cea :

Hi,

I tried subclassing pathlib.Path and provide it with a new attribute (basically 
an accessor to an extended attribute). I am rather new to the concept of 
__slots__ and __new__() but here is how I pictured it should look:

from errno import ENODATA
from os import getxattr, setxattr
from pathlib import Path

class Path_(type(Path())):

__slots__ = ("new_attr",)

def __new__(cls, *args, new_attr=None, **kwargs):
self = super().__new__(cls, *args, **kwargs)
self._new_attr = new_attr
return self

@property
def new_attr(self):
if self._new_attr:
return self._new_attr

try:
new_attr = getxattr(self, "user.new_attr")
except OSError as exc:
if exc.errno != ENODATA:
raise exc
else:
self._new_attr = new_attr
return new_attr

new_attr = b"something_dynamic" # for example uuid4().bytes
setxattr(self, "user.new_attr", new_attr)
self._new_attr = new_attr
return new_attr

The issue I have is that although my class defines its own __new__() method, it 
is not always called by the methods of pathlib.Path. For example:

>>> Path_("/etc").parent.new_attr
Traceback (most recent call last):
  File "", line 1, in 
  File "/path/to/reproducer.py", line 19, in new_attr
if self._new_attr:
AttributeError: _new_attr

The current workaround I use consists in redefining pathlib.Path's 
_from_parsed_parts() method in my class: instead of creating a new object using:
object.__new__(cls)
my implementation uses:
cls.__new__(cls)

This is the first time I play with the __new__() special method, so it is 
possible I missed something, if so, sorry for the noise.

--
components: Library (Lib)
files: reproducer.py
messages: 310671
nosy: pitrou, qb-cea
priority: normal
severity: normal
status: open
title: pathlib.Path._from_parsed_parts should call cls.__new__(cls)
versions: Python 3.6
Added file: https://bugs.python.org/file47409/reproducer.py

___
Python tracker 

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



[issue32637] Android: set sys.platform to android

2018-01-25 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
nosy:  -xdegaye

___
Python tracker 

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



[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-01-25 Thread Alexey Izbyshev

Alexey Izbyshev  added the comment:

Any feedback on the updated PR?

--

___
Python tracker 

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



[issue32666] Valgrind documentation seems to need updating

2018-01-25 Thread Reuben Thomas

New submission from Reuben Thomas :

I have just been trying to use Valgrind (in my case, to debug code in a library 
being tested via a Cython module).

It is working fine, but there seem to be some discrepancies between the 
documentation in README.valgrind and valgrind-python.supp on the one hand, and 
the actual code on the other.

README.Valgrind says (current git master):

Second, you must do one of the following:

  * Uncomment Py_USING_MEMORY_DEBUGGER in Objects/obmalloc.c,
then rebuild Python
  * Uncomment the lines in Misc/valgrind-python.supp that
suppress the warnings for PyObject_Free and PyObject_Realloc

However, Objects/objmalloc.c no longer contain this symbol (though 
Python/dtoa.c does).

Further, in https://bugs.python.org/issue31494 I find the following comment:

Also, I don't think --with-pydebug works well with valgrind.

It's either:
   1) --with-pydebug
   2) CFLAGS="-O0 -g" --with-valgrind
   3) CFLAGS="-O0 -g" --without-pymalloc

Combining 2) and 3) probably does not hurt, but is not necessary.

It would be useful to have this information in README.valgrind.

Also, the provided suppressions do not currently work with a normal build of 
Python, at least with Python 2.7 (with the PyObject_{Free,Realloc} suppressions 
uncommented). There seem to be at least two problems:

1. Extra symbols from LTO. This can be fixed by adding "*" to PyObject_Realloc 
in all its suppressions.

2. After fixing that, I still get one more "Invalid read of size 4":

==3227== Invalid read of size 4
==3227==at 0x4FCEE2: long_dealloc.lto_priv.323 (abstract.c:2000)
==3227==by 0x4BA22B: frame_dealloc (frameobject.c:458)
==3227==by 0x4BA22B: PyEval_EvalCodeEx (ceval.c:3593)
==3227==by 0x4C16E6: fast_function (ceval.c:4445)
==3227==by 0x4C16E6: call_function (ceval.c:4370)

I can't see how this is related to any existing suppression.

I am using the stock Python 2.7 on Ubuntu 16.04. I find that I can work around 
both the above problems (that is, use the suppressions file as-is, just 
uncommenting the extra suppressions for PyObject_{Free,Realloc}) by using 
Ubuntu's debug build of Python (installed as /usr/bin/python-dbg). It is built 
with --with-pydebug.

Finally, README.valgrind says: "Valgrind is used periodically by Python 
developers to try to ensure there are no memory leaks or invalid memory 
reads/writes." Another reason to use Valgrind is, as in my case, to debug 
unrelated C code that is being run via Python (this is often a convenient way 
to write tests). I suggest deleting this sentence and making it more obvious 
how to simply make Python "transparent to Valgrind" for those trying to debug C 
libraries.

To summarise:

i. It seems that for current Python 3, this text:

  * Uncomment Py_USING_MEMORY_DEBUGGER in Objects/obmalloc.c,
then rebuild Python

needs to be updated.

ii. For Python 2.7 at least, and possibly Python 3, extra suppressions are 
needed to use a standard build.

iii. It would be good to have the specific build advice from 
https://bugs.python.org/issue31494 in README.valgrind.

iv. It would be nice to clarify how to use a normal build of Python (e.g. by 
splitting the advice into "For Python developers" and "For Python users").

Given some guidance on what is correct, and what is desired/acceptable, I'd be 
happy to work up a patch to README.valgrind and valgrind-python.supp.

--
assignee: docs@python
components: Documentation
messages: 310673
nosy: docs@python, rrt
priority: normal
severity: normal
status: open
title: Valgrind documentation seems to need updating
versions: Python 3.8

___
Python tracker 

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



[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

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



[issue10381] Add timezone support to datetime C API

2018-01-25 Thread Paul Ganssle

Change by Paul Ganssle :


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



[issue32654] Fixes Python for Android API 19

2018-01-25 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +pmpp

___
Python tracker 

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



[issue32223] distutils doesn't correctly read UTF-8 content from config files

2018-01-25 Thread Jan Vlcinsky

Jan Vlcinsky  added the comment:

The fix shall go to

https://github.com/python/cpython/blob/2812d3d99287c50bab99625d7240bcf1c2e32369/Lib/distutils/dist.py#L406

where `parser.read(filename)`

shall be changed to `parser.read(filename, encoding="utf-8")`

This assumes that the setup.cfg shall be UTF-8 encoded what I thing is correct 
assumption.

Alternative assumptions are (and I do not find them good):

- assume the file is encoded as current console is (this is not deterministic 
and is direct cause of this issue)
- let user to specify the encoding somewhere around (this requires extra step 
and does not bring any value)

--
nosy: +vlcinsky

___
Python tracker 

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



[issue32256] Make patchcheck.py work for out-of-tree builds

2018-01-25 Thread Alexey Izbyshev

Alexey Izbyshev  added the comment:

Any objections to the PR?

--
nosy: +belopolsky, eric.araujo

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

Ok, this time it should be fixed for real ;-)

--

___
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 Paul Ganssle

Change by Paul Ganssle :


--
pull_requests: +5164

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

Chason: that does look like a bug.

Mutable defaults are best to avoid, but if they are used read-only and not 
passed down further it isn't a problem.  send_message was modeled on sendmail, 
and so copied it's use of defaults (which date from quite some time back :), 
but obviously I missed that mutation of the value in the code review of the 
patch that added those lines :(

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



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

2018-01-25 Thread Berker Peksag

Change by Berker Peksag :


--
keywords: +easy
stage:  -> needs patch
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



[issue32667] Failing test_dtrace and test_subprocess on Ubuntu 16.04 on master

2018-01-25 Thread Jay Yin

New submission from Jay Yin :

Hello everyone,


I've been trying to build the master branch on Ubuntu 16.04 and it currently 
fails 2 test, I was wondering if this was normal or if I'm missing 
dependencies, I also tried apt-get build-dev python3.6 and python3.7 to no 
avail, the build requirements install worked for python3.5 but I suspect 3.7 
has different dependencies but I can't find where the documentation for the 
requirements are. 
2 tests failed:
test_dtrace test_subprocess


running test_dtrace as verbose gave https://pastebin.com/ZGzzxwjk

[Bash] FAILED (errors=4) test test_dtrace failed 1 test failed: test_dtrace R - 
Pastebin.com
pastebin.com


and running test_subprocess gives


https://pastebin.com/DNjPzpgp

--
messages: 310678
nosy: jayyin11043
priority: normal
severity: normal
status: open
title: Failing test_dtrace and test_subprocess on Ubuntu 16.04 on master
type: compile error
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



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


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



[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

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



[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



[issue27505] Missing documentation for setting module __class__ attribute

2018-01-25 Thread Cheryl Sabella

Change by Cheryl Sabella :


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



[issue32621] Problem of consistence in collection.abc documentation

2018-01-25 Thread Yahya Abou Imran

Yahya Abou Imran  added the comment:

There is another one:

Reversible list __reversed__ in the abstract method but inherits __iter__ from 
Iterable.

So there is definitely an inconsistency...

--

___
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



[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-25 Thread Yahya Abou Imran

Yahya Abou Imran  added the comment:

I succeed in submitting a PR and building the doc locally.

But there is a little problem of consistency with the abstract methods:
in some classes, the inherited one are mentioned (Collection, Sequence, 
Mapping), but not in some others (Coroutine, Reversible).

So I don't not what to show and what to hide.

I opened an other issue for this:
https://bugs.python.org/issue32621

--

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

Here's another argument for supporting android < 21: according to Google [1], 
12.8% devices on the world run android-19. Furthermore, upgrading Android OS 
for a device is almost impossible for non-hackers unless the manufacturer 
provides an image for newer Android, and it's common for manufacturers not 
upgrading a phone soon after its debut.

--
nosy: +yan12125

___
Python tracker 

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



[issue32667] Failing test_dtrace and test_subprocess on Ubuntu 16.04 on master

2018-01-25 Thread Zachary Ware

Change by Zachary Ware :


--
nosy: +lukasz.langa, zach.ware

___
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

___
Python tracker 


[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*&a* 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



[issue32574] asyncio.Queue, put() leaks memory if the queue is full

2018-01-25 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset c47dacb69054f6fe1c2465df585985430f7fe366 by Yury Selivanov (José 
Melero Fernández) in branch 'master':
bpo-32574: Fix leaks in asyncio.Queue.put() and .get() (#5208)
https://github.com/python/cpython/commit/c47dacb69054f6fe1c2465df585985430f7fe366


--

___
Python tracker 

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



[issue32574] asyncio.Queue, put() leaks memory if the queue is full

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



[issue32660] Solaris should support constants like termios' FIONREAD

2018-01-25 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Solaris has two personalities: System V and BSD. This is not usually an issue 
but sometimes some constants have a different value in a mode or the other.

By default, when including  Solaris is in System V mode. We can 
force BSD mode defining symbol "BSD_COMP". This greatly expand the names 
available but, unfortunately, some values change.

The comment in  is quite clear:

"""
 *  There are some inherent problems in having a single file
 *  ioctl.h, with both System V and BSD flags. Introducing
 *  BSD flags into this file creates compilation problems
 *  with flags such as ECHO, NL1 etc., if termio.h and ioctl.h
 *  are included by the same file. Since these two files can
 *  be only included by System V applications, /usr/inclule/sys/ioctl.h
 *  will be System V mode and all the BSD flags will be turned off
 *  using #ifdef BSD_COMP. This file will also exist in
 *  /usr/ucbinclude/sys/ioctl.h for BSD applications but without the
 *  BSD flags turned off. System V appliactions can use ioctl.h without
 *  any changes, System V applications requiring BSD flags should
 *  -D BSD_COMP when compiling (and be warned about the common
 *  flags between System V and BSD) and BSD applications should
 *  use /usr/ucbinclude/sys/ioctl.h.
"""

Using "gcc -dM -E" we can observe defined symbols.

Ambiguous values when defininf "BSD_COMP" are: BS0, BS1, CR0, CR1, CR2, CR3, 
ECHO, FF0, FF1, FLUSHO, NL0, NL1, NOFLSH, PENDIN, TAB0, TAB1, TAB2, TOSTOP, 
XTABS.

Sounds quite important, actually.

Since I am no aiming to perfection, I would be satisfied making quite a few new 
symbols available, not all of them. A simple approach would be to include 
 and . In those header files there are only 
constants, not functions or data structures.

Just including those headers we get these new symbols (none overlapping other):

_FIO_COMPRESSED
_FIO_COUNT_FILLED
_FIO_GET_TOP_STATS
_FIO_SEEK_DATA
_FIO_SEEK_HOLE
_FIO_SET_LUFS_DEBUG
_FIO_SET_LUFS_ERROR
_FIOAI
_FIODIRECTIO
_FIOFFS
_FIOGDIO
_FIOGETMAXPHYS
_FIOGETSUPERBLOCK
_FIOIO
_FIOISBUSY
_FIOISLOG
_FIOISLOGOK
_FIOLFS
_FIOLFSS
_FIOLOGDISABLE
_FIOLOGENABLE
_FIOLOGRESET
_FIOOBSOLETE67
_FIOSATIME
_FIOSDIO
_FIOSNAPSHOTCREATE
_FIOSNAPSHOTCREATE_MULTI
_FIOSNAPSHOTDELETE
_FIOTUNE
_IO(x,y)
_IOR(x,y,t)
_IORN(x,y,t)
_IOW(x,y,t)
_IOWN(x,y,t)
_IOWR(x,y,t)
_IOWRN(x,y,t)
_SIOCSOCKFALLBACK
_SYS_FILIO_H
_SYS_IOCCOM_H
_SYS_SOCKIO_H
FIOASYNC
FIOCLEX
FIOGETOWN
FIONBIO
FIONCLEX
FIONREAD
FIOSETOWN
IF_UNITSEL
IOC_IN
IOC_INOUT
IOC_OUT
IOC_VOID
IOCPARM_MASK
O_SIOCGIFCONF
O_SIOCGLIFCONF
SIOCADDMULTI
SIOCADDRT
SIOCATMARK
SIOCDARP
SIOCDELMULTI
SIOCDELRT
SIOCDXARP
SIOCGARP
SIOCGDSTINFO
SIOCGENADDR
SIOCGENPSTATS
SIOCGETLSGCNT
SIOCGETNAME
SIOCGETPEER
SIOCGETPROP
SIOCGETSGCNT
SIOCGETSYNC
SIOCGETVIFCNT
SIOCGHIWAT
SIOCGIFADDR
SIOCGIFBRDADDR
SIOCGIFCONF
SIOCGIFDSTADDR
SIOCGIFFLAGS
SIOCGIFHWADDR
SIOCGIFINDEX
SIOCGIFMEM
SIOCGIFMETRIC
SIOCGIFMTU
SIOCGIFMUXID
SIOCGIFNETMASK
SIOCGIFNUM
SIOCGIP6ADDRPOLICY
SIOCGIPMSFILTER
SIOCGLIFADDR
SIOCGLIFBINDING
SIOCGLIFBRDADDR
SIOCGLIFCONF
SIOCGLIFDADSTATE
SIOCGLIFDSTADDR
SIOCGLIFFLAGS
SIOCGLIFGROUPINFO
SIOCGLIFGROUPNAME
SIOCGLIFHWADDR
SIOCGLIFINDEX
SIOCGLIFLNKINFO
SIOCGLIFMETRIC
SIOCGLIFMTU
SIOCGLIFMUXID
SIOCGLIFNETMASK
SIOCGLIFNUM
SIOCGLIFSRCOF
SIOCGLIFSUBNET
SIOCGLIFTOKEN
SIOCGLIFUSESRC
SIOCGLIFZONE
SIOCGLOWAT
SIOCGMSFILTER
SIOCGPGRP
SIOCGSTAMP
SIOCGXARP
SIOCIFDETACH
SIOCILB
SIOCLIFADDIF
SIOCLIFDELND
SIOCLIFGETND
SIOCLIFREMOVEIF
SIOCLIFSETND
SIOCLOWER
SIOCSARP
SIOCSCTPGOPT
SIOCSCTPPEELOFF
SIOCSCTPSOPT
SIOCSENABLESDP
SIOCSETPROP
SIOCSETSYNC
SIOCSHIWAT
SIOCSIFADDR
SIOCSIFBRDADDR
SIOCSIFDSTADDR
SIOCSIFFLAGS
SIOCSIFINDEX
SIOCSIFMEM
SIOCSIFMETRIC
SIOCSIFMTU
SIOCSIFMUXID
SIOCSIFNAME
SIOCSIFNETMASK
SIOCSIP6ADDRPOLICY
SIOCSIPMSFILTER
SIOCSLGETREQ
SIOCSLIFADDR
SIOCSLIFBRDADDR
SIOCSLIFDSTADDR
SIOCSLIFFLAGS
SIOCSLIFGROUPNAME
SIOCSLIFINDEX
SIOCSLIFLNKINFO
SIOCSLIFMETRIC
SIOCSLIFMTU
SIOCSLIFMUXID
SIOCSLIFNAME
SIOCSLIFNETMASK
SIOCSLIFPREFIX
SIOCSLIFSUBNET
SIOCSLIFTOKEN
SIOCSLIFUSESRC
SIOCSLIFZONE
SIOCSLOWAT
SIOCSLSTAT
SIOCSMSFILTER
SIOCSPGRP
SIOCSPROMISC
SIOCSQPTR
SIOCSSDSTATS
SIOCSSESTATS
SIOCSXARP
SIOCTMYADDR
SIOCTMYSITE
SIOCTONLINK
SIOCUPPER
SIOCX25RCV
SIOCX25TBL
SIOCX25XMT
SIOCXPROTO

Not all those symbols are going to be exported in Python.

--

___
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 Éric Araujo

Éric Araujo  added the comment:


New changeset 2fc98ae115e2a2095a0bcf388c27a878aafdb454 by Éric Araujo (Bo 
Bayles) in branch 'master':
bpo-32304: Fix distutils upload for sdists ending with \x0d (GH-5264)
https://github.com/python/cpython/commit/2fc98ae115e2a2095a0bcf388c27a878aafdb454


--

___
Python tracker 

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



[issue11023] pep 227 missing text

2018-01-25 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Moved to the PEP issue tracker.
https://github.com/python/peps/issues/557

--
nosy: +csabella
resolution:  -> later
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue32660] Solaris should support constants like termios' FIONREAD

2018-01-25 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

After doing this change, I see FIVE new symbols in Python's termios:

"""
FIONREAD, FIONCLEX, FIOCLEX, FIOASYNC, FIONBIO.
"""

Good enough for now and me.

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2018-01-25 Thread Bert JW Regeer

Change by Bert JW Regeer :


--
nosy: +X-Istence

___
Python tracker 

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



[issue32660] Solaris should support constants like termios' FIONREAD

2018-01-25 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

With this change, a SmarOS native zone exports 206 symbols in Python termios. 
Before it export 201. By comparison, a Linux Ubuntu 16.04 Python provides 244 
symbols.

Some references for the future:

http://www.verycomputer.com/168_45f4bd8c333a252f_1.htm

--

___
Python tracker 

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



[issue32660] Solaris should support constants like termios' FIONREAD

2018-01-25 Thread Jesús Cea Avión

Change by Jesús Cea Avión :


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



[issue32671] redesign Windows os.getlogin, and add os.getuser

2018-01-25 Thread Eryk Sun

New submission from Eryk Sun :

os.getlogin() is supposed to return the name of the user logged in on the 
"controlling terminal" of the process. Windows doesn't have POSIX terminals; 
however, every process does belong to a terminal/desktop session that can be 
connected either to the physical console or a remote desktop. A standard user 
can call WTSQuerySessionInformation (an RPC to the Local Session Manager) to 
get the user name (i.e. WTSUserName) for the current session. ISTM that this is 
the closest analog to POSIX getlogin() that exists in Windows.

A caveat is that session 0 ("services") is never connected to the physical 
console. Thus there's no associated user account name.

os.getlogin() currently calls GetUserName (an RPC to the Local Security 
Authority), which returns the user name from the caller's effective token. If 
os.getlogin() is changed to return the session user, posixmodule.c could still 
wrap GetUserName privately as nt._getusername(). 

If the calling thread is impersonating, nt._getusername should temporarily 
revert to the process token (i.e. the real user), since this will usually be 
consistent with USERNAME. That said, getting the effective user can be useful 
for logging, so there should also be an option to return the effective user 
instead of the real user.

Note that the user name of the SYSTEM logon (and thus the USERNAME environment 
variable in a SYSTEM process) is actually "%COMPUTERNAME%$". It's noteworthy 
that GetUserName instead returns "SYSTEM" for this case. The "NETWORK SERVICE" 
logon also uses "%COMPUTERNAME%$", but in this case GetUserName returns 
"%COMPUTERNAME%$" instead of "NETWORK SERVICE".

A pair of high-level Python functions named getuser() and geteuser() could be 
added in os.py. These functions would return the real and effective user name 
of the caller, respectively. In Windows, os.getuser() would return the USERNAME 
environment variable and otherwise fall back on nt._getusername(). In POSIX, it 
would return the value of the first defined variable among LOGNAME, USER, and 
LNAME, and otherwise fall back on pwd.getpwuid(os.getuid()).pw_name. In 
Windows, os.geteuser() would return nt_getusername(effective=True). In POSIX it 
would return pwd.getpwuid(os.geteuid()).pw_name.

Currently getpass.getuser() always looks for environment variables named 
LOGNAME, USER, LNAME, and finally USERNAME. This is an odd choice on Windows. I 
wouldn't expect Windows users to know about and respect the special status of 
the first 3 variable names. getpass.getuser() also falls back on using the pwd 
module, which is another odd choice on Windows. It isn't worth removing or 
modifying this function, but the docs could encourage using the proposed 
os.getuser() and os.geteuser() functions on Windows and new code.

--
components: Library (Lib), Windows
messages: 310724
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: test needed
status: open
title: redesign Windows  os.getlogin, and add os.getuser
type: enhancement
versions: Python 3.8

___
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



[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



[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



  1   2   >