[issue29341] Missing accepting path-like object in docstrings of os module functions

2018-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34676] Guarantee that divmod() and PyNumber_Divmod() return a 2-tuple

2018-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34676] Guarantee that divmod() and PyNumber_Divmod() return a 2-tuple

2018-09-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

An alternate idea: convert the result of __divmod__ and __rdivmod__ to tuple 
instead raising an error. This will support the case of returning a list. I 
didn't implement this initially because I think this case is very unlikely 
occurred in real code.

Similar changes were made in past in PyMapping_Keys(). In Python 2 it just 
calls the keys() method and returns the result. In Python 3 it initially 
converted the result to list or tuple. But since the caller code often expects 
a list and use PyList API with the result, later PyMapping_Keys() was fixed but 
making it always returning a list.

--

___
Python tracker 

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



[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

If vfork() is used ob FreeBSD, wouldn't be better to make use_vfork=True the 
default on FreeBSD and raise an error on use_vfork=False?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32117] Tuple unpacking in return and yield statements

2018-09-14 Thread Jordan Chapman


Jordan Chapman  added the comment:

BFDL approval: 
https://mail.python.org/pipermail/python-dev/2017-November/150842.html

--
nosy: +Jordan Chapman

___
Python tracker 

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



[issue34688] Segfault in pandas that works fine on 3.7

2018-09-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Copying my GitHub comment here : 

If I have only D or no D then there is no segfault. It occurs when I have 
either A, D or B, D, or C, D.

**Leaving out column D**

```python
from pandas import DataFrame
import pandas as pd

df = DataFrame({'A': [1, 2, 3],
'B': [1., 2., 3.],
'C': ['foo', 'bar', 'baz'],
#'D': pd.date_range('20130101', periods=3)
})

print(df.agg('sum'))
```

**output**

```
A6
B6
Cfoobarbaz
dtype: object
```

**Only with Column D**

```python
from pandas import DataFrame
import pandas as pd

df = DataFrame({'D': pd.date_range('20130101', periods=3)})

print(df.agg('sum'))
```

**output**

```
Series([], dtype: float64)
```

Thanks

--

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue29577] Enum: mixin classes don't mix well with already mixed Enums

2018-09-14 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue34691] _contextvars missing in x64 master branch Windows build?

2018-09-14 Thread Tim Peters


New submission from Tim Peters :

Using Visual Studio 2017 to build the current master branch of Python 
(something I'm trying for the first time in about two years - maybe I'm missing 
something obvious!), with the x64 target, under both the Release and Debug 
builds I get a Python that can't even start to run the test suite.  Here's 
output from the Release build - the Debug build output is nearly identical.  
The problem does not appear with the Win32 target.  Of course I'm doing this on 
a 64-bit box (under Win 10 Pro):

C:\Code\Python\PCbuild>rt -q -x64

C:\Code\Python\PCbuild>"C:\Code\Python\PCbuild\amd64\python.exe"  -u -Wd -E -bb 
-m test
Traceback (most recent call last):
  File "C:\Code\Python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
  File "C:\Code\Python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "C:\Code\Python\lib\test\__main__.py", line 1, in 
from test.libregrtest import main
  File "C:\Code\Python\lib\test\libregrtest\__init__.py", line 4, in 
from test.libregrtest.cmdline import _parse_args, RESOURCE_NAMES, 
ALL_RESOURCES
  File "C:\Code\Python\lib\test\libregrtest\cmdline.py", line 4, in 
from test import support
  File "C:\Code\Python\lib\test\support\__init__.py", line 6, in 
import asyncio.events
  File "C:\Code\Python\lib\asyncio\__init__.py", line 8, in 
from .base_events import *
  File "C:\Code\Python\lib\asyncio\base_events.py", line 39, in 
from . import events
  File "C:\Code\Python\lib\asyncio\events.py", line 14, in 
import contextvars
  File "C:\Code\Python\lib\contextvars.py", line 1, in 
from _contextvars import Context, ContextVar, Token, copy_context
ModuleNotFoundError: No module named '_contextvars'


_contextvarsmodule.c is in the list of Modules under the pythoncore project, 
and it appears to compile without incident when the Solution is built.

The executable appears to be fine in other respects I checked; e.g.,

C:\Code\Python\PCbuild>amd64\python.exe
Python 3.8.0a0 (heads/master:24f6846920, Sep 14 2018, 18:55:33) [MSC v.1915 64 
bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> from collections import Counter
>>> Counter("abab")
Counter({'a': 2, 'b': 2})
>>> import _contextvars
Traceback (most recent call last):
  File "", line 1, in 
ModuleNotFoundError: No module named '_contextvars'

Clue?

--
components: Build, Library (Lib), Windows
messages: 325419
nosy: paul.moore, steve.dower, tim.golden, tim.peters, zach.ware
priority: normal
severity: normal
status: open
title: _contextvars missing in x64 master branch Windows build?
type: behavior
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



[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Given the FreeBSD default and seeming desirability of vfork for this use case, 
is there a good reason using vfork could not be the default behavior on any OS 
that supports it?

--

___
Python tracker 

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



[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-14 Thread Naitree Zhu


Naitree Zhu  added the comment:

Hi guys, what's our consensus on this?

- raise an exception as a fix? or
- fallback to default `reason` as a new feature?

If we choose to explicitly make `reason` optional (I mean by documenting it as 
such), shouldn't we also change `@skipIf` and `@skipUnless` to keep consistency?

--

___
Python tracker 

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



[issue20215] socketserver.TCPServer can not listen IPv6 address

2018-09-14 Thread Nir Soffer


Nir Soffer  added the comment:

Doesn't it affect also 2.7, 3.6, 3.7, and 3.8?

--

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 805e27eff65d51f7aea2c00ccbb4f5d44f4499f2 by Yury Selivanov in 
branch 'master':
bpo-33649: Fix asyncio-dev (GH-9324)
https://github.com/python/cpython/commit/805e27eff65d51f7aea2c00ccbb4f5d44f4499f2


--

___
Python tracker 

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



[issue20215] socketserver.TCPServer can not listen IPv6 address

2018-09-14 Thread Nir Soffer


Change by Nir Soffer :


--
nosy: +nirs

___
Python tracker 

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



[issue34672] '%Z' strftime specifier never works with musl

2018-09-14 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +belopolsky

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2018-09-14 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


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

___
Python tracker 

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



[issue8450] httplib: false BadStatusLine() raised

2018-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset ee78ba2c819b0cd7671a575e584d8fe1b7adb3e4 by Miss Islington (bot) 
(Shoham Peller) in branch '2.7':
[2.7] closes bpo-8450: a better error message when http status line isn't 
received (GH-2825)
https://github.com/python/cpython/commit/ee78ba2c819b0cd7671a575e584d8fe1b7adb3e4


--
nosy: +miss-islington
resolution:  -> fixed
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



[issue34686] Add `-r`, as opposed to `-R` to Python core interpreter

2018-09-14 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

On Fri, Sep 14, 2018, at 12:30, Erwan Le Pape wrote:
> Without these `hacks`, making build outputs to be deterministic means 
> fixing marshal to essentially sort elements when dumping unordered 
> objects. Would you rather see a patch going in that direction?

Yes.

--

___
Python tracker 

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



[issue33486] regen autotools related files

2018-09-14 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Change by Yury Selivanov :


--
pull_requests: +8749

___
Python tracker 

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



[issue33486] regen autotools related files

2018-09-14 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 24f684692070f53b6f6e4dc67b9fe23dbd58655f by Petr Viktorin (Eitan 
Adler) in branch 'master':
bpo-33486: regen autotools files using autoupdate+autoreconf (GH-6853)
https://github.com/python/cpython/commit/24f684692070f53b6f6e4dc67b9fe23dbd58655f


--

___
Python tracker 

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



[issue33486] regen autotools related files

2018-09-14 Thread Petr Viktorin


Petr Viktorin  added the comment:

> If these changes are autogenerated, I would prefer that a trusted core 
> developer create a PR.

I got the same changes in configure.ac.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

I commented on python-dev but maybe it is better to keep discussion here.  
Could we make the frozenmodules thing into a dynamically loaded module?  Then 
you could have support for end users making their own.  E.g. a command-line 
param that lists a set of DLLs from which to load frozen modules from.  Then, 
if the command-line is not provided, we load from .pyc as per default.  If it 
is provided, we dlopen (or whatever) the DLLs and give the nice performance 
benefits.

Like Guido, I want to see the toolchain to build the frozenmodules thing.

--
nosy: +nascheme

___
Python tracker 

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



[issue24056] Better expose closure, generator & coroutine status of functions

2018-09-14 Thread Petr Viktorin


Change by Petr Viktorin :


--
nosy:  -petr.viktorin

___
Python tracker 

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



[issue3468] Spam

2018-09-14 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -gpolo, gvanrossum, loewis

___
Python tracker 

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



[issue3468] Spam

2018-09-14 Thread Zachary Ware


Change by Zachary Ware :


--
title: Satisfy her lovemaking desire -> Spam

___
Python tracker 

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



[issue3468] Satisfy her lovemaking desire

2018-09-14 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests:  -8747

___
Python tracker 

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



[issue34685] scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x

2018-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3d18b50a12e639e018d49d7b85663164d60bfd2b by Pablo Galindo in 
branch 'master':
bpo-34685: Skip posix_spawn scheduler tests on BSD (GH-9316)
https://github.com/python/cpython/commit/3d18b50a12e639e018d49d7b85663164d60bfd2b


--

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 7372c3bbefb4763dbd1b6d66f7971bef28c0f056 by Yury Selivanov in 
branch 'master':
bpo-33649: Add high-level APIs cheat-sheet (GH-9319)
https://github.com/python/cpython/commit/7372c3bbefb4763dbd1b6d66f7971bef28c0f056


--

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Larry Hastings


Larry Hastings  added the comment:

As Neil points out on python-dev, my "improvement" should have been multiplied 
by 100, like 20.924239043734505 % instead of 0.20924239043734505 %, etc.

--

___
Python tracker 

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



[issue34685] scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

We already skip similar os.sched_setparam() tests on FreeBSD, so the change is 
fine.

--
nosy: +vstinner

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 6c7316439d966cdbc76ffcc005e5d9c563064ba2 by Yury Selivanov in 
branch 'master':
bpo-33649: Refresh asyncio docs landing page (GH-9322)
https://github.com/python/cpython/commit/6c7316439d966cdbc76ffcc005e5d9c563064ba2


--

___
Python tracker 

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



[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

I discussed with Pablo (at the CPython sprint) about the case of FreeBSD.

On FreeBSD, posix_spawn() always uses vfork, so it can be surprising to get an 
error when using use_vfork=True. But, the error message is now very explicit: 
it mentions that a specific constant is not available on FreeBSD. The 
documentation is also clear on that point.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Larry Hastings


Larry Hastings  added the comment:

I should add that there were two novel test failures in the regression test 
suite: test_module and test_site.

--

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Change by Yury Selivanov :


--
pull_requests: +8748

___
Python tracker 

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



[issue32933] mock_open does not support iteration around text files.

2018-09-14 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c83c375ed907bdd54361aa36ce76130360f323a4 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-32933: Implement __iter__ method on mock_open() (GH-5974)
https://github.com/python/cpython/commit/c83c375ed907bdd54361aa36ce76130360f323a4


--

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue3468] Satisfy her lovemaking desire

2018-09-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +8747

___
Python tracker 

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



[issue32718] Install PowerShell activation scripts for venv for all platforms

2018-09-14 Thread Brett Cannon


Change by Brett Cannon :


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

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Larry Hastings


Change by Larry Hastings :


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



[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2018-09-14 Thread Larry Hastings


New submission from Larry Hastings :

This patch was sent to me privately by Jeethu Rao at Facebook.  It's a change 
they're working with internally to improve startup time.  What I've been told 
by Carl Shapiro at Facebook is that we have their blessing to post it publicly 
/ merge it / build upon it for CPython.  Their patch was written for 3.6, I 
have massaged it to the point where it minimally works with 3.8.

What the patch does: it takes all the Python modules that are loaded as part of 
interpreter startup and deserializes the marshalled .pyc file into precreated 
objects stored as static C data.  You add this .C file to the Python build.  
Then there's a patch to Python itself (about 250 lines iirc) that teaches it to 
load modules from these data structures.

I wrote a quick dumb test harness to compare this patch vs 3.8 stock.  It runs 
a command line 500 times and uses time.perf_counter to time the process.  On a 
fast quiescent laptop I observe a 21-22% improvement:

cmdline: ['./python', '-c', 'pass']
500 runs:

sm38
  average time 0.006302303705982922
  best 0.006055746000129147
 worst 0.0081656558437

clean38
  average time 0.007969956444008858
  best 0.007829047999621253
 worst 0.00881221542109

improvement 0.20924239043734505 %

cmdline: ['./python', '-c', 'import io']
500 runs:

sm38
  average time 0.006297688038004708
  best 0.00598076593309
 worst 0.0072462130010535475

clean38
  average time 0.007996319670004595
  best 0.0078091849991324125
 worst 0.009175700999549008

improvement 0.21242667903482038 %


The downside of the patch: for these modules it ignores the Python files on 
disk--it doesn't even stat them.  If you add stat calls you lose half of the 
speed improvement.  I believe they added a work-around, where you can set a 
flag (command-line? environment variable? I don't know, I didn't go looking for 
it) that tells Python "don't use the frozen modules" and it loads all those 
files from disk.


I don't propose to merge the patch in its current state.  I think it would need 
a lot of work both in terms of "doing things the way Python does it" as well as 
just code smell (the serializer is implemented in both C and Python and jumps 
back and forth, also the build process for the serialized modules is pretty 
tiresome).

Is it worth working on?

--
assignee: larry
components: Interpreter Core
messages: 325401
nosy: larry
priority: normal
severity: normal
stage: needs patch
status: open
title: Store startup modules as C structures for 20%+ startup speed improvement
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



[issue34651] Disallow fork in a subinterpreter.

2018-09-14 Thread Eric Snow


Change by Eric Snow :


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



[issue34651] Disallow fork in a subinterpreter.

2018-09-14 Thread Eric Snow


Eric Snow  added the comment:


New changeset 5903296045b586b9cd1fce0b1e02caf896028d1d by Eric Snow in branch 
'master':
bpo-34651: Only allow the main interpreter to fork. (gh-9279)
https://github.com/python/cpython/commit/5903296045b586b9cd1fce0b1e02caf896028d1d


--

___
Python tracker 

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



[issue34354] Memory leak on _testCongestion

2018-09-14 Thread Petr Viktorin


Petr Viktorin  added the comment:

That issue has more information/discussion, and it does look like the same bug, 
so I'll close this one.

Thank you for reporting it!

--
nosy: +petr.viktorin
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_socket: testCongestion() hangs on my Fedora 28

___
Python tracker 

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



[issue34676] Guarantee that divmod() and PyNumber_Divmod() return a 2-tuple

2018-09-14 Thread Zachary Ware


Zachary Ware  added the comment:

I share Paul's concern about somebody using this (mis-?)feature and being 
unnecessarily broken.  However, such a restriction would have prevented the 
segfault that was reported and fixed in bpo-31577, and would save any other 
users of PyNumber_Divmod from having to implement the same kind of checks.

Does anyone have an example of a legitimate use for the current behavior?

--
nosy: +zach.ware
title: Guarantie that divmod() and PyNumber_Divmod() return a 2-tuple -> 
Guarantee that divmod() and PyNumber_Divmod() return a 2-tuple

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Change by Yury Selivanov :


--
pull_requests: +8744

___
Python tracker 

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



[issue31577] crash in os.utime() in case of a bad ns argument

2018-09-14 Thread Zachary Ware


Zachary Ware  added the comment:

Serhiy has opened bpo-34676 for the idea of restricting PyNumber_Divmod()'s 
return type, so I'm closing the issue.

--
stage: commit review -> resolved
status: pending -> closed

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Carol Willing


Carol Willing  added the comment:


New changeset 3faaa8857a42a36383bb18425444e597fc876797 by Carol Willing (Yury 
Selivanov) in branch 'master':
bpo-33649: Refresh Tasks and Futures pages (#9314)
https://github.com/python/cpython/commit/3faaa8857a42a36383bb18425444e597fc876797


--

___
Python tracker 

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



[issue34643] How to build Release Version of Python in Windows?

2018-09-14 Thread Steve Dower


Steve Dower  added the comment:

In that case, you are asking for a new feature development that we have 
previously decided is not in the best interests for us to provide (in that it 
leads to more upgrade and installation issues than a more controlled 
installer). If you are prepared to write and contribute scripts that do this, 
we can consider them against this bpo item, but if not then I suggest we close 
this as rejected.

In either case, we would not be offering this package on python.org.

---

There is no difference between the Python binaries. The difference is that the 
installer ensures they are properly integrated with Windows in a way that makes 
them easier to use, safer to update, and protects against conflicts between 
multiple copies. Apart from these, they can simply be copied around.

If the context for your question is that you know that you can't do this on 
other platforms, then my answer is that Windows always searches for dynamic 
libraries when loading them, rather than embedding an absolute path during 
build. So you can *only* create relocatable binaries, provided you also include 
all the dependencies (and it is not always obvious what these are).

Does that help?

--
type: compile error -> enhancement
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue34687] asyncio: is it time to make ProactorEventLoop as the default event loop?

2018-09-14 Thread Yury Selivanov


Yury Selivanov  added the comment:

I'm not sure that ProactorEventLoop is stable enough TBH :(  And I wouldn't be 
able to be on call for Windows users to fix all bugs in ProactieEventLoop.

Andrew, your thoughts on this?

--

___
Python tracker 

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



[issue34689] Lib/sysconfig.py expands non-variables

2018-09-14 Thread Erwan Le Pape


New submission from Erwan Le Pape :

Lib/sysconfig.py _parse_makefile needs to expand Makefile-style variables which 
includes `$()` `${}` variables with a litteral `$` being `$$`.

That last particular point is properly accounted for in the first half of the 
function when determining values that need expansion and those that don't. 
However, the second half that actually performs variable expansion doesn't.

Sample breaking input:
VAR1=  VALUE1
VAR2=  VALUE2
VAR3=$${VAR1} ${VAR2}

Output:
Expect: {'VAR1': 'VALUE1', 'VAR2': 'VALUE2', 'VAR3': '$${VAR1} VALUE2'}
Actual: {'VAR1': 'VALUE1', 'VAR2': 'VALUE2', 'VAR3': '$VALUE1 VALUE2'}

I'm working on patching this but I'm putting this here as feedback is welcome.

As far as I could tell, this is a side effect of b2b1217, which patched #24705.

--
components: Library (Lib)
messages: 325393
nosy: lepaperwan
priority: normal
severity: normal
status: open
title: Lib/sysconfig.py expands non-variables
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34688] Segfault in pandas that works fine on 3.7

2018-09-14 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

I have tried running pandas test suite under Python 3.8 and the below code 
segfault as part of the test suite. Pandas uses Python 3.7 in Travis and it 
runs fine. There is also NumPy related code in the trace but it also seems to 
run fine under Python 3.7. I suppose this is a crash in CPython master and I 
didn't try latest Python 3.7 branch yet. Attaching the sample program and stack 
trace as below : 

# Program 

from pandas import DataFrame
import pandas as pd

df = DataFrame({'A': [1, 2, 3],
'B': [1., 2., 3.],
'C': ['foo', 'bar', 'baz'],
'D': pd.date_range('20130101', periods=3)})

print(df.agg('sum'))

# Python 3.7 output

$ virtualenv -p /usr/bin/python3.7 py-37-venv
$ source py-37-venv/bin/activate
$ python
Python 3.7.0 (default, Jun 28 2018, 02:32:19)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

$ pip install pandas

$ python foo.py
A6
B6
Cfoobarbaz
dtype: object


# Crash on Python 3.8 (CPython master)

$ ./python -m venv ../pandas-venv
$ cd ../ && source pandas-venv/bin/activate
$ python
Python 3.8.0a0 (heads/master:73820a6, Sep 14 2018, 18:33:26)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ pip install pandas
$ python foo.py
:219: ImportWarning: can't resolve package from 
__spec__ or __package__, falling back on __name__ and __path__
/home/karthi/pandas/pandas/core/dtypes/inference.py:6: DeprecationWarning: 
Using or importing the ABCs from 'collections' instead of from 
'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable
/home/karthi/pandas/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using 
or importing the ABCs from 'collections' instead of from 'collections.abc' is 
deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
python: Objects/call.c:90: _PyObject_FastCallDict: Assertion 
`!PyErr_Occurred()' failed.


# Stack trace

$ gdb --args python foo.py
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...done.
warning: File "/home/karthi/cpython/python-gdb.py" auto-loading has been 
declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/karthi/cpython/python-gdb.py
line to your configuration file "/home/karthi/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/karthi/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb)
(gdb) set pagination off
(gdb) r
Starting program: /home/karthi/pandas-venv/bin/python foo.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
:219: ImportWarning: can't resolve package from 
__spec__ or __package__, falling back on __name__ and __path__
/home/karthi/pandas/pandas/core/dtypes/inference.py:6: DeprecationWarning: 
Using or importing the ABCs from 'collections' instead of from 
'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable
/home/karthi/pandas/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using 
or importing the ABCs from 'collections' instead of from 'collections.abc' is 
deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
python: Objects/call.c:90: _PyObject_FastCallDict: Assertion 
`!PyErr_Occurred()' failed.

Program received signal SIGABRT, Aborted.
0x77115428 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:54
54  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x77115428 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x7711702a in __GI_abort () at abort.c:89
#2  0x7710dbd7 in __assert_fail_base (fmt=, 
assertion=assertion@entry=0x5fa699 "!PyErr_Occurred()", 
file=file@entry=0x5fa650 "Objects/call.c", line=line@entry=90, 
funct

[issue34687] asyncio: is it time to make ProactorEventLoop as the default event loop?

2018-09-14 Thread STINNER Victor


New submission from STINNER Victor :

Is it time to make ProactorEventLoop as the default event loop?

Since 2014, many features have been added to ProactorEventLoop (ex: SSL 
support) and the implementation is way more today than it was 4 years ago.

Comparison of SelectorEventLoop and ProactorEventLoop on Windows:
https://docs.python.org/dev/library/asyncio-platforms.html#windows

--
components: asyncio
messages: 325391
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: is it time to make ProactorEventLoop as the default event loop?
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



[issue31922] Can't receive replies from multicast UDP with asyncio

2018-09-14 Thread STINNER Victor


Change by STINNER Victor :


--
versions:  -Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Adam Meily: Thanks for the proposed pull request. Would you mind to try to 
rebase it on the current master branch, please?

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Copy of my messages in July 2014:
https://github.com/python/asyncio/issues/187

"""
ProcatorEventLoop doesn't support UDP right now.

I'm working on a patch. I need to implement WSARecvFrom in the _overlapped 
module for example.

ConnectEx() fails with an error 10022 when create_datagram_endpoint() is called 
with remote_address. A workaround is to replace "yield from sock_connect(sock, 
remote_address)" with "sock.connect(remote_address)".
"""

--

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

I just marked my old issue bpo-23295 as duplicate of this one. Copy of my 
messages:

"""
ProactorEventLoop lacks UDP support: create_datagram_endpoint() is not 
supported.

New functions should be added to the _overlapped modul. Example: add maybe 
WSARecvFrom()?

See also https://code.google.com/p/tulip/issues/detail?id=187
"""

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



[issue34686] Add `-r`, as opposed to `-R` to Python core interpreter

2018-09-14 Thread Erwan Le Pape


Erwan Le Pape  added the comment:

How would you suggest going about doing that?

Without the proposed option, the alternative is leaving the build process 
vulnerable to environment variables potentially breaking the build process by 
patching configure.ac as follows:
-PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
+PYTHON_FOR_BUILD='PYTHONHASHSEED=0 ./$(BUILDPYTHON) -E'

Otherwise all environment variables affecting the Python interpreter would need 
to be cleared in addition to setting PYTHONHASHSEED=0.

Without these `hacks`, making build outputs to be deterministic means fixing 
marshal to essentially sort elements when dumping unordered objects. Would you 
rather see a patch going in that direction?

--

___
Python tracker 

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



[issue23295] [Windows] asyncio: add UDP support to ProactorEventLoop

2018-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Duplicate of bpo-29883.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio: Windows Proactor Event Loop UDP Support

___
Python tracker 

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



[issue3468] Satisfy her lovemaking desire

2018-09-14 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests:  -8741

___
Python tracker 

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



[issue24937] Multiple problems in getters & setters in capsulethunk.h

2018-09-14 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +8743

___
Python tracker 

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



[issue24937] Multiple problems in getters & setters in capsulethunk.h

2018-09-14 Thread Petr Viktorin


Petr Viktorin  added the comment:

Well, hasn't this languished for a while.

I've talked with Benjamin, and he's OK with just removing the "Porting 
Extension Modules to Python 3" HOWTO, and replacing it by links to external 
guides that do a much better job at documenting this.

Also, Python 2.6 and 3.0 is EOL; it should be fine to scrub capsulethunk.

--

___
Python tracker 

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



[issue31635] test_strptime failure on OpenBSD

2018-09-14 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue32313] Wrong inspect.getsource for datetime

2018-09-14 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue34685] scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x

2018-09-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue34685] scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x

2018-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

What is failing is this line in the spawned process:

os.sched_getparam(0).sched_priority != {priority}

For some reason posix_spawn cannot change the priority in BSD. I have tried to 
hardcode the change in the implementation but the priority does not change in 
the child.

I am out of ideas, except skipping the tests on these systems.

--

___
Python tracker 

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



[issue3468] Satisfy her lovemaking desire

2018-09-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +8741

___
Python tracker 

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



[issue31392] Upgrade installers to OpenSSL 1.1.0g and 1.0.2n

2018-09-14 Thread Ned Deily


Ned Deily  added the comment:

Sorry, this should have been closed a while back.  We're now on to 1.0.2p for 
3.6.7 and 1.1.0i for 3.7.1.

--
resolution:  -> out of date
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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think Benjamin's diagnosis is correct. In which case, my f-string error 
reporting changes (see #34364) won't intersect with a fix to this issue.

--

___
Python tracker 

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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +eric.smith

___
Python tracker 

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



[issue34686] Add `-r`, as opposed to `-R` to Python core interpreter

2018-09-14 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

It would be preferable to fix build outputs to be deterministic even under 
randomization in the interpreter.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

I think ast.c is in the right here and there are two complementary bugs in 
caret printing and the parser.

print_error_text does this:

while (--offset > 0)
PyFile_WriteString(" ", f);

which is off-by-one if offset is zero-indexed (which it should be IMO).

The parser has an off-by-one error in the other direction. When it reports an 
error, it reports the offset of the tokenizer's "cur" buffer. This is generally 
advanced past the location that actually resulted in a parser error. I believe 
the parser should be fixed to report the error offset as the offset of the 
start of the token that caused the error.

--
nosy: +benjamin.peterson -eric.smith, xtreak

___
Python tracker 

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



[issue32933] mock_open does not support iteration around text files.

2018-09-14 Thread Anthony Flury


Anthony Flury  added the comment:

Thank you.

--

___
Python tracker 

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



[issue32933] mock_open does not support iteration around text files.

2018-09-14 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks, Ned!

Anthony, I'm one of the maintainers of https://github.com/testing-cabal/mock 
and I'd be happy to merge a PR that backports the fix to the PyPI version of 
mock.

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



[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-09-14 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue28955] Not matched behavior of numeric comparison with the documentation

2018-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset ca2fa2841f8e3ce5213a0e8c0abc1d0fdc7d386b by Miss Islington (bot) 
in branch '3.7':
closes bpo-28955: Clarified comparisons between NaN and number in reference 
documentation (GH-5982)
https://github.com/python/cpython/commit/ca2fa2841f8e3ce5213a0e8c0abc1d0fdc7d386b


--
nosy: +miss-islington

___
Python tracker 

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



[issue34685] scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x

2018-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Some extra stdout when I try to reproduce this on FreeBSD:

test_setscheduler_only_param (test.test_posix.TestPosixSpawn) ... Traceback 
(most recent call last):
  File "", line 5, in 
AttributeError: module 'os' has no attribute 'exit'
FAIL
test_setscheduler_with_policy (test.test_posix.TestPosixSpawn) ... Traceback 
(most recent call last):
  File "", line 5, in 
AttributeError: module 'os' has no attribute 'exit'
FAIL

--

___
Python tracker 

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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm doing some fairly major surgery on line and column numbers for fixing 
f-string errors. I'll see if I can include this case, too.

--
nosy: +eric.smith

___
Python tracker 

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



[issue34682] Typo reports on docs@

2018-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

Agreed with @geoffreyspear: "means" is okay, the rest of the changes look good.

--
nosy: +eric.smith

___
Python tracker 

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



[issue28955] Not matched behavior of numeric comparison with the documentation

2018-09-14 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset ad8a0004206ba7aec5a8a60fce413da718080db2 by Benjamin Peterson 
(Tony Flury) in branch 'master':
closes bpo-28955: Clarified comparisons between NaN and number in reference 
documentation (GH-5982)
https://github.com/python/cpython/commit/ad8a0004206ba7aec5a8a60fce413da718080db2


--
nosy: +benjamin.peterson
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



[issue28955] Not matched behavior of numeric comparison with the documentation

2018-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8740

___
Python tracker 

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



[issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple

2018-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 78aa3d8f5204bc856d7b2eb67288cf90c6a30660 by Eric V. Smith (Miss 
Islington (bot)) in branch '3.7':
bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are 
namedtuples. (GH-9151) (GH-9304)
https://github.com/python/cpython/commit/78aa3d8f5204bc856d7b2eb67288cf90c6a30660


--

___
Python tracker 

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



[issue34686] Add `-r`, as opposed to `-R` to Python core interpreter

2018-09-14 Thread Erwan Le Pape


New submission from Erwan Le Pape :

I'm attempting to leverage PEP 552 to make the core interpreter build process 
more deterministic. However, the standard Python Makefile uses `python -E` when 
calling the compileall (and all other setup scripts), which forces 
randomization since it can only be turned off through environment variables 
(which in turn leads to nondeterministic behaviour as noted in PEP 552 [1],[2]).

Also, is adding a flag that disables randomization something that would be 
acceptable? Or are options to the core interpreter to be kept to a minimum and 
this does not represent a large enough use-case?

This would basically hold in Modules/main.c in something as short as:
+ case 'r':
+ config->use_hash_seed = 1;
+ config->hash_seed = 0;
+ break;

--
components: Interpreter Core
messages: 325371
nosy: lepaperwan
priority: normal
severity: normal
status: open
title: Add `-r`, as opposed to `-R` to Python core interpreter
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34685] scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x

2018-09-14 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/87/builds/1428/steps/4/logs/stdio


==
ERROR: test_setscheduler_with_policy (test.test_posix.TestPosixSpawn)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_posix.py", 
line 1693, in test_setscheduler_with_policy
scheduler=(policy, os.sched_param(priority))
PermissionError: [Errno 1] Operation not permitted: 
'/usr/home/buildbot/python/3.x.koobs-freebsd10/build/python'
==
FAIL: test_setscheduler_only_param (test.test_posix.TestPosixSpawn)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_posix.py", 
line 1677, in test_setscheduler_only_param
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
AssertionError: Tuples differ: (96981, 256) != (96981, 0)
First differing element 1:
256
0
- (96981, 256)
? ^^^
+ (96981, 0)
? ^
--

--
components: Tests
messages: 325370
nosy: pablogsal
priority: normal
severity: normal
status: open
title: scheduler tests for posix_spawn fail on AMD64 FreeBSD 10.x Shared 3.x
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



[issue34684] Generate _geoslib.c with Cython 0.28.2 for Python 3.7 transition

2018-09-14 Thread Zachary Ware


Zachary Ware  added the comment:

_geoslib.c is not part of the core distribution of Python, and in fact I don't 
know which project it *is* part of.  I'm afraid you'll need to find its home 
project and report this there.

--
nosy: +zach.ware
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34672] '%Z' strftime specifier never works with musl

2018-09-14 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset b93062b7fbc965cd0d522f597ed51eb4e493dfc2 by Benjamin Peterson in 
branch 'master':
bpo-34672: Don't pass NULL to gmtime_r. (GH-9312)
https://github.com/python/cpython/commit/b93062b7fbc965cd0d522f597ed51eb4e493dfc2


--

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Yury Selivanov


Change by Yury Selivanov :


--
pull_requests: +8739

___
Python tracker 

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



[issue34684] Generate _geoslib.c with Cython 0.28.2 for Python 3.7 transition

2018-09-14 Thread shirish


New submission from shirish :

umm... I do not know about python other than python $something.py to run a 
python script. 

At Debian people are having an issue with not having _geoslib.c generated with 
a more recent Cython 0.28.2 for the transition. 

There is a patch and the bug has been put at 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903579

Could somebody have a look at it and recommend either at the bug-report or here 
what could be done to fix the issue.

--
components: Build
messages: 325367
nosy: shirish
priority: normal
severity: normal
status: open
title: Generate _geoslib.c with Cython 0.28.2 for Python 3.7 transition
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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue32313] Wrong inspect.getsource for datetime

2018-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue31635] test_strptime failure on OpenBSD

2018-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue33259] Encoding issue in the name of the local DST timezone

2018-09-14 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue34683] Caret positioned wrong for SyntaxError reported by ast.c

2018-09-14 Thread Guido van Rossum


New submission from Guido van Rossum :

Input file with a subtle error: a number where an assignment target is required:

for 1 in []: pass

Run it, it gives a SyntaxError.  Note how the caret pointing to the incorrect 
token is position one to the left of where you'd expect it:

  File "s.py", line 1
for 1 in []: pass
   ^
SyntaxError: can't assign to literal

For every syntax error I've seen that's produced by ast.c this seems to be the 
case -- the caret is always positioned 1 too far left.

I tried to understand how this is happening but my AST-fu is lacking. It seems 
this has been happening since ast.c started added column numbers -- in Python 
2.7 there's no caret at all, but in 3.4 and later there's a caret and it has 
the same problem. (Also in 3.3; I don't have 3.2 or older 3.x lying around to 
test.)

--
messages: 325366
nosy: gvanrossum
priority: low
severity: normal
status: open
title: Caret positioned wrong for SyntaxError reported by ast.c
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34672] '%Z' strftime specifier never works with musl

2018-09-14 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +8738

___
Python tracker 

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



[issue33649] asyncio docs overhaul

2018-09-14 Thread Carol Willing


Carol Willing  added the comment:


New changeset c9d66f0ed4f07b9d184d22abbfdd4c3c8e2702df by Carol Willing in 
branch 'master':
bpo-33649 Polish asyncio docs on queues, protocols, and subproccesses (#9306)
https://github.com/python/cpython/commit/c9d66f0ed4f07b9d184d22abbfdd4c3c8e2702df


--

___
Python tracker 

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



[issue32933] mock_open does not support iteration around text files.

2018-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8737

___
Python tracker 

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



[issue34676] Guarantie that divmod() and PyNumber_Divmod() return a 2-tuple

2018-09-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

-0 Perhaps this should be left as-is.  There is no known problem that we would 
be solving and it would add an extra step to a fine-grained function.  In 
general, I think we have these guards in places where it is known that 
downstream callers rely on a particular type signature for the return value.

--
nosy: +rhettinger

___
Python tracker 

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



[issue34682] Typo reports on docs@

2018-09-14 Thread Geoffrey Spear


Geoffrey Spear  added the comment:

"Means" is perfectly acceptable to use as a singular form: 
http://grammarist.com/usage/means/ (the rest of these all look like legitimate 
typos)

--
nosy: +geoffreyspear

___
Python tracker 

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



  1   2   >