[issue34515] lib2to3: support non-ASCII identifiers

2018-08-26 Thread monson


Change by monson :


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

___
Python tracker 

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



[issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76)

2018-08-26 Thread AldarisPale


AldarisPale  added the comment:

Hi!

I hit this bug on python 3.4.

For the reference here are two email sources. The first one works while the 
second one does not. Both were produced using smtplib the only difference being 
the workaround proposed by Douglas Thor.
I hit this bug when using K-9 mail for reading e-mails.
Relevant github link: 
https://github.com/k9mail/k-9/issues/1659#issuecomment-416074768

This one works:
---

Return-Path: 
X-Original-To: recei...@receiverdomain.com
Delivered-To: recei...@receiverdomain.com
Received: from [127.0.0.1] (smtp [127.0.0.1])
by smtp.receiverdomain.com (Postfix) with ESMTP id 2697F23C0063
for ; Mon, 27 Aug 2018 09:20:15 +0300 
(EEST)
Subject: Malformed base64
From: sen...@senderdomain.com
To: recei...@receiverdomain.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Message-Id: <20180827062015.2697f23c0...@smtp.receiverdomain.com>
Date: Mon, 27 Aug 2018 09:20:15 +0300 (EEST)

Q09OVEVOVF9MRU5HVEg6IDEyMzQ1Njc4OTBhYmNkZWYNCkNPTlRFTlRfVFlQRTogMTIzNDU2Nzg5
MGFiY2RlZg0KQ09OVEVYVF9ET0NVTUVOVF9ST09UOiAxMjM0NTY3ODkwYWJjZGVmDQpDT05URVhU
X1BSRUZJWDogMTIzNDU2Nzg5MGFiY2RlZg0KRE9DVU1FTlRfUk9PVDogMTIzNDU2Nzg5MGFiY2Rl
Zg0KR0FURVdBWV9JTlRFUkZBQ0U6IDEyMzQ1Njc4OTBhYmNkZWYNCkhUVFBTOiAxMjM0NTY3ODkw
YWJjZGVmDQpIVFRQX0FDQ0VQVDogMTIzNDU2Nzg5MGFiY2RlZg0KSFRUUF9BQ0NFUFRfRU5DT0RJ
Tkc6IDEyMzQ1Njc4OTBhYmNkZWYNCkhUVFBfQUNDRVBUX0xBTkdVQUdFOiAxMjM0NTY3ODkwYWJj
ZGVmDQpIVFRQX0NBQ0hFX0NPTlRST0w6IDEyMzQ1Njc4OTBhYmNkZWYNCkhUVFBfQ09OTkVDVElP
TjogMTIzNDU2Nzg5MGFiY2RlZg0KSFRUUF9ETlQ6IDEyMzQ1Njc4OTBhYmNkZWYNCkhUVFBfSE9T
VDogMTIzNDU2Nzg5MGFiY2RlZg0KSFRUUF9PUklHSU46IDEyMzQ1Njc4OTBhYmNkZWYNCkhUVFBf
UkVGRVJFUjogMTIzNDU2Nzg5MGFiY2RlZg0KSFRUUF9VUEdSQURFX0lOU0VDVVJFX1JFUVVFU1RT
OiAxMjM0NTY3ODkwYWJjZGVmDQpIVFRQX1VTRVJfQUdFTlQ6IDEyMzQ1Njc4OTBhYmNkZWYNClBB
VEg6IDEyMzQ1Njc4OTBhYmNkZWYNClFVRVJZX1NUUklORzogMTIzNDU2Nzg5MGFiY2RlZg0KUkVE
SVJFQ1RfSFRUUFM6IDEyMzQ1Njc4OTBhYmNkZWYNClJFRElSRUNUX1NTTF9UTFNfU05JOiAxMjM0
NTY3ODkwYWJjZGVmDQpSRURJUkVDVF9TVEFUVVM6IDEyMzQ1Njc4OTBhYmNkZWYNClJFRElSRUNU
X1VOSVFVRV9JRDogMTIzNDU2Nzg5MGFiY2RlZg0KUkVESVJFQ1RfVVJMOiAxMjM0NTY3ODkwYWJj
ZGVmDQpSRU1PVEVfQUREUjogMTIzNDU2Nzg5MGFiY2RlZg0KUkVNT1RFX1BPUlQ6IDEyMzQ1Njc4
OTBhYmNkZWYNClJFUVVFU1RfTUVUSE9EOiAxMjM0NTY3ODkwYWJjZGVmDQpSRVFVRVNUX1NDSEVN
RTogMTIzNDU2Nzg5MGFiY2RlZg0KUkVRVUVTVF9VUkk6IDEyMzQ1Njc4OTBhYmNkZWYNClNDUklQ
VF9GSUxFTkFNRTogMTIzNDU2Nzg5MGFiY2RlZg0KU0NSSVBUX05BTUU6IDEyMzQ1Njc4OTBhYmNk
ZWYNClNFUlZFUl9BRERSOiAxMjM0NTY3ODkwYWJjZGVmDQpTRVJWRVJfQURNSU46IDEyMzQ1Njc4
OTBhYmNkZWYNClNFUlZFUl9OQU1FOiAxMjM0NTY3ODkwYWJjZGVmDQpTRVJWRVJfUE9SVDogMTIz
NDU2Nzg5MGFiY2RlZg0KU0VSVkVSX1BST1RPQ09MOiAxMjM0NTY3ODkwYWJjZGVmDQpTRVJWRVJf
U0lHTkFUVVJFOiAxMjM0NTY3ODkwYWJjZGVmDQpTRVJWRVJfU09GVFdBUkU6IDEyMzQ1Njc4OTBh
YmNkZWYNClNTTF9UTFNfU05JOiAxMjM0NTY3ODkwYWJjZGVmDQpVTklRVUVfSUQ6IDEyMzQ1Njc4
OTBhYmNkZWYNCg==


This one does not:
--

Return-Path: 
X-Original-To: recei...@receiverdomain.com
Delivered-To: recei...@receiverdomain.com
Received: from [127.0.0.1] (smtp [127.0.0.1])
by smtp.receiverdomain.com (Postfix) with ESMTP id 0D25523C0063
for ; Mon, 27 Aug 2018 09:21:13 +0300 
(EEST)
Subject: Malformed base64
From: sen...@senderdomain.com
To: recei...@receiverdomain.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Message-Id: <20180827062113.0d25523c0...@smtp.receiverdomain.com>
Date: Mon, 27 Aug 2018 09:21:13 +0300 (EEST)

Q09OVEVOVF9MRU5HVEg6IDEyMzQ1Njc4OTBhYmNkZWYKQ09OVEVOVF9UWVBFOiAxMjM0NTY3ODkwYQ==
YmNkZWYKQ09OVEVYVF9ET0NVTUVOVF9ST09UOiAxMjM0NTY3ODkwYWJjZGVmCkNPTlRFWFRfUFJFRg==
SVg6IDEyMzQ1Njc4OTBhYmNkZWYKRE9DVU1FTlRfUk9PVDogMTIzNDU2Nzg5MGFiY2RlZgpHQVRFVw==
QVlfSU5URVJGQUNFOiAxMjM0NTY3ODkwYWJjZGVmCkhUVFBTOiAxMjM0NTY3ODkwYWJjZGVmCkhUVA==
UF9BQ0NFUFQ6IDEyMzQ1Njc4OTBhYmNkZWYKSFRUUF9BQ0NFUFRfRU5DT0RJTkc6IDEyMzQ1Njc4OQ==
MGFiY2RlZgpIVFRQX0FDQ0VQVF9MQU5HVUFHRTogMTIzNDU2Nzg5MGFiY2RlZgpIVFRQX0NBQ0hFXw==
Q09OVFJPTDogMTIzNDU2Nzg5MGFiY2RlZgpIVFRQX0NPTk5FQ1RJT046IDEyMzQ1Njc4OTBhYmNkZQ==
ZgpIVFRQX0ROVDogMTIzNDU2Nzg5MGFiY2RlZgpIVFRQX0hPU1Q6IDEyMzQ1Njc4OTBhYmNkZWYKSA==
VFRQX09SSUdJTjogMTIzNDU2Nzg5MGFiY2RlZgpIVFRQX1JFRkVSRVI6IDEyMzQ1Njc4OTBhYmNkZQ==
ZgpIVFRQX1VQR1JBREVfSU5TRUNVUkVfUkVRVUVTVFM6IDEyMzQ1Njc4OTBhYmNkZWYKSFRUUF9VUw==
RVJfQUdFTlQ6IDEyMzQ1Njc4OTBhYmNkZWYKUEFUSDogMTIzNDU2Nzg5MGFiY2RlZgpRVUVSWV9TVA==
UklORzogMTIzNDU2Nzg5MGFiY2RlZgpSRURJUkVDVF9IVFRQUzogMTIzNDU2Nzg5MGFiY2RlZgpSRQ==
RElSRUNUX1NTTF9UTFNfU05JOiAxMjM0NTY3ODkwYWJjZGVmClJFRElSRUNUX1NUQVRVUzogMTIzNA==
NTY3ODkwYWJjZGVmClJFRElSRUNUX1VOSVFVRV9JRDogMTIzNDU2Nzg5MGFiY2RlZgpSRURJUkVDVA==
X1VSTDogMTIzNDU2Nzg5MGFiY2RlZgpSRU1PVEVfQUREUjogMTIzNDU2Nzg5MGFiY2RlZgpSRU1PVA==
RV9QT1JUOiAxMjM0NTY3ODkwYWJjZGVmClJFUVVFU1RfTUVUSE9EOiAxMjM0NTY3ODkwYWJjZGVmCg==
UkVRVUVTVF9TQ0hFTUU6IDEyMzQ1Njc4OTBhYmNkZWYKUkVRVUVTVF9VUkk6IDEyMzQ1Njc4OTBhYg==
Y2RlZgpTQ1JJUFRfRklMRU5BTUU6IDEyMzQ1Njc4OTBhYmNkZWYKU0NSSVBUX05BTUU6IDEyMzQ1Ng==
Nzg5MGFiY2RlZgpTRVJWRVJfQUREUjogMTIzNDU2N

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-26 Thread chen wu

New submission from chen wu :

when I tried to request a url like "https://[fc00:0a08::2]:35357", I got 400. 
The code is like:
import requests
requests.get("https://[fc00:0a08::2]:35357";, verify=False)
And the apache logs:
vhost.c(889): [client fc00:ac1c::9a5:58692] AH00550: Client sent malformed 
Host header: [[fc00::0a08::2]]:35357
If user no set "Host" in header, httpslib will pase it from url and set it.
The paser function is urllib3.util.url.pase_url. When url is 
"https://[fc00:0a08::2]:35357";, we got host [fc00:0a08::2].
And then httplib sets host in putrequest, "[" and "]" will be added to 
[fc00:0a08::2], which is not a valid format for host.
The part of codes are:
974# Wrap the IPv6 Host Header with [] (RFC 2732)
975if host_enc.find(':') >= 0:
976host_enc = "[" + host_enc + "]"

maybe the judgement condition for wrap ipv6 host header with [] is not very 
well?

--
components: Library (Lib)
messages: 324149
nosy: visionwun
priority: normal
severity: normal
status: open
title: httplib sets unbefitting "Host" in request header when requests an ipv6 
format url.
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue34515] lib2to3: support non-ASCII identifiers

2018-08-26 Thread monson

New submission from monson :

Python 3.0 introduces additional characters from outside the ASCII range (see 
PEP 3131). see 
https://docs.python.org/3/reference/lexical_analysis.html#identifiers

But lib2to3 can't tokenize them corretly.
```
$ echo '中 = 1' | python3.7 -m lib2to3.pgen2.tokenize
1,0-1,1:ERRORTOKEN  '中'
1,2-1,3:OP  '='
1,4-1,5:NUMBER  '1'
1,5-1,6:NEWLINE '\n'
2,0-2,0:ENDMARKER   ''
```
'中' should be tokenized as NAME instead of ERRORTOKEN.

--
components: Library (Lib)
messages: 324148
nosy: monson
priority: normal
severity: normal
status: open
title: lib2to3: support non-ASCII identifiers
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



[issue34427] calling MutableSequence.extend on self produces infinite loop

2018-08-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> But a MutableSequence can represents a sequence that doesn't
> fit in memory. It can provide an interface to a linear 
> on-disk store. In this case creating an on-memory copy 
> is not possible.

This case is likely not worth worrying about.  If a user created such a 
sequence AND wrote "s += s", it is unclear whether any particular unpleasant 
outcome (including the current behavior) could be avoided.

--

___
Python tracker 

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



[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-08-26 Thread Xiang Zhang


Xiang Zhang  added the comment:

I could. But currently I don't have a good idea how to fix it elegantly. If 
anyone else makes a PR, I'm willing to review it.

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



[issue34319] Clarify pathlib.Path("filepath").read_text()

2018-08-26 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Marking this bug as fixed via https://github.com/python/cpython/pull/8645

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



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2018-08-26 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hey Nick, Serhiy

The patch is up for your review. Any updates on this?

--

___
Python tracker 

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



[issue34361] An error should be returned when there are spaces in between function name and parameters

2018-08-26 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hi,

I agree that it can break backward compatibility. But maybe we can add some 
sort of warning message?

The entire motive of this is to get new folks to understand how a function is 
ideally defined and called.

--

___
Python tracker 

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



[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-08-26 Thread Elias Zamaria


Elias Zamaria  added the comment:

I updated my GitHub username. For the record, it used to be mikez302, and now 
it is elias6.

--

___
Python tracker 

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



[issue34514] assertEqual doesn't use maxDiff when comparing dictionaries

2018-08-26 Thread Prudvi RajKumar Maddala


Prudvi RajKumar Maddala  added the comment:

Hello Victor, can you tell me what is 'maxDiff'? Can you give me a simple 
example of expected output and actual output by taking a simple dictionary?

Thanks

--
nosy: +prudvinit

___
Python tracker 

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



[issue34514] assertEqual doesn't use maxDiff when comparing dictionaries

2018-08-26 Thread Victor Engmark


New submission from Victor Engmark :

According to the documentation `assertDictEqual()` "will be used by default to 
compare dictionaries in calls to assertEqual()." Great, since `maxDiff` applies 
to assertDictEqual(). However, `maxDiff` doesn't apply to `assertEqual()` when 
comparing dictionaries.

--
components: Tests
messages: 324140
nosy: Victor Engmark2
priority: normal
severity: normal
status: open
title: assertEqual doesn't use maxDiff when comparing dictionaries
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue30858] Keyword can't be an expression?

2018-08-26 Thread Nick Coghlan


Nick Coghlan  added the comment:

The current error message is also outright incorrect, since simple names *are* 
valid expressions - the actual problem being reported is that binary 
expressions (veky's case) and strings (my case) *aren't* identifiers.

--

___
Python tracker 

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



[issue30858] Keyword can't be an expression?

2018-08-26 Thread Nick Coghlan


Nick Coghlan  added the comment:

I just ran into this, and found the existing error message *incredibly* 
confusing. My immediate reaction was "There's no keyword in that line, what are 
you complaining about?".

An error message that said "Keyword argument name must be an identifier" would 
have been *far* more useful, and far less confusing.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue34513] test_multiprocessing_spawn fails on x86 Windows7 3.7 buildbot

2018-08-26 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

test_multiprocessing_spawn fails on x86 Windows7 3.7 buildbot:

https://buildbot.python.org/all/#/builders/111/builds/500

Timeout (0:15:00)!
Thread 0x0c64 (most recent call first):
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\connection.py",
 line 306 in _recv_bytes
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\connection.py",
 line 250 in recv
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\pool.py",
 line 470 in _handle_results
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
865 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
917 in _bootstrap_inner
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
885 in _bootstrap
Thread 0x00b4 (most recent call first):
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\pool.py",
 line 422 in _handle_tasks
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
865 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
917 in _bootstrap_inner
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
885 in _bootstrap
Thread 0x08d4 (most recent call first):
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\pool.py",
 line 413 in _handle_workers
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
865 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
917 in _bootstrap_inner
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
885 in _bootstrap
Thread 0x0b88 (most recent call first):
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
296 in wait
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\threading.py", line 
552 in wait
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\pool.py",
 line 648 in wait
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\pool.py",
 line 651 in get
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\multiprocessing\pool.py",
 line 261 in apply
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 2224 in test_apply
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", 
line 615 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\case.py", 
line 663 in __call__
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", 
line 122 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", 
line 84 in __call__
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", 
line 122 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", 
line 84 in __call__
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", 
line 122 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\suite.py", 
line 84 in __call__
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\unittest\runner.py",
 line 176 in run
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py",
 line 1882 in _run_suite
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\support\__init__.py",
 line 1972 in run_unittest
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py",
 line 175 in test_runner
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py",
 line 179 in runtest_inner
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\runtest.py",
 line 140 in runtest
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py",
 line 286 in rerun_failed_tests
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py",
 line 570 in _main
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py",
 line 531 in main
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\libregrtest\main.py",
 line 584 in main
  File 
"D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\__main__.py", 
line 2 in 
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\runpy.py", 
line 85 in _run_code
  File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\runpy.py", 
line 193 in _run_module_as_main
Process SpawnPoolWorker-184:
Traceback (most recent ca

[issue11193] test_subprocess test_undecodable_env error on AIX

2018-08-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8425

___
Python tracker 

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



[issue34512] Document platform-specific strftime() behavior for non-ASCII format strings

2018-08-26 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


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

___
Python tracker 

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



[issue34512] Document platform-specific strftime() behavior for non-ASCII format strings

2018-08-26 Thread Alexey Izbyshev

New submission from Alexey Izbyshev :

If a format string contains code points outside of ASCII range, time.strftime() 
can behave in four different ways depending on the platform, the current locale 
and the code points:

* raise a UnicodeEncodeError
* return an empty string
* for surrogates in \uDC80-\uDCFF range, replace them with different code 
points in the output (potentially mangling nearby parts of the output as well)
* round-trip them correctly

Some examples:

* Linux (glibc 2.27):
Python 3.6.4 (default, Jan 03 2018, 13:52:55) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time, locale
>>> locale.getlocale()
('en_US', 'UTF-8')
>>> time.strftime('\x80')
'\x80'
>>> time.strftime('\u044f')
'я' # '\u044f'
>>> time.strftime('\ud800')
'\ud800'
>>> time.strftime('\udcff')
'\udcff'
>>> locale.setlocale(locale.LC_CTYPE, 'C')
'C'
>>> time.strftime('\x80')
'\x80'
>>> time.strftime('\u044f')
'я' # '\u044f'
>>> time.strftime('\ud800')
'\ud800'
>>> time.strftime('\udcff')
'\udcff'

* macOS 10.13.6 and FreeBSD 11.1:
Python 3.7.0 (default, Jul 23 2018, 20:22:55)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time, locale
>>> locale.getlocale()
('en_US', 'UTF-8')
>>> time.strftime('\x80')
'\x80'
>>> time.strftime('\u044f')
'я' # '\u044f'
>>> time.strftime('\ud800')
''
>>> time.strftime('\udcff')
''
>>> locale.setlocale(locale.LC_CTYPE, 'C')
'C'
>>> time.strftime('\x80')
'\x80'
>>> time.strftime('\u044f')
''
>>> time.strftime('\ud800')
''
>>> time.strftime('\udcff')
''

* Windows 8.1:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit 
(AMD64)] on win32
>>> import time, locale
>>> locale.getlocale()
(None, None)
>>> time.strftime('\x80')
'\x80'
>>> time.strftime('\u044f')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'locale' codec can't encode character '\u044f' in position 
0: encoding error
>>> time.strftime('\ud800')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'locale' codec can't encode character '\ud800' in position 
0: encoding error
>>> time.strftime('\udcff')
'y' # '\xff'
>>> locale.setlocale(locale.LC_CTYPE, '')
'Russian_Russia.1251'
>>> time.strftime('\x80')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'locale' codec can't encode character '\x80' in position 0: 
encoding error
>>> time.strftime('\u044f')
'я' # '\u044f'
>>> time.strftime('\ud800')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'locale' codec can't encode character '\ud800' in position 
0: encoding error
>>> time.strftime('\udcff')
'я' # '\u044f'

The reasons of such differences are the following:
* Reliance on either wcsftime() or strftime() from the C library depending on 
the platform.
* For strftime(), the input is encoded into the charset of the current locale 
with 'surrogateescape' error handler, and the output is decoded back in the 
same way.
* Different handling of code points which are unrepresentable in the charset of 
the current locale by glibc and macOS/FreeBSD.

I suggest to at least document that the format string, despite being an 'str', 
requires special care if it contains non-ASCII code points.

The 'datetime' module docs warn about the locale-dependent output, but only 
with regard to particular format specifiers [1].

I'll submit a draft PR. Suggestions are welcome.

[1] 
https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior

--
assignee: docs@python
components: Documentation
messages: 324136
nosy: belopolsky, docs@python, izbyshev, p-ganssle, taleinat
priority: normal
severity: normal
status: open
title: Document platform-specific strftime() behavior for non-ASCII format 
strings
type: enhancement
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



[issue34511] I suggest to add documentation about "method" parameter of urllib.request.Request class

2018-08-26 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

method is added in Python 3.3. You're referencing documentation of Python 3.2.

The documentation is correct for later Python versions: 
https://docs.python.org/3.7/library/urllib.request.html#urllib.request.Request

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



[issue34510] add HTTPConnection.settimeout()

2018-08-26 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
title: Add add HTTPConnection.settimeout() -> add HTTPConnection.settimeout()

___
Python tracker 

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



[issue34511] I suggest to add documentation about "method" parameter of urllib.request.Request class

2018-08-26 Thread harobed

New submission from harobed :

Hi,

I see "method=None" parameter in urllib.request.Request constructor 
(https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L327) but 
I don't see "method" parameter in documentation: 
https://docs.python.org/3.2/library/urllib.request.html#urllib.request.Request

I suggest to add documentation about "method".

Best regards,
Stéphane

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 324134
nosy: docs@python, harobed
priority: normal
severity: normal
status: open
title: I suggest to add documentation about "method" parameter of 
urllib.request.Request class
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue34510] Add add HTTPConnection.settimeout()

2018-08-26 Thread Collin Anderson


Change by Collin Anderson :


--
components: Library (Lib)
nosy: collinanderson
priority: normal
pull_requests: 8422
severity: normal
status: open
title: Add add HTTPConnection.settimeout()
type: enhancement

___
Python tracker 

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



[issue34497] Remove needless set operator restriction

2018-08-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry Dan, we're going to pass on this one.  The current behavior was an 
intentional design choice by Guido and reflects a careful balance between some 
difficult trade-offs.

An early and permanent mistake in Python's design is that list.__iadd__() and 
list.extend() both accept any input iterable.  For extend(), this proved to be 
useful.  In contrast, __iadd__() was a recurring bug magnet.  People would 
routinely type "s=['abc']; s+='def'" expecting to get ['abc', 'def'] rather 
than ['abc', 'd', 'e', 'f'].   Based on this experience, Guido wisely opined 
that math operators on other concrete collection classes should be restricted 
working with members of their own class.

When abstract base classes were introduced, a seemingly inconsistent decision 
was made.  The Set ABCs allowed the math operators to accept any input iterable 
and did not provide the spelled-out method names (union, intersection, 
difference, etc).

IIRC, there were several reasons for this.  It kept the total number of methods 
to a manageable size (important so as to not unduly burden implementers of 
concrete classes).  Also, having a same type restriction is at odds with some 
of the design goals and use cases for collections ABCs.  Additionally, the code 
for the mixin methods is simpler without the restrictions.

When dict views were implemented, they followed the Set ABCs.  This gave them 
fewer methods than sets but also gave them fewer restrictions.  For the most 
part, these design trade-offs have worked out well in practice.  The existing 
behavior is neither "needless" nor "arbitrary".  It was the result of careful 
consideration by GvR on what works best for most people, most of the time.

--
resolution:  -> rejected
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



[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Jun Aruga


Jun Aruga  added the comment:

> it would be better to set up a buildbot running GCC 8, or switching one of 
> our existing workers to it.  We want to keep the pre-merge CI as stable as 
> possible, and using a bleeding-edge compiler doesn't strike me as 
> particularly stable.

Oh it seems that we have already had the CI environment as buildbot. I did not 
know that. Yeah it might be better to add it as a buildbot.

https://buildbot.python.org/all/#/

--

___
Python tracker 

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



[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Zachary Ware


Zachary Ware  added the comment:

I think rather than switching Travis CI (or VSTS) to GCC 8, it would be better 
to set up a buildbot running GCC 8, or switching one of our existing workers to 
it.  We want to keep the pre-merge CI as stable as possible, and using a 
bleeding-edge compiler doesn't strike me as particularly stable.

--
nosy: +zach.ware

___
Python tracker 

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



[issue11193] test_subprocess test_undecodable_env error on AIX

2018-08-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://github.com/python/cpython/pull/8939 and 
https://github.com/python/cpython/pull/8946

--

___
Python tracker 

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



[issue11193] test_subprocess test_undecodable_env error on AIX

2018-08-26 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed

___
Python tracker 

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



[issue11193] test_subprocess test_undecodable_env error on AIX

2018-08-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

someone with modern AIX access reopen if this specific issue still appears to 
exist after the 3.8 and 3.7 PRs finish merging.

--
nosy: +gregory.p.smith
stage: patch review -> resolved
status: open -> closed
title: test_subprocess error on AIX -> test_subprocess test_undecodable_env 
error on AIX
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



[issue34497] Remove needless set operator restriction

2018-08-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue34494] simple "sequence" class ignoring __len__

2018-08-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with Josh.  This matches the documented behavior and isn't a bug. 
Marking as closed.

There are potentially two ways to stop sequence iteration, either by using len 
or by waiting for IndexError.  Python uses the latter to allow lists to be 
dynamically resized during iteration and because checking len on every 
iteration would be expensive.  

If someone doesn't read the docs, and assumes Python uses len, and writes an 
inconsistent class (one where len doesn't match the point where IndexError is 
raised), then there is little we can do to prevent that person from being 
"surprised".

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



[issue34503] Reference leak in PyErr_SetObject()

2018-08-26 Thread Xiang Zhang


Change by Xiang Zhang :


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



[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Jun Aruga


Change by Jun Aruga :


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

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-26 Thread Zachary Ware


Zachary Ware  added the comment:

> Can we manually ssh into the buildbots from the buildbot master and delete 
> the file?

No, there is no access to the workers except for the connection created by each 
worker for the purpose of buildbot communication (and individually by each 
worker owner).

> It may be easier to remove "trace.cover" before testing every time than clean 
> up all buildbots once.

I agree.  Alternately, the test could be changed to avoid that assertion; it's 
strange that the test could fail just because a file could happen to exist 
outside of the test's control.

--

___
Python tracker 

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



[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Jun Aruga


New submission from Jun Aruga :

This ticket is from below conversation on python-dev mailing list.
https://mail.python.org/pipermail/python-dev/2018-August/155011.html

Right now the Python project Travis CI is running on gcc-4.8.4 for coverage 
testing.
I want to replace it or add the latest version gcc-8 case.

The benefit to use gcc-8 is,

* It is important to run on the old version 4.8 but, it is also meaningful to 
follow the latest version and care issues such as warnings on the latest 
version gcc.
* I am working in Fedora project that is using gcc version 8 as a main c 
compiler. If the Python project care gcc-8, that might be helpful for people 
who maintain Python Debian/Fedora package or Installer on Mac/Windows.


The demerit is

* Right now the gcc-4.8 is used for the coverage. The total running time on 
gcc-8 might be longer than current one.
* To run the latest gcc-8, we can add the repository [1] with the way [2][3], 
but I am not sure whether the repository is stable.

I would show you 2 cases to use gcc-8 on Linux.

[1] https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
[2] 
https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-from-a-custom-apt-repository
[3] https://docs.travis-ci.com/user/languages/c/#gcc-on-os-x
[4] Ruby
   https://travis-ci.org/junaruga/ruby/builds/418242410
   https://github.com/junaruga/ruby/blob/feature/ci-new-gcc/.travis.yml
   https://github.com/ruby/ruby/pull/1937
[5] Trinity
   Example for gcc-8 on both Linux and Mac.
   https://travis-ci.org/trinityrnaseq/trinityrnaseq
   https://github.com/trinityrnaseq/trinityrnaseq/blob/master/.travis.yml

--
messages: 324125
nosy: junaruga
priority: normal
severity: normal
status: open
title: Starting to use gcc-8 on CI
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



[issue34503] Reference leak in PyErr_SetObject()

2018-08-26 Thread miss-islington


miss-islington  added the comment:


New changeset 204fb459ca1d77c2eab02a3191ba2d2216ff2d72 by Miss Islington (bot) 
in branch '3.6':
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
https://github.com/python/cpython/commit/204fb459ca1d77c2eab02a3191ba2d2216ff2d72


--
nosy: +miss-islington

___
Python tracker 

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



[issue34503] Reference leak in PyErr_SetObject()

2018-08-26 Thread miss-islington


miss-islington  added the comment:


New changeset 2caf86ff6d72d625f86db78c6e90fdaf09e8f703 by Miss Islington (bot) 
in branch '3.7':
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
https://github.com/python/cpython/commit/2caf86ff6d72d625f86db78c6e90fdaf09e8f703


--

___
Python tracker 

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



[issue34503] Reference leak in PyErr_SetObject()

2018-08-26 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset a2eefa67542c25617a58c03a27c17fd48e2a0856 by Xiang Zhang (Alexey 
Izbyshev) in branch 'master':
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
https://github.com/python/cpython/commit/a2eefa67542c25617a58c03a27c17fd48e2a0856


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue34503] Reference leak in PyErr_SetObject()

2018-08-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8417

___
Python tracker 

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



[issue34503] Reference leak in PyErr_SetObject()

2018-08-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8416

___
Python tracker 

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



[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-26 Thread Mark Dickinson


Change by Mark Dickinson :


--
pull_requests: +8415

___
Python tracker 

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



[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-26 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It may be easier to remove "trace.cover" before testing every time than clean 
up all buildbots once.

--

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +8413
stage: resolved -> patch review

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Can we manually ssh into the buildbots from the buildbot master and delete the 
file?

--

___
Python tracker 

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



[issue34494] simple "sequence" class ignoring __len__

2018-08-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

That's the documented behavior. Per 
https://docs.python.org/3/reference/datamodel.html#object.__getitem__ :

>Note: for loops expect that an IndexError will be raised for illegal indexes 
>to allow proper detection of the end of the sequence. 

The need for *only* __getitem__ is also mentioned in the documentation of the 
iter builtin ( https://docs.python.org/3/library/functions.html#iter ):

>Without a second argument, object must be a collection object which supports 
>the iteration protocol (the __iter__() method), or it must support the 
>sequence protocol (the __getitem__() method with integer arguments starting at 
>0).

At no point is a dependency on __len__ mentioned.

--
nosy: +josh.r

___
Python tracker 

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



[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-26 Thread Mark Dickinson


New submission from Mark Dickinson :

[From https://stackoverflow.com/q/52026406/270986]

The following is valid, and works as expected:

>>> def f():
... x = *(1, 2), 3
... return x
... 
>>> f()
(1, 2, 3)

But the tuple expression can't be used directly in a "return" statement:

>>> def f():
... return *(1, 2), 3
  File "", line 2
return *(1, 2), 3
   ^
SyntaxError: invalid syntax

It's trivial to work around, by adding an extra pair of parentheses around the 
return target, but it seems a surprising inconsistency. Would it make sense to 
allow this? In terms of the grammar,

return_stmt: 'return' [testlist]

would be replaced with:

return_stmt: 'return' [testlist_star_expr]

There may be other places in the grammar where "testlist" could reasonably be 
replaced with "testlist_star_expr", for example:

for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]

--
components: Interpreter Core
messages: 324118
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: return of non-parenthesized star-unpacking expression a SyntaxError
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



[issue11193] test_subprocess error on AIX

2018-08-26 Thread Michael Felt


Change by Michael Felt :


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

___
Python tracker 

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



[issue11193] test_subprocess error on AIX

2018-08-26 Thread Michael Felt


Michael Felt  added the comment:

Short Version:
root@x065:[/data/prj/python/python3-3.8]./python -m test test_subprocess
Run tests sequentially
0:00:00 [1/1] test_subprocess
test_subprocess passed in 2 min 18 sec

== Tests result: SUCCESS ==

1 test OK.

Total duration: 2 min 18 sec
Tests result: SUCCESS

...
--
Ran 285 tests in 136.443s

OK (skipped=33)
test_subprocess passed in 2 min 16 sec

== Tests result: SUCCESS ==

1 test OK.

Total duration: 2 min 16 sec
Tests result: SUCCESS

Posting a PR - tested manually on AIX 5.3, AIX 6.1 and AIX 7.1

imho: being able to remove the special condition for AIX is an improvement.

diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 73b57b21db..4719773b67 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -2228,15 +2228,9 @@ class POSIXProcessTestCase(BaseTestCase):
 env = os.environ.copy()
 env[key] = value
 # Use C locale to get ASCII for the locale encoding to force
-# surrogate-escaping of \xFF in the child process; otherwise it can
-# be decoded as-is if the default locale is latin-1.
+# surrogate-escaping of \xFF in the child process
 env['LC_ALL'] = 'C'
-if sys.platform.startswith("aix"):
-# On AIX, the C locale uses the Latin1 encoding
-decoded_value = encoded_value.decode("latin1", 
"surrogateescape")
-else:
-# On other UNIXes, the C locale uses the ASCII encoding
-decoded_value = value
+decoded_value = value
 stdout = subprocess.check_output(
 [sys.executable, "-c", script],
 env=env)

--
versions: +Python 3.8 -Python 3.2

___
Python tracker 

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



[issue34507] Add path expansion interpolation in pyvenv.cfg home key

2018-08-26 Thread Lior Cohen


New submission from Lior Cohen :

When working with venv virtual environment, python.exe finds its base_prefix 
and base_exec_prefix by the home key in the pyvenv.cfg file.

If one edits this file with $xyz (or %xyz% in windows), it is not not resolved.

The reason of replacing the absolute path generated by venv to path expand 
tokens, is to be able to port the venv + its base python to different machine, 
which is part of my company deployment process.

--
components: Interpreter Core
messages: 324116
nosy: chnlior
priority: normal
severity: normal
status: open
title: Add path expansion interpolation in pyvenv.cfg home key
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue6700] inspect.getsource() returns incorrect source lines at the module level

2018-08-26 Thread Tal Einat


Tal Einat  added the comment:

Thanks for reporting this, Gabriel!

Thanks for the PR, Vladimir!

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



[issue6700] inspect.getsource() returns incorrect source lines at the module level

2018-08-26 Thread Tal Einat


Tal Einat  added the comment:


New changeset 491740f116755e220135e596ec802ea3a0f65596 by Tal Einat in branch 
'2.7':
[2.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks 
(GH-8864)
https://github.com/python/cpython/commit/491740f116755e220135e596ec802ea3a0f65596


--

___
Python tracker 

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



[issue34506] Traceback logged when SSL handshake fails

2018-08-26 Thread Hrvoje Nikšić

New submission from Hrvoje Nikšić :

When an SSL handshake fails in asyncio, an exception traceback is logged to 
standard error even if the application code catches the exception. This logging 
cannot be suppressed, except by providing a custom exception handler for the 
whole event loop. The question was raised on StackOverflow in 
https://stackoverflow.com/q/52012488/1600898

To reproduce the issue, run the attached minimal example (taken from the SO 
question). Expected behavior is for "Error handled" to be printed. Actual 
behavior is that, in addition to that line, two tracebacks are printed.

It looks like a bug that _fatal_error both logs the exception and calls 
connection_lost on the protocol (through transport._force_close()). If the idea 
is for the exception not to get swallowed by protocols that don't implement a 
sensible connection_lost (e.g. because they've just inherited from 
BaseProtocol, like the echo server examples), then maybe a protocol that 
propagates the exception in connection_lost should be able to opt out of the 
additional logging. That way the stream protocols would avoid spurious output 
for the suppressed exception by default, and the same opt-out mechanism would 
be available to user-written protocols.

--
files: sslerr.py
messages: 324113
nosy: hniksic
priority: normal
severity: normal
status: open
title: Traceback logged when SSL handshake fails
Added file: https://bugs.python.org/file47763/sslerr.py

___
Python tracker 

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



[issue29750] smtplib doesn't handle unicode passwords

2018-08-26 Thread Windson Yang


Change by Windson Yang :


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



[issue33741] UnicodeEncodeError onsmtplib.login(MAIL_USER, MAIL_PASSWORD)

2018-08-26 Thread Windson Yang


Change by Windson Yang :


--
pull_requests: +8410

___
Python tracker 

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



[issue34171] Lib/trace.cover not removed by the clean target

2018-08-26 Thread Zachary Ware


Zachary Ware  added the comment:

It looks like https://github.com/python/buildmaster-config/pull/43 won't 
actually help; I changed it to use `method='clean'` because we don't want to 
blow away the `externals` directory on Windows buildbots, and `*.cover` is in 
`.gitignore` so `Lib/trace.cover` will not be removed.

--

___
Python tracker 

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