[issue34615] subprocess.call wrong exit code

2018-09-11 Thread Kay Hayen


Kay Hayen  added the comment:

So I was confused indeed. 

Actually I am observing in other tests at least, that apparently Nuitka 
compiled execution in my tests can import _testcapi module, which normal 
execution of the test does not manage. 

Then there is the possibility that the exit code is indeed "0" and different.

The failure to import that module is old, and something I consider to raise as 
a separate issue. Closing this one as it's not worthy.

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



[issue32490] subprocess: duplicate filename in exception message

2018-09-11 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +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



[issue34624] -W option does not accept module regexes

2018-09-11 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



[issue34624] -W option does not accept module regexes

2018-09-11 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The original escape was done with 2a862c614d6d3ff50dc644150670651fdc9f3a99 
which was in 2000. The doc example you are referring to at [1] was added with 
https://bugs.python.org/issue31975 and there doesn't seem to be a test 
involving regular expression as I can see from the PR. Adding Nick to the issue 
since he had committed the doc and might help here.


[1] https://docs.python.org/3/library/warnings.html#describing-warning-filters

Thanks

--
nosy: +ncoghlan

___
Python tracker 

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



[issue11192] test_socket error on AIX

2018-09-11 Thread Michael Felt


Change by Michael Felt :


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



[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-09-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 2173bb818c6c726d831b106ed0d3fad7825905dc by Gregory P. Smith 
(Miss Islington (bot)) in branch '3.6':
bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242) (GH-9149)
https://github.com/python/cpython/commit/2173bb818c6c726d831b106ed0d3fad7825905dc


--

___
Python tracker 

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



[issue32490] subprocess: duplicate filename in exception message

2018-09-11 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue23855] Missing Sanity Check for malloc() in PC/_msi.c

2018-09-11 Thread Zackery Spytz


Change by Zackery Spytz :


--
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue30238] 2to3 doesn't detect or fix Exception indexing

2018-09-11 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



[issue34315] Regex not evalauated correctly

2018-09-11 Thread hongweipeng


hongweipeng  added the comment:

In my test in win2012r2, it works well. Add a screenshot.

--
nosy: +hongweipeng
Added file: https://bugs.python.org/file47794/win12r2py3.7.png

___
Python tracker 

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



[issue34605] Avoid master/slave terminology

2018-09-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm closing this now. Three out of four of Victor's PRs have been merged. The 
fourth one should not be merged because it reflects the underlying terminology 
of UNIX ptys. There's a remaining quibble about "pliant children" -> "helpers" 
but that can be dealt with as a follow-up PR without keeping this discussion 
open.

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



[issue34627] Python incorrect execution order

2018-09-11 Thread badrussians

New submission from badrussians :

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
print('');
import sys, os, subprocess, re, ctypes, tempfile, shutil, tarfile, 
urllib.request;
argsCount=len(sys.argv);
scriptDir = os.path.dirname(os.path.abspath(sys.argv[0]));


def FindFullPaths(strPattern, *orderedSearchDirs, \
  findFile=True, findDir=False, \
  ignoreCase=False, returnFirst=True):
print('#  FindFullPaths__In');
result = [];
def resultAppendUnique(item):
if item not in result:
result.append(item);
pattern = re.compile(strPattern, \
re.IGNORECASE | re.DOTALL if ignoreCase else re.DOTALL);
isFound = False;
for searchDir in orderedSearchDirs:
print('#searchDir', searchDir, orderedSearchDirs, '\n');
for leafName in os.listdir(searchDir):
leafPath = os.path.join(searchDir, leafName);
isDir = os.path.isdir(leafPath);
isFound = (findDir and isDir or \
   findFile and 
os.path.isfile(leafPath)) \
and pattern.search(leafName) is 
not None;
print('#leafPath:', leafPath, '\n'); #ERROR = output 
Last AND last time - no in output!
print('#isFound:', isFound); #ERROR = output 
First AND first time - no in output!
if isFound:
resultAppendUnique(leafPath);
if isDir and not (returnFirst and isFound):
for partLeafPath in FindFullPaths(strPattern, 
leafPath, \
findFile=findFile, 
findDir=findDir, \
ignoreCase=ignoreCase, 
returnFirst=returnFirst):
resultAppendUnique(partLeafPath);
isFound = True;
if returnFirst and isFound:
break;
if returnFirst and isFound:
break;
print('#  FindFullPaths__Return');
return result; 

FindFullPaths('^bat$', '/home/user/Рабочий стол/ttt');
print(sys.version);

 OUTPUT: 
'/home/user/Рабочий стол/test2.py' 

#  FindFullPaths__In
#searchDir /home/user/Рабочий стол/ttt ('/home/user/Рабочий стол/ttt',) 

#leafPath: /home/user/Рабочий стол/ttt/BackupRestore.py 

#isFound: False
#leafPath: /home/user/Рабочий стол/ttt/temp.py 

#isFound: False
#leafPath: /home/user/Рабочий стол/ttt/Create ISO.py 

#isFound: False
#  FindFullPaths__Return
3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0]
## Environment ##
Russian Ubuntu 18.04.1 and Kali 2018.3
PS: Ru:'/home/user/Рабочий стол' == Eng'/home/user/Desktop'

--
components: Interpreter Core
files: test2.py
messages: 324996
nosy: badrussians
priority: normal
severity: normal
status: open
title: Python incorrect execution order
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47795/test2.py

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



[issue34627] Python incorrect execution order

2018-09-11 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Can you please describe the problem and the output you are expecting so that we 
can determine if it's a bug in Python or the logic of the code which will get 
better help from sites stackoverflow ? It will be helpful if you can do `tree` 
on the search directory if it's small so that it will be helpful to replicate 
the structure for test too.

Please consider using 4 space instead of tabs as per PEP8 and semicolon is not 
needed at the end of statements. A little cleaned up version of the same 
program.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
print('')
import sys, os, subprocess, re, ctypes, tempfile, shutil, tarfile, 
urllib.request
argsCount=len(sys.argv)
scriptDir = os.path.dirname(os.path.abspath(sys.argv[0]))


def FindFullPaths(strPattern, *orderedSearchDirs, \
  findFile=True, findDir=False, \
  ignoreCase=False, returnFirst=True):
print('#  FindFullPaths__In')
result = []

def resultAppendUnique(item):
if item not in result:
result.append(item)

pattern = re.compile(strPattern, \
 re.IGNORECASE | re.DOTALL if ignoreCase else re.DOTALL)
isFound = False
for searchDir in orderedSearchDirs:
print('#searchDir', searchDir, orderedSearchDirs, '\n')
for leafName in os.listdir(searchDir):
leafPath = os.path.join(searchDir, leafName)
isDir = os.path.isdir(leafPath)
isFound = (findDir and isDir or \
   findFile and os.path.isfile(leafPath)) \
   and pattern.search(leafName) is not None
print('#leafPath:', leafPath, '\n') #ERROR = output Last AND last 
time - no in output!
print('#isFound:', isFound) #ERROR = output First AND first time - 
no in output!
if isFound:
resultAppendUnique(leafPath)
if isDir and not (returnFirst and isFound):
for partLeafPath in FindFullPaths(strPattern, leafPath, \
  findFile=findFile, 
findDir=findDir, \
  ignoreCase=ignoreCase, 
returnFirst=returnFirst):
resultAppendUnique(partLeafPath)
isFound = True;
if returnFirst and isFound:
break;
if returnFirst and isFound:
break;
print('#  FindFullPaths__Return')
return result

FindFullPaths('^bat$', '/tmp/')
print(sys.version)



Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2018-09-11 Thread Martijn Pieters


Martijn Pieters  added the comment:

I'm trying to figure out why Windows won't let us do this. I think the reason 
is that sys.std(in|out) filehandles are not opened as pipes, and do not have 
the required OVERLAPPED flag set (see the CreateIoCompletionPort documentation 
at 
https://docs.microsoft.com/en-us/windows/desktop/fileio/createiocompletionport; 
it's that function that is used to handle pipes (via IocpProactor.recv -> 
IocpProactor._register_with_iocp -> overlapped.CreateIoCompletionPort).

The solution then would be to create a pipe for a stdio filehandle with the 
flag set.

And that's where my Windows-fu ends, and where I lack the VM and motivation to 
go try that out.

--
nosy: +mjpieters

___
Python tracker 

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



[issue31535] configparser unable to write comment with a upper cas letter

2018-09-11 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Ah sorry, didn't notice it was about comments. It seems config.optionxform = 
str has no effect on comments.

Thanks

--

___
Python tracker 

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



[issue31535] configparser unable to write comment with a upper cas letter

2018-09-11 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

All config options are converted to lowercase when they are stored. You can 
customise this with 
https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.optionxform.
 You can customize it more with 
https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour

>  Note also that keys in sections are case-insensitive and stored in lowercase 

>>> from configparser import ConfigParser
>>> c = ConfigParser()
>>> c["A"] = {'FOO': 'bar'}
>>> with open('example.ini', 'w') as configfile: c.write(configfile)
...
>>> with open('example.ini', 'r') as configfile: print(configfile.read())
...
[A]
foo = bar


# Don't convert to lower case

>>> d = ConfigParser()
>>> d.optionxform = str
>>> d["A"] = {'FOO': 'bar'}
>>> with open('example_case.ini', 'w') as configfile: d.write(configfile)
...
>>> with open('example_case.ini', 'r') as configfile: print(configfile.read())
...
[A]
FOO = bar


Hope this answers your question. Feel free to close this if it's clear.

Thanks

--

___
Python tracker 

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



[issue34627] Python incorrect execution order

2018-09-11 Thread badrussians


badrussians  added the comment:

Big Sorry - it is my mistake. In terminal I execute same file, but in other 
location.

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

___
Python tracker 

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



[issue31535] configparser unable to write comment with a upper cas letter

2018-09-11 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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-09-11 Thread Vijay


Vijay  added the comment:

can someone please clarify, is it a pywin32 issue or python3.7 issue?.

--

___
Python tracker 

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



[issue21314] Document '/' in signatures

2018-09-11 Thread Berker Peksag


Berker Peksag  added the comment:

Welcome, Noah! Feel free to work on this issue, but please note that there is 
no consensus on the best place to document / signatures, so you may need to 
move your changes between locations (e.g. from Doc/faq/programming.rst to 
Doc/gloassary.rst) before we merge your work.

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

___
Python tracker 

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



[issue31535] configparser unable to write comment with a upper cas letter

2018-09-11 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Ah my bad again. The config.optionxform = str does the trick. I was using an 
older object.

from configparser import ConfigParser

config = ConfigParser(allow_no_value=True)
config.optionxform = str
config.add_section('default_settings')
config.set('default_settings', '; comment HERE')

with open('example_case.ini', 'w') as configfile: config.write(configfile)
with open('example_case.ini', 'r') as configfile: print(configfile.read())


Thanks

--

___
Python tracker 

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



[issue34633] Simplify __reduce__ for ordered dict iterators

2018-09-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 4859ba0d2ce4506fddc3f55f90f8dce031b3804f by Benjamin Peterson 
(Max Bélanger) in branch 'master':
closes bpo-31903: Release the GIL when calling into SystemConfiguration 
(GH-4178)
https://github.com/python/cpython/commit/4859ba0d2ce4506fddc3f55f90f8dce031b3804f


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



[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:

> (...) the locale should be coerced before *ANY* calls are made to 
> Py_DecodeLocale, as the whole point of the architecture of the PEP 
> implementation was to ensure that *nothing ever gets decoded incorrectly in 
> the first place*.

See my comment:
https://github.com/python/cpython/pull/9073#issuecomment-420461537

--

___
Python tracker 

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



[issue34605] Avoid master/slave terminology

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset fa7dfae3171914f91d629a64c6e829788b485b06 by Miss Islington (bot) 
(Victor Stinner) in branch 'master':
bpo-34605: Replace "pliant children" with "helpers" (GH-9195)
https://github.com/python/cpython/commit/fa7dfae3171914f91d629a64c6e829788b485b06


--
nosy: +miss-islington

___
Python tracker 

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



[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-09-11 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue31903] `_scproxy` calls SystemConfiguration functions in a way that can cause deadlocks

2018-09-11 Thread Ned Deily


Ned Deily  added the comment:

Thanks, Benjamin!

Ronald, do you think this should be backported?

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2018-09-11 Thread Jeffrey Walton


Jeffrey Walton  added the comment:

On Tue, Sep 11, 2018 at 8:26 PM, STINNER Victor  wrote:
>
> STINNER Victor  added the comment:
>
>> newsize <<= 1; // The largest possible value is PY_SSIZE_T_MAX + 1.
>
> Previously, there was a explicitly check for error raising  PyErr_NoMemory() 
> on overflow. Now you rely on PyMem_Malloc() to detect the overflow. I'm not 
> sure that it's a good idea.

+1. It will probably work as expected on Solaris and other OSes that
don't oversubscribe memory. It will probably fail in unexpected ways
on Linux when the allocation succeeds but then the OOM killer hits a
random process.

Jeff

--

___
Python tracker 

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



[issue34642] time.ctime() uses %3d instead of %.2d to format.

2018-09-11 Thread William Chaseling


New submission from William Chaseling :

time.ctime() returns _asctime from a C module.
_asctime returns a PyUnicode_FromFormat() result using "%s %s%3d %.2d:%.2d:%.2d 
%d" as the string formatter.

This works: 'Wed Sep 12 22:30:00 2018'
Except when day <10, because it uses %3d instead of %.2d
'Wed Sep  2 22:30:00 2018'

This seems like it might be intended behavior for some reason, but I don't see 
the reason.

--
components: Library (Lib)
messages: 325114
nosy: William Chaseling
priority: normal
severity: normal
status: open
title: time.ctime() uses %3d instead of %.2d to format.
type: behavior
versions: Python 3.7

___
Python tracker 

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



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

2018-09-11 Thread Valentin Zhao

Valentin Zhao  added the comment:

Sorry I posted a wrong pic.

--
Added file: https://bugs.python.org/file47798/build前.png

___
Python tracker 

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



[issue31902] Fix col_offset for ast nodes: AsyncFor, AsyncFunctionDef, AsyncWith

2018-09-11 Thread miss-islington


New submission from miss-islington :


New changeset 90fc8980bbcc5c7dcced3627fe172b0bfd193a3b by Miss Islington (bot) 
(guoci) in branch 'master':
closes bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point to 
the "async" keyword. (GH-4175)
https://github.com/python/cpython/commit/90fc8980bbcc5c7dcced3627fe172b0bfd193a3b


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



[issue32055] Reconsider comparison chaining for containment tests

2018-09-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I agree that it would be less confusing if `in`/`not in` did not allow 
chaining, the occasional (surely very rare) useful example notwithstanding.

Then again if we're going to forbid (or even discourage) unusual combinations 
we might also want to frown at `a < b > c` -- surely in mathematical circles 
the chaining always goes in one direction only, e.g. `a < b <= c` or `a >= b 
==c > d`.

Finally as long as we're refining the terminology, maybe we could strive to 
distinguish "comparison" (`==` and `!=`) from "ordering" (`<`, `<=`, `>`, `>=`)?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2018-09-11 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
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-09-11 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Thank you, Gregory. I didn't intend to add the warning to stable branches -- 
it's just that 3.7 hasn't been released yet when this report was submitted.

--

___
Python tracker 

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



[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-09-11 Thread Ethan Furman


Change by Ethan Furman :


--
keywords: +patch, patch, patch
pull_requests: +8636, 8637, 8638
stage:  -> patch review

___
Python tracker 

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



[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-09-11 Thread Ethan Furman


Change by Ethan Furman :


--
keywords: +patch, patch
pull_requests: +8636, 8637
stage:  -> patch review

___
Python tracker 

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



[issue34640] remove the configure check TANH_PRESERVES_ZERO_SIGN

2018-09-11 Thread Benjamin Peterson


New submission from Benjamin Peterson :

configure.ac currently has to check for a bug in FreeBSD 6.2:

# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
AC_MSG_CHECKING(whether tanh preserves the sign of zero)
...

FreeBSD 6.2 is nearing 12 years old. It looks like the FreeBSD 10 bot is 
passing this check. So, I think we should remove this configure check.

--
messages: 325106
nosy: benjamin.peterson, mark.dickinson
priority: normal
severity: normal
status: open
title: remove the configure check TANH_PRESERVES_ZERO_SIGN

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:

> newsize <<= 1; // The largest possible value is PY_SSIZE_T_MAX + 1. 

Previously, there was a explicitly check for error raising  PyErr_NoMemory() on 
overflow. Now you rely on PyMem_Malloc() to detect the overflow. I'm not sure 
that it's a good idea.

--

___
Python tracker 

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset e351fe241c1fcb8cd739b08e21d2bb2f2b4c8c89 by Miss Islington (bot) 
(Steve Dower) in branch '2.7':
[2.7] bpo-34405: Updated to OpenSSL 1.0.2p for Windows builds. (GH-8776) 
(GH-9202)
https://github.com/python/cpython/commit/e351fe241c1fcb8cd739b08e21d2bb2f2b4c8c89


--

___
Python tracker 

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



[issue34642] time.ctime() uses %3d instead of %.2d to format.

2018-09-11 Thread William Chaseling


William Chaseling  added the comment:

It's easy to get around using .replace('  ', ' '), but it's still a bit 
annoying.

--

___
Python tracker 

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



[issue34642] time.ctime() uses %3d instead of %.2d to format.

2018-09-11 Thread Martin Panter


Martin Panter  added the comment:

I think "ctime" and "asctime" are supposed to wrap or imitate the standard C 
functions: , so I think this 
is intended behaviour. But see Issue 13927 about improving the documentation.

For a single-digit day of the month, there is supposed to be two spaces. Using 
"%.2d" would produce "Sep02" or "Sep 02", with a leading zero. On the other 
hand, changing the double space to a single space would produce "Sep 2", 
without a leading zero.

--
nosy: +martin.panter
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
superseder:  -> Extra spaces in the output of time.ctime

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2018-09-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset c4bccd3c7617018b1ce16f95840ffe1a890d44df by Raymond Hettinger 
(Tal Einat) in branch 'master':
bpo-20180: convert most of itertoolsmodule.c to use Argument Clinic (GH-9164)
https://github.com/python/cpython/commit/c4bccd3c7617018b1ce16f95840ffe1a890d44df


--

___
Python tracker 

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



[issue33714] module can set an exception in tp_clear

2018-09-11 Thread Petr Viktorin


Petr Viktorin  added the comment:

I'm not sure what tp_clear should do in this situation.
Other than propagating the exception to the GC, the most reasonable behavior 
seems to be to write the exception to stderr and ignore it -- but I think 
having the GC do that would be more robust.

IOW, I think raising an exception from tp_clear is reasonable, and if that 
caused (causes?) a crash, it's a bug.

--

___
Python tracker 

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread Ned Deily


Ned Deily  added the comment:


New changeset 31912b43c903aafad09350899ed6a9dec7c43421 by Ned Deily in branch 
'3.6':
bpo-34405: Update to OpenSSL 1.0.2p for macOS installer builds (GH-9191)
https://github.com/python/cpython/commit/31912b43c903aafad09350899ed6a9dec7c43421


--

___
Python tracker 

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8632

___
Python tracker 

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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2018-09-11 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +8643

___
Python tracker 

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



[issue34641] Curiosity: f((a)=1) is not a syntax error -- why?

2018-09-11 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

I expect you'd have to make the check of test nodes in ast.c stricter. Here's a 
slightly gross implementation of that:

diff --git a/Python/ast.c b/Python/ast.c
index 94962e00c7..b7cebf4777 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -2815,15 +2815,22 @@ ast_for_call(struct compiling *c, const node *n, 
expr_ty func, bool allowgen)
 identifier key, tmp;
 int k;
 
-/* chch is test, but must be an identifier? */
-e = ast_for_expr(c, chch);
-if (!e)
+static const int chain[] = {test, or_test, and_test, not_test, 
comparison, expr, xor_expr, and_expr, shift_expr, arith_expr, term, factor, 
power, atom_expr, atom, 0};
+
+node *expr_node = chch;
+for (int i = 0; chain[i]; i++) {
+if (TYPE(expr_node) != chain[i])
+break;
+if (NCH(expr_node) != 1)
+break;
+expr_node = CHILD(expr_node, 0);
+}
+if (TYPE(expr_node) != NAME) {
+ast_error(c, chch,
+"keyword can't be an expression");
 return NULL;
-/* f(lambda x: x[0] = 3) ends up getting parsed with
- * LHS test = lambda x: x[0], and RHS test = 3.
- * SF bug 132313 points out that complaining about a keyword
- * then is very confusing.
- */
+}
+e = ast_for_expr(c, chch);
 if (e->kind == Lambda_kind) {
 ast_error(c, chch,
 "lambda cannot contain assignment");

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:

Petr Viktorin asked me to open a wider discussion about this issue on 
python-dev. I just reverted my first change and posted:
https://mail.python.org/pipermail/python-dev/2018-September/155150.html

--

___
Python tracker 

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



[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 998b80636690ffbdb0a278810d9c031fad38631d by Victor Stinner in 
branch 'master':
Revert "bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)" (GH-9187)
https://github.com/python/cpython/commit/998b80636690ffbdb0a278810d9c031fad38631d


--

___
Python tracker 

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



[issue34605] Avoid master/slave terminology

2018-09-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8631

___
Python tracker 

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



[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-11 Thread STINNER Victor

STINNER Victor  added the comment:

Example of C locale coercion with Python 3.7:

$ env -i PYTHONCOERCECLOCALE=0 ./python -X utf8=0 -c 'import sys; 
print(ascii(sys.argv[1]))' 'hé'
'h\udcc3\udca9'

$ env -i PYTHONCOERCECLOCALE=1 ./python -X utf8=0 -c 'import sys; 
print(ascii(sys.argv[1]))' 'hé'
'h\xe9'

It works as expected no? What's wrong with the current implementation according 
to you, Nick?

--

___
Python tracker 

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



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset ec014a101a7f6243b95dfc08acfe1542b9fa5d39 by Miss Islington (bot) 
(Sergey Fedoseev) in branch 'master':
bpo-34636: Use fast path for more chars in SRE category macros. (GH-9170)
https://github.com/python/cpython/commit/ec014a101a7f6243b95dfc08acfe1542b9fa5d39


--
nosy: +miss-islington

___
Python tracker 

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



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

2018-09-11 Thread Brett Cannon


Brett Cannon  added the comment:

I'm agreeing with all the other core devs (other than Victor ;) that I don't 
quite think this should go in. While I appreciate the work Pierre put into the 
PR, I just can't find myself to want to deal with future bug reports for this 
while http.server is meant for really simple testing scenarios.

My suggestion would be to toss it up on PyPI and if there is major uptake then 
we can revisit this, but right now I just don't think the long-term support 
costs are worth the benefit the new feature brings.

--
nosy: +brett.cannon
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



[issue1621] Do not assume signed integer overflow behavior

2018-09-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8634

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset 6c7d67ce83a62b5f0fe5c53a6df602827451bf7f by Miss Islington (bot) 
(Sergey Fedoseev) in branch 'master':
bpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059)
https://github.com/python/cpython/commit/6c7d67ce83a62b5f0fe5c53a6df602827451bf7f


--
nosy: +miss-islington

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2018-09-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8633

___
Python tracker 

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



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage:  -> commit review
status: open -> closed

___
Python tracker 

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



[issue34640] remove the configure check TANH_PRESERVES_ZERO_SIGN

2018-09-11 Thread Benjamin Peterson


Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread Ned Deily


Change by Ned Deily :


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



[issue25041] document AF_PACKET socket address format

2018-09-11 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset cadb66e173ded86ebc85b54889db48f66e7af592 by Benjamin Peterson in 
branch '3.7':
[3.7] closes bpo-25041: Document AF_PACKET socket address format. (GH-9207)
https://github.com/python/cpython/commit/cadb66e173ded86ebc85b54889db48f66e7af592


--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2018-09-11 Thread Sergey Fedoseev


Sergey Fedoseev  added the comment:

> Now you rely on PyMem_Malloc() to detect the overflow.

Now overflow is not possible or am I missing something?

--
nosy: +sir-sigurd

___
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-11 Thread Valentin Zhao

New submission from Valentin Zhao :

I am going to build a Python.exe to migrate it to another PC, in order to build 
a seemingly virtual *environment* of Python which could run python files. What 
I do to implement this is to *COPY* \win32 folder to another pc then execute 
python.exe with specific python file path tagged along.

For now, it works well, however, I met with a strange problem that I cannot 
find *tcl* under current file hierarchy and this library is generated very 
deeply so I have to extract it to the root directory manually. 

Surprisingly, I found that I can directly *COPY* all the folders generated by 
*msi installer* to another pc then use it. Nevertheless, I fret about there 
could be some registration thing during installation.

So how could I compile the source and make it generate folder hierarchy like 
the release version(like the snapshot I attached below)? I have read README.md 
in the \PCBuild yet it helps little.

--
components: Windows
files: build后结构.png
messages: 325116
nosy: Valentin Zhao, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: How to build Release Version of Python in Windows?
type: compile error
versions: Python 3.6
Added file: https://bugs.python.org/file47797/build后结构.png

___
Python tracker 

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



[issue34641] Curiosity: f((a)=1) is not a syntax error -- why?

2018-09-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +8629

___
Python tracker 

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



[issue31902] Fix col_offset for ast nodes: AsyncFor, AsyncFunctionDef, AsyncWith

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset d8bc7a666b1309aa5669980e35e7429071f3f7d3 by Miss Islington (bot) 
in branch '3.7':
closes bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point to 
the "async" keyword. (GH-4175)
https://github.com/python/cpython/commit/d8bc7a666b1309aa5669980e35e7429071f3f7d3


--

___
Python tracker 

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



[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:

> (...) The documentation could definitely be much clearer on that point 
> though, as even in the PEP it's only implied by the final paragraph in 
> https://www.python.org/dev/peps/pep-0538/#legacy-c-locale-coercion-in-the-standalone-python-interpreter-binary
>  which is mostly talking about the fact that this particular environment 
> variable is still checked, even if you pass the -I or -E command line options.

That's a separated issue: I created bpo-34639.

--

___
Python tracker 

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



[issue34639] PYTHONCOERCECLOCALE is ignored when using -E or -I option

2018-09-11 Thread STINNER Victor


New submission from STINNER Victor :

I modified Py_Main() to ignore the PYTHONCOERCECLOCALE environment variable if 
-E or -I command line option is used. But Nick asks to always read 
PYTHONCOERCECLOCALE.

We should either update the PEP or change the code.

I am not sure why PYTHONCOERCECLOCALE should be handled differently than other 
PYTHON* variable like PYTHONWARNINGS or PYTHONUTF8. Is it because it impacts 
the encodings? Is it because there was a chicken-and-egg issue before I 
reworked Py_Main() code? (PYTHONCOERCECLOCALE env var was read before reading 
command line arguments.)

--

Copy of Nick Coghlan's msg325009:

(The one exception to "nothing gets decoded incorrectly" is that 
PYTHONCOERCECLOCALE itself is always interpreted as an ASCII field: the values 
that it checks for are actually ASCII byte sequences, not Unicode code points.

The documentation could definitely be much clearer on that point though, as 
even in the PEP it's only implied by the final paragraph in 
https://www.python.org/dev/peps/pep-0538/#legacy-c-locale-coercion-in-the-standalone-python-interpreter-binary
 which is mostly talking about the fact that this particular environment 
variable is still checked, even if you pass the -I or -E command line options.

--
components: Interpreter Core
messages: 325096
nosy: vstinner
priority: normal
severity: normal
status: open
title: PYTHONCOERCECLOCALE is ignored when using -E or -I option
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



[issue34638] Avoid circular references in asyncio streams

2018-09-11 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 Thread Steve Dower


Steve Dower  added the comment:

Woo! Thanks Raymond!

--
nosy: +steve.dower

___
Python tracker 

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



[issue24412] setUpClass equivalent for addCleanup

2018-09-11 Thread Lisa Roach


Change by Lisa Roach :


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



[issue33649] asyncio docs overhaul

2018-09-11 Thread Yury Selivanov


Change by Yury Selivanov :


--
pull_requests: +8630

___
Python tracker 

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



[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2018-09-11 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



[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-09-11 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Thank you, Gregory!

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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Currently, we can write:

>>> sum(range(10), 50)
95

What we want to allow:

>>> sum(range(10), start=50)
95

The positional form would still be allowed.

--
assignee: rhettinger
components: Library (Lib)
messages: 325092
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Make *start* usable as a keyword argument for sum().
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



[issue34638] Avoid circular references in asyncio streams

2018-09-11 Thread Andrew Svetlov


New submission from Andrew Svetlov :

Now we have a cross-reference between asyncio stream reader and protocol.

It prevents objects deletion on ref-counting and requires a garbage collector 
run to destroy the stream.

--
components: asyncio
messages: 325095
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Avoid circular references in asyncio streams
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



[issue34641] Curiosity: f((a)=1) is not a syntax error -- why?

2018-09-11 Thread Guido van Rossum


New submission from Guido van Rossum :

Emily and I just discovered that f((a)=1) is accepted and compiled the same as 
f(a=1). This goes against the intention that keyword arguments have the syntax 
f(NAME=expr).

I suspect that this behavior was introduced at the time we switched from 
generating from the (concrete) parse tree to first converting to an ast and 
then generating code from there. I.e. in the distant past (long before 2.7 
even).

But I still think it ought to be fixed. Thoughts? Anyone have an idea *where* 
to fix it?

--
messages: 325107
nosy: emilyemorehouse, gvanrossum
priority: normal
severity: normal
status: open
title: Curiosity: f((a)=1) is not a syntax error -- why?
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



[issue25041] document AF_PACKET socket address format

2018-09-11 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 731ff68eeef58babdf2b32dc9a73b141760c2be9 by Benjamin Peterson 
(Cheryl Sabella) in branch 'master':
closes bpo-25041: Document AF_PACKET socket address format. (GH-4092)
https://github.com/python/cpython/commit/731ff68eeef58babdf2b32dc9a73b141760c2be9


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



[issue34641] Curiosity: f((a)=1) is not a syntax error -- why?

2018-09-11 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



[issue34606] Unable to read zip file with extra

2018-09-11 Thread Vladimir Matveev


Vladimir Matveev  added the comment:

In this particular case looks like a crux of the problem was in the fact that 
compression encodes extra fields only if either zip64 is set or length of the 
field is larger than threshold but decompression always tries to decode it. 
Attached PR switches decoding to be conditioned on the presence of zip64 end of 
central directory record.

--
nosy: +v2m

___
Python tracker 

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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Is not this a duplicate of issue31141?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Confirming the microoptimization here with a non-debug (opt) build:

~/oss/cpython$ sre-before/python -m timeit -s "import re; s = (b'~' * 100); 
f = re.compile(b'\s\w\d').search" "f(s)"
20 loops, best of 5: 11 msec per loop
~/oss/cpython$ sre-after/python -m timeit -s "import re; s = (b'~' * 100); 
f = re.compile(b'\s\w\d').search" "f(s)"
20 loops, best of 5: 10.1 msec per loop

Those results are consistent across reruns.

--

___
Python tracker 

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



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread Gregory P. Smith


New submission from Gregory P. Smith :

filing this issue to track https://github.com/python/cpython/pull/9170

--
assignee: gregory.p.smith
messages: 325073
nosy: gregory.p.smith
priority: normal
pull_requests: 8627
severity: normal
status: open
title: re module microoptimization: speed up bytes \w \s \d matching
type: performance
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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

+1 agreed.

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset aa02ab15aed9d0b70f619c186326594c0d50bdd6 by Miss Islington (bot) 
in branch '2.7':
[2.7] bpo-34405: Update to OpenSSL 1.0.2p for macOS installer builds (GH-9191) 
(GH-9196)
https://github.com/python/cpython/commit/aa02ab15aed9d0b70f619c186326594c0d50bdd6


--

___
Python tracker 

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



[issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p

2018-09-11 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +8639

___
Python tracker 

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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I suggest also allowing the first argument to be a keyword named sequence= as 
well.  (along the philosophy of positional only arguments on APIs that happen 
to be implemented in C in CPython are a bad legacy)

pypy already uses these names:
 
https://bitbucket.org/pypy/pypy/src/4cbeaa8bf545332c36ae277019772aa432693e4c/pypy/module/__builtin__/app_functional.py?at=default=file-view-default#app_functional.py-41

--

___
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-11 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 8be876e44b2dffb96b551029454cbfb16d697992 by Yury Selivanov in 
branch 'master':
bpo-33649: Cleanup asyncio/streams and asyncio/synchronization docs (GH-9192)
https://github.com/python/cpython/commit/8be876e44b2dffb96b551029454cbfb16d697992


--

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2018-09-11 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +8641

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2018-09-11 Thread Tal Einat


Tal Einat  added the comment:

Now just the collections module is left from this group.

Raymond, what would you like done with it WRT AC conversion, if at all?

--

___
Python tracker 

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



[issue31902] Fix col_offset for ast nodes: AsyncFor, AsyncFunctionDef, AsyncWith

2018-09-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8626

___
Python tracker 

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



[issue29051] Improve error reporting involving f-strings (PEP 498)

2018-09-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Because this issue describes two different problems, I'm going to close it.

The part of it that involves errors during the evaluation of a syntactically 
valid expression was at least partially fixed in #30465. I will probably 
re-work how this fix was implemented.

I'm working on the syntax error part of it in #34364.

--
dependencies:  -Tracebacks should contain the first line of continuation lines
resolution:  -> duplicate
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



[issue34579] test_embed.InitConfigTests fail on AIX

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:

What is the output of "./Programs/_testembed init_default_config"?

--

___
Python tracker 

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



[issue34579] test_embed.InitConfigTests fail on AIX

2018-09-11 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, you should run "env -i ./Programs/_testembed init_default_config" to run 
the program in an empty environment. test_embed modifies os.environ to remove 
all PYTHON* env vars.

--

___
Python tracker 

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



[issue34637] Make *start* usable as a keyword argument for sum().

2018-09-11 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



[issue32490] subprocess: duplicate filename in exception message

2018-09-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This code was added in issue4925. Is the original problem gone?

--
nosy: +benjamin.peterson, serhiy.storchaka

___
Python tracker 

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



[issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam

2018-09-11 Thread William Grzybowski


Change by William Grzybowski :


--
pull_requests: +8608

___
Python tracker 

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



[issue28617] Why isn't "in" called a comparison operation?

2018-09-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think that "types that are :term:`iterable` or implement the 
:meth:`__contains__` method" is too low-level for this section.

In this section we tell about builtin types. From those the types that support 
`in` and `not in` are list, tuple, dict, set, frozenset, str, bytes, bytearray, 
memoryview, and iterator types. We can just enumerate them or use general word. 
Calling the "sequence types" is not correct, but fortunately all of them are 
iterable, so that we can say just "iterable types described below". Or 
enumerate categories of types, as they are named in the below subsections: 
"iterator types, sequence types, str, binary sequence types, set types and 
dict", with links to corresponding subsections.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34465] ipaddress should accept bytearray in addition to bytes

2018-09-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See issue27572 for moving in opposite direction. Supporting the buffer protocol 
rather of just bytes and bytearray complicates the code, and can be considered 
as a feature creep, especially if an input is a text encoded as bytes.

But in this case the bytes argument of IPv4Address() is not a text 
representation like b'127.0.0.1', but a packed array of bytes like bytes([127, 
0, 0, 1]). Accepting bytearray and memoryview makes more sense for it. Yet I'm 
not sure that supporting them is worth adding an overhead. This will affect 
every call of the IPv4Address constructor, and I think that this is not the 
most common case.

Maybe add a special purposed named constructor IPv4Address.from_bytes() that 
will accept any objects supporting the buffer protocol?

--

___
Python tracker 

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



  1   2   >