[issue32724] Fix references to commands in Doc/pdb.rst

2018-01-30 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

In the documentation of pdb.rst, we explain that we have to use some commands, 
but there is no link to these commands.

--
assignee: docs@python
components: Documentation
messages: 311253
nosy: Mariatta, docs@python, matrixise
priority: normal
severity: normal
status: open
title: Fix references to commands in Doc/pdb.rst
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



[issue32724] Fix references to commands in Doc/pdb.rst

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue22908] ZipExtFile in zipfile can be seekable

2018-01-30 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
assignee: serhiy.storchaka -> gregory.p.smith
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



[issue22908] ZipExtFile in zipfile can be seekable

2018-01-30 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 066df4fd454d6ff9be66e80b2a65995b10af174f by Gregory P. Smith 
(John Jolly) in branch 'master':
bpo-22908: Add seek and tell functionality to ZipExtFile (GH-4966)
https://github.com/python/cpython/commit/066df4fd454d6ff9be66e80b2a65995b10af174f


--

___
Python tracker 

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



[issue22908] ZipExtFile in zipfile can be seekable

2018-01-30 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

did this get discussed on distutils-sig?  It's a trivial change (for the POSIX 
only PR) and would be neat to go through one of the 3.7 beta cycles to see if 
anything serious an unexpected is likely to come up for anyone.

--

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Christian Heimes

Christian Heimes  added the comment:

+1

--
nosy: +christian.heimes

___
Python tracker 

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



[issue32724] Fix references to commands in Doc/pdb.rst

2018-01-30 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 67adb31a416864f853772c3e74a06caeadc9b6f1 by Andrew Svetlov 
(Stéphane Wirtel) in branch 'master':
bpo-32724: Fix references to commands in Doc/pdb.rst (GH-5444)
https://github.com/python/cpython/commit/67adb31a416864f853772c3e74a06caeadc9b6f1


--
nosy: +asvetlov

___
Python tracker 

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



[issue32724] Fix references to commands in Doc/pdb.rst

2018-01-30 Thread Andrew Svetlov

Change by Andrew Svetlov :


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



[issue32724] Fix references to commands in Doc/pdb.rst

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

thanks

--

___
Python tracker 

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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

as explained on the PR, maybe you could add in the documentation.

..versionadded:: 3.7
Support of the XPath concat function

but maybe your PR is too late because 3.7 starts to be in the frozen period for 
the features.

--
nosy: +matrixise

___
Python tracker 

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



[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2018-01-30 Thread Ned Deily

Change by Ned Deily :


--
pull_requests: +5277

___
Python tracker 

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



[issue32725] Instance of _multiprocessing.PipeConnection-subtype crash on deletion

2018-01-30 Thread Clement Rouault

New submission from Clement Rouault :

While playing with '_multiprocessing.PipeConnection' I found out that 
instancing an object with a subtype of '_multiprocessing.PipeConnection' will 
crash the interpreter when the object is deleted.

My guess is that some connection methods does not check/handle the fact that 
the object is a subtype and not a 'pure' PipeConnection.

I don't know if the exploitability aspect of this crash is important but it 
allows to rewrite an arbitrary address easily with some heap-pointer (leading 
to CPython trying to execute the heap).

I attached a simple program that crash CPython using this bug.

--
components: Library (Lib)
files: poc.py
messages: 311260
nosy: hakril
priority: normal
severity: normal
status: open
title: Instance of _multiprocessing.PipeConnection-subtype crash on deletion
type: crash
versions: Python 2.7
Added file: https://bugs.python.org/file47417/poc.py

___
Python tracker 

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



[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2018-01-30 Thread Ned Deily

Ned Deily  added the comment:


New changeset 763f094b1f0ce2a07768828e78afe9687e9ad3bb by Ned Deily in branch 
'master':
bpo-28440: Don't add /Library/Python/3.x/site-packages to sys.path (#5445)
https://github.com/python/cpython/commit/763f094b1f0ce2a07768828e78afe9687e9ad3bb


--

___
Python tracker 

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



[issue32722] Classes

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread STINNER Victor

STINNER Victor  added the comment:

Failure on AMD64 Windows8.1 Non-Debug 3.x:

http://buildbot.python.org/all/#/builders/12/builds/585

==
ERROR: test_all_project_files (lib2to3.tests.test_parser.TestParserIdempotency)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\lib2to3\tests\test_parser.py", 
line 432, in test_all_project_files
x = diff(filepath, new, encoding=encoding)
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\lib2to3\tests\test_parser.py", 
line 488, in diff
return subprocess.call(['diff', '-u', fn, '@'], stdout=(subprocess.DEVNULL 
if verbose < 1 else None))
  File "D:\buildarea\3.x.ware-win81-release\build\lib\subprocess.py", line 304, 
in call
with Popen(*popenargs, **kwargs) as p:
  File "D:\buildarea\3.x.ware-win81-release\build\lib\subprocess.py", line 756, 
in __init__
restore_signals, start_new_session)
  File "D:\buildarea\3.x.ware-win81-release\build\lib\subprocess.py", line 
1160, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

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

___
Python tracker 

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



[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Xiang Zhang

Xiang Zhang  added the comment:

I don't understand Josh. Looking from the code only when *passing* encoding 
binary mode is forced, although in the comment it's saying always.

>>> f = codecs.open('/tmp/a', 'w')
>>> f


For example I want to use 'replace' instead of 'strict' for default encoding, I 
can't simply do:

>>> import codecs
>>> f = codecs.open('/tmp/a', 'w', errors='replace')
>>> f.write(u'\udc80')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character u'\udc80' in position 
0: ordinal not in range(128)

I have to specify the default encoding explicitly to make errors function:

>>> f = codecs.open('/tmp/a', 'w', encoding='ascii', errors='replace')
>>> f.write(u'\udc80')

--

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread STINNER Victor

STINNER Victor  added the comment:

Different failure on AMD64 Windows10 3.x:

==
FAIL: test_all_project_files (lib2to3.tests.test_parser.TestParserIdempotency)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\lib2to3\tests\test_parser.py", line 
434, in test_all_project_files
self.fail("Idempotency failed: %s" % filepath)
AssertionError: Idempotency failed: 
D:\buildarea\3.x.bolen-windows10\build\lib\lib2to3\btm_matcher.py

--

___
Python tracker 

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



[issue32722] Classes

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

This example is also in 2.7 
https://docs.python.org/2.7/tutorial/classes.html#generator-expressions

-> I add 2.7

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



[issue28914] selectmodule build fails

2018-01-30 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +5279
stage:  -> patch review

___
Python tracker 

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



[issue24132] Direct sub-classing of pathlib.Path

2018-01-30 Thread Torsten Bronger

Change by Torsten Bronger :


--
nosy: +bronger

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread STINNER Victor

STINNER Victor  added the comment:

x86 Windows7 3.x:

http://buildbot.python.org/all/#/builders/58/builds/563

==
FAIL: test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py",
 line 1194, in test_nonexisting_with_pipes
self.assertEqual(stderr, "")
AssertionError: 'Traceback (most recent call last):\n  Fil[1129 chars]le\n' != 
''
Diff is 1153 characters long. Set self.maxDiff to None to see it.

--

___
Python tracker 

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



[issue28914] selectmodule build fails

2018-01-30 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset b8d90328ad2abc9d6d2c9b8ce769fb82b18bbc10 by Victor Stinner in 
branch 'master':
bpo-28914: Fix compilation of select on Android (#5447)
https://github.com/python/cpython/commit/b8d90328ad2abc9d6d2c9b8ce769fb82b18bbc10


--

___
Python tracker 

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



[issue32726] 3.7.0 macOS installer and framework enhancements and changes

2018-01-30 Thread Ned Deily

New submission from Ned Deily :

This issue covers various changes for the macOS installers provided via 
python.org for 3.7.0.

--
components: Build, macOS
messages: 311268
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: 3.7.0 macOS installer and framework enhancements and changes
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



[issue32726] 3.7.0 macOS installer and framework enhancements and changes

2018-01-30 Thread Ned Deily

Change by Ned Deily :


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

___
Python tracker 

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



[issue32726] macOS installer and framework enhancements and changes for 3.7.0

2018-01-30 Thread Ned Deily

Change by Ned Deily :


--
title: 3.7.0 macOS installer and framework enhancements and changes -> macOS 
installer and framework enhancements and changes for 3.7.0

___
Python tracker 

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



[issue32725] Instance of _multiprocessing.PipeConnection-subtype crash on deletion

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

The test is executed under Windows.

--
components: +Windows
nosy: +matrixise, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue32726] macOS installer and framework enhancements and changes for 3.7.0

2018-01-30 Thread Ned Deily

Ned Deily  added the comment:


New changeset 8c9bb72e8b6474ae722f7d6521cfb3cb2e26e3c5 by Ned Deily in branch 
'master':
bpo-32726: macOS installer and framework enhancements and changes for 3.7.0 
(GH-5448)
https://github.com/python/cpython/commit/8c9bb72e8b6474ae722f7d6521cfb3cb2e26e3c5


--

___
Python tracker 

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



[issue28914] selectmodule build fails

2018-01-30 Thread STINNER Victor

STINNER Victor  added the comment:

I merged a PR based on selectmodule.patch. Thanks Wataru Matsumoto for your 
contribution!

Python 3.6 doesn't seem to be affected by the issue. I close the issue.

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



[issue32515] Add an option to trace to run module as a script

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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



[issue27321] Email parser creates a message object that can't be flattened

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

Requested a small additional change to the new tests, and then this will be 
ready to go in.

--

___
Python tracker 

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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread John Jolly

John Jolly  added the comment:

I understand that the feature is likely too late, but I do not want it to get 
lost. Is there any way to make certain this feature is accepted for the next 
release? Do I just select the 3.8 version for this issue?

--

___
Python tracker 

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



[issue32146] multiprocessing freeze_support needed outside win32

2018-01-30 Thread bbayles

bbayles  added the comment:

I presume it's too late to get my pull request in for 3.7, but perhaps we could 
get a note in the documentation for this before release?

That could be as simple as: 

.. warning::

The ``'spawn'`` and ``'forkserver'`` start methods cannot currently be used 
with "frozen" executables (i.e., binaries produced by packages like 
**PyInstaller** and **cx_Freeze**) on Unix. The ``'fork'`` start method does 
work.

I will make that into a PR if it seems like a good option.

--

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-30 Thread Марк Коренберг

Change by Марк Коренберг :


--
pull_requests: +5281

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire

New submission from Michaël Lemaire :

Hi,

I noticed that SMTP.send_message, when getting the sender and recipients from 
the Message object, strips the name from recipients (to keep only the address), 
but not from the sender.

if from_addr is None:
# Prefer the sender field per RFC 2822:3.6.2.
from_addr = (msg[header_prefix + 'Sender']
   if (header_prefix + 'Sender') in msg
   else msg[header_prefix + 'From'])
if to_addrs is None:
addr_fields = [f for f in (msg[header_prefix + 'To'],
   msg[header_prefix + 'Bcc'],
   msg[header_prefix + 'Cc'])
   if f is not None]
to_addrs = [a[1] for a in email.utils.getaddresses(addr_fields)]

There is an ugly side-effect to that (starting with Python 3.5) : if the sender 
name contains a non-ascii character, send_message will then require the 
SMTPUTF8 option from the SMTP server, and raise a SMTPNotSupportedError if 
unavailable. This is not wanted because the sender name is not actually sent to 
the SMTP server in the "MAIL FROM:" command (it is only sent in the MIME 
payload), so the SMTPUTF8 option should not be required based on it (it should 
only depend on the addresses).

--
components: Library (Lib)
messages: 311275
nosy: Michaël Lemaire
priority: normal
severity: normal
status: open
title: smtplib's SMTP.send_message behaves differently with from_addr and 
to_addrs
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue25942] Do not immediately SIGKILL subprocess child processes upon ^C

2018-01-30 Thread Stuart Berg

Change by Stuart Berg :


--
nosy: +stuarteberg

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Do you have an example with a test?

Thank you

--
nosy: +matrixise

___
Python tracker 

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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I think (but not sure) that your feature will be included in 3.8 because 3.7 
has been frozen today :/

@ned do you think you could integrate this functionality in 3.7 or 3.8 ?

--
nosy: +ned.deily

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

Yes, that looks like a bug.  Should be a one line bug fix, plus tests and news 
item if someone wants to make a PR...

--
nosy: +r.david.murray

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire

Michaël Lemaire  added the comment:

Sure :

#coding: utf-8
import email.utils
from email.message import EmailMessage
from smtplib import SMTP
m = EmailMessage()
m['From'] = email.utils.formataddr(("Michaël", "mich...@example.com"))
m['To'] = email.utils.formataddr(("René", "bou...@rodacom.fr"))
with SMTP('localhost') as smtp:
smtp.set_debuglevel(2)
smtp.send_message(m)
#END

On a server without SMTPUTF8, this outputs:

---
16:39:26.351302 send: 'ehlo localhost\r\n'
16:39:26.351391 reply: b'250-localhost\r\n'
16:39:26.351414 reply: b'250-PIPELINING\r\n'
16:39:26.351427 reply: b'250-SIZE 1024\r\n'
16:39:26.351437 reply: b'250-VRFY\r\n'
16:39:26.351448 reply: b'250-ETRN\r\n'
16:39:26.351458 reply: b'250-ENHANCEDSTATUSCODES\r\n'
16:39:26.351468 reply: b'250-8BITMIME\r\n'
16:39:26.351477 reply: b'250 DSN\r\n'
16:39:26.351490 reply: retcode (250); Msg: b'localhost\nPIPELINING\nSIZE 
1024\nVRFY\nETRN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
16:39:26.351832 send: 'QUIT\r\n'
16:39:26.351901 reply: b'221 2.0.0 Bye\r\n'
16:39:26.351923 reply: retcode (221); Msg: b'2.0.0 Bye'
Traceback (most recent call last):
  File "/usr/lib/python3.5/smtplib.py", line 943, in send_message
''.join([from_addr, *to_addrs]).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xeb' in position 5: 
ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "testsmtp.py", line 12, in 
smtp.send_message(m)
  File "/usr/lib/python3.5/smtplib.py", line 947, in send_message
"One or more source or delivery addresses require"
smtplib.SMTPNotSupportedError: One or more source or delivery addresses require 
internationalized email support, but the server does not advertise the required 
SMTPUTF8 capability
---


With removing the accented character in the sender name :
m['From'] = email.utils.formataddr(("Michael", "mich...@example.com"))

It works :

---
16:42:49.882358 send: 'ehlo localhost\r\n'
16:42:49.882437 reply: b'250-localhost\r\n'
16:42:49.882460 reply: b'250-PIPELINING\r\n'
16:42:49.882474 reply: b'250-SIZE 1024\r\n'
16:42:49.882486 reply: b'250-VRFY\r\n'
16:42:49.882498 reply: b'250-ETRN\r\n'
16:42:49.882509 reply: b'250-ENHANCEDSTATUSCODES\r\n'
16:42:49.882520 reply: b'250-8BITMIME\r\n'
16:42:49.882530 reply: b'250 DSN\r\n'
16:42:49.882543 reply: retcode (250); Msg: b'localhost\nPIPELINING\nSIZE 
1024\nVRFY\nETRN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
16:42:49.883439 send: 'mail FROM: size=86\r\n'
16:42:49.886567 reply: b'250 2.1.0 Ok\r\n'
16:42:49.886603 reply: retcode (250); Msg: b'2.1.0 Ok'
16:42:49.88 send: 'rcpt TO:\r\n'
16:42:49.889642 reply: b'250 2.1.5 Ok\r\n'
16:42:49.889676 reply: retcode (250); Msg: b'2.1.5 Ok'
16:42:49.889694 send: 'data\r\n'
16:42:49.889769 reply: b'354 End data with .\r\n'
16:42:49.889827 reply: retcode (354); Msg: b'End data with .'
16:42:49.889843 data: (354, b'End data with .')
16:42:49.889939 send: b'From: Michael \r\nTo: 
=?utf-8?q?Ren=C3=A9?= \r\n\r\n.\r\n'
16:42:49.892726 reply: b'250 2.0.0 Ok: queued as D92C540105\r\n'
16:42:49.892752 reply: retcode (250); Msg: b'2.0.0 Ok: queued as D92C540105'
16:42:49.892764 data: (250, b'2.0.0 Ok: queued as D92C540105')
16:42:49.892786 send: 'QUIT\r\n'
16:42:49.892862 reply: b'221 2.0.0 Bye\r\n'
16:42:49.892896 reply: retcode (221); Msg: b'2.0.0 Bye'
---

As you can see, the sender and recipients names are not sent in SMTP command, 
except in the MIME body, so they should not be used to determine whether 
SMTPUTF8 is required or not.

--
nosy:  -r.david.murray

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire

Michaël Lemaire  added the comment:

Oups @r.david.murray, just saw I posted over your message, and removed you from 
the nozy list, sorry.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28494] is_zipfile false positives

2018-01-30 Thread John Jolly

John Jolly  added the comment:

Is there any chance that this will make it into 3.7 or is my reminder too late?

--

___
Python tracker 

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



[issue28494] is_zipfile false positives

2018-01-30 Thread John Jolly

Change by John Jolly :


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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@r.david.murray I started to work on a fix.

--

___
Python tracker 

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



[issue32728] Extend zipfile's compression level support to LZMA

2018-01-30 Thread bbayles

New submission from bbayles :

In [1] (issue 21417), support for setting an archive (or its files) compression 
level was added to the zipfile module.

That currently works for the ZIP_DEFLATED and ZIP_BZIP2 compression methods, 
but not for ZIP_LZMA. This is because zipfile includes its own implementation 
of LZMACompressor that hard-codes the default preset's parameters (see also 
[2]).

It should be possible to extend compression level settings to ZIP_LZMA by 
making zipfile.LZMACompressor more flexible, i.e. able to accept an LZMA 
preset. I think this would involve porting the function that translates presets 
to options (lzma_lzma_preset, see [3]) and passing in those options to 
lzma.LZMACompressor .

[1] https://bugs.python.org/issue21417
[2] https://github.com/python/cpython/pull/5385
[3] 
https://git.tukaani.org/?p=xz.git;a=blob;f=src/liblzma/lzma/lzma_encoder_presets.c;hb=HEAD

--
components: Library (Lib)
messages: 311283
nosy: bbayles
priority: normal
severity: normal
status: open
title: Extend zipfile's compression level support  to LZMA
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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@r.david.murray I am interested with your opinion about a test for this PR, if 
you have an idea, because all the tests pass on my laptop

--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2018-01-30 Thread Tamás Bajusz

Change by Tamás Bajusz :


--
nosy: +gbtami

___
Python tracker 

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2018-01-30 Thread Tamás Bajusz

Change by Tamás Bajusz :


--
nosy: +gbtami

___
Python tracker 

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



[issue32611] Tkinter taskbar icon (Windows)

2018-01-30 Thread Minion Jim

Minion Jim  added the comment:

Sorry for posting this as a bug :-( When I reupdated (again) it sorted itself 
out (for whatever reason). So once again sorry for wasting your time.

--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

Yes, you'll have to write a test.  Add a test after 
test_send_unicode_without_SMTPUTF8, but put the unicode in the name field of 
the 'from' address and test that it is accepted.  You should be able to figure 
out how to check for success from the other tests in that class (I hope ;)

--

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

1e17d4aaff5c7ca972bab437949d2bb51c5b30f7. I don't think you can pin 
test_subprocess on this change, though.

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

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset a23a2c555c4187f349276fe2f2ceffa953d0afe9 by Benjamin Peterson in 
branch '3.6':
[3.6] closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242) (GH-5443)
https://github.com/python/cpython/commit/a23a2c555c4187f349276fe2f2ceffa953d0afe9


--

___
Python tracker 

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



[issue27428] Document WindowsRegistryFinder inherits from MetaPathFinder

2018-01-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Since WindowsRegistryFinder was deprecated in 3.6, should this be closed or 
should the documentation still be corrected?

--
nosy: +csabella
versions: +Python 3.7 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2018-01-30 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-30 Thread William Pickard

Change by William Pickard :


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



[issue32045] Does json.dumps have a memory leak?

2018-01-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Can this be closed as 'Not a Bug'?

--
nosy: +csabella

___
Python tracker 

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



[issue32045] Does json.dumps have a memory leak?

2018-01-30 Thread Rohan D'Sa

Rohan D'Sa  added the comment:

Yes. Thanks.

On 30 Jan 2018 8:31 PM, "Cheryl Sabella"  wrote:

>
> Cheryl Sabella  added the comment:
>
> Can this be closed as 'Not a Bug'?
>
> --
> nosy: +csabella
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27428] Document WindowsRegistryFinder inherits from MetaPathFinder

2018-01-30 Thread Brett Cannon

Brett Cannon  added the comment:

Docs should still be correct.

--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thank Nick.

--

___
Python tracker 

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



[issue19495] context manager for measuring duration of blocks of code

2018-01-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hello everyone,

I was interested in similar functionality for timeit and found this discussion. 
 I know it's too late for 3.7, but I was wondering if it would be worth putting 
this on python-ideas or python-dev to try to get some consensus for a PEP or a 
patch?  With Barry's addition of breakpoint(), I would find something similar 
for timeit (that is, a simpler way to invoke it) would be quite helpful.

Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue19495] context manager for measuring duration of blocks of code

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

FWIW, we just ran in to the need for this on our project, and used 'Time' from 
the contexttimer package on pypi.  In our use case we want the number so we can 
log it, and what we care about is the actual elapsed time, not a precise 
measurement of the code block, because it for system monitoring and metrics, 
not hardcore performance analysis.  

Having this always print would indeed be sub-optimal :)

--
nosy: +r.david.murray
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@r.david.murray I just updated the PR with a test, but I am not sure about it, 
could you give me your opinion because the current test suite works fine 
without my new test.

--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

The current test suite had better work fine without your new test, otherwise 
your fix broke something :)  I will take a look.

--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

yep, you can take a look but all the tests are green on Travis, maybe you will 
understand why I don't see the interest of my new test. you are the master for 
the email part ;-)

--

___
Python tracker 

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



[issue29708] support reproducible Python builds

2018-01-30 Thread Brett Cannon

Change by Brett Cannon :


--
assignee: brett.cannon -> 
stage: resolved -> 

___
Python tracker 

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



[issue32722] Mislabeling of a dict comprehension as a generator expression in the tutorial

2018-01-30 Thread Brett Cannon

Change by Brett Cannon :


--
title: Classes -> Mislabeling of a dict comprehension as a generator expression 
in the tutorial

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-01-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

A couple defects reported by coverity:



** CID 1428758: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 45 in _coerce_id()

 *** CID 1428758: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 45 in _coerce_id()
39 }
40 if (cid < 0) {
41 PyErr_SetString(PyExc_ValueError, 42 "'id' must be a non-negative int"); 43 
return -1;
44 }
45 if (cid > INT64_MAX) {
46 PyErr_SetString(PyExc_ValueError, 47 "'id' too large (must be 64-bit int)"); 
48 return -1;
49 }
50 return cid;
** CID 1428757: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 1215 in channelid_richcompare()

 *** CID 1428757: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 1215 in channelid_richcompare()
1209 }
1210 int64_t othercid = PyLong_AsLongLong(other); 1211 // XXX decref other here?
1212 if (othercid == -1 && PyErr_Occurred() != NULL) { 1213 return NULL;
1214 }
1215 if (othercid < 0 || othercid > INT64_MAX) { 1216 equal = 0;
 
1217 }
1218 else {
1219 equal = (cid->id == othercid); 1220 }
** CID 1428756: Error handling issues (CHECKED_RETURN) /Modules/gcmodule.c: 
1071 in gc_enable_impl()

--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

A bug found by coverity:

(PyErr_WarnEx might error out; please update the code to handle that)



 *** CID 1428756: Error handling issues (CHECKED_RETURN)
/Modules/gcmodule.c: 1071 in gc_enable_impl()
1065
1066 static PyObject *
1067 gc_enable_impl(PyObject *module)
1068 /*[clinic end generated code: output=45a427e9dce9155c 
input=81ac4940ca579707]*/
1069 {
1070 if(_PyRuntime.gc.disabled_threads){
1071 PyErr_WarnEx(PyExc_RuntimeWarning, "Garbage collector enabled while 
another "
1072 "thread is inside gc.ensure_enabled",1);
1073 }
1074 _PyRuntime.gc.enabled = 1;
1075 Py_RETURN_NONE;
1076 }

--
nosy: +yselivanov

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

We need a test that will fail without your fix.

--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

The new test crashes without my fix but once we use the fix, all the
tests pass. I have modified the SimSMTPServer.process_manage method

--

___
Python tracker 

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



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2018-01-30 Thread Ned Deily

Ned Deily  added the comment:

I don't know what the right answer here is.  But since there don't seem to be 
strong opinions one way or the other with regard to 3.7, I am not going to hold 
3.7.0b1 for a resolution.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue32045] Does json.dumps have a memory leak?

2018-01-30 Thread Cheryl Sabella

Change by Cheryl Sabella :


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



[issue32722] Mislabeling of a dict comprehension as a generator expression in the tutorial

2018-01-30 Thread Soothsayer

Soothsayer  added the comment:

I agree that 2.7 is incorrect also, 2.7 has dict comprehensions also so there's 
no reason to pass a generator expression to dict().

I add 3.4 and 3.8 because they also have the problem.

--
versions: +Python 3.4, Python 3.8

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> (PyErr_WarnEx might error out; please update the code to handle that)

Lisa, would you like to take a crack at fixing this one?

--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:


New changeset 8d83e4ba7823827bcbc119db887004d5c3a63dc6 by R. David Murray 
(Stéphane Wirtel) in branch 'master':
bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr and 
to_addrs (#5451)
https://github.com/python/cpython/commit/8d83e4ba7823827bcbc119db887004d5c3a63dc6


--

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5283

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2018-01-30 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy: +gregory.p.smith, twouters

___
Python tracker 

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



[issue31912] PyMem_Malloc() should guarantee alignof(max_align_t)

2018-01-30 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy: +gregory.p.smith, twouters

___
Python tracker 

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



[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

Ah, my mistake. That said, when you're not passing an encoding, you're still 
just calling regular open, it's not doing any special codecs.open wrapping (on 
Python 2, this meant you weren't decoding the input at all, on Python 3 it 
means you're decoding with the default encoding); you may as well just call 
open (codecs.open is pointless as soon as io.open exists, since codecs.open 
it's slower and has so many weird quirks).

While I acknowledge codecs.open is misbehaving here, I'm not sure fixing it is 
a great idea, since the function is effectively a legacy function (especially 
when used without an encoding argument), and io.open works correctly.

--

___
Python tracker 

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



[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

On rereading the docs for Python 3 codecs.open, it doesn't seem to document the 
whole "no encoding means no codecs.StreamReaderWriter wrapping behavior" at all.

First off, any fix would only apply to Python 3 (I've removed 2.7 from the 
versions). Both Python 2 and Python 3 have the behavior of calling the plain 
builtin open function with just filename, mode, and buffering when no encoding 
is provided. On Python 2, it's impossible to use the errors keyword (because 
plain built-in open doesn't do decoding, it doesn't accept an errors 
parameter); on Python 3, you could, but you'd be adding to the behavioral 
discrepancies with Python 2.

The docs (just above codecs.open) already state:

"the builtin open() and the associated io module are the recommended approach 
for working with encoded text files"; personally, I'm inclined to just wash my 
hands of codecs.open (perhaps moving the note about builtin open down inside 
codecs.open's docs, so people who get a direct link don't have to scroll up to 
notice the note).

codecs.open was and is underspecified, never worked right (e.g. #8260, which 
despite the status, is not really fixed 
https://stackoverflow.com/a/46438434/364696 ), and the code which uses it is 
likely already working around its quirks, making fixes difficult.

--

___
Python tracker 

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



[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg

Change by Josh Rosenberg :


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



[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

So, just for clarity, is there another approved mechanism for distributing an 
extension that just happens to act as a (Python version specific) C support 
library? I've wanted to be able to build a library (static or dynamic) that is 
installed to lib/pythonX.Y/site-packages so it can be found by other extensions 
that use it without them having to ship a copy themselves.

The best solution I found was building and installing untagged extensions with 
pip; the extension features weren't actually used for anything but unittesting 
the library, but making it an extension meant it got installed to the Python 
version specific site-packages.

If untagged extensions aren't just old-fashioned, but banned, my use case is 
broken, and I've been completely unable to find a decent, non-Cython based, 
setup.py based pattern for building a C library that provides wrappers for 
Python API calls (and therefore must target specific Python versions).

--
nosy: +josh.r

___
Python tracker 

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



[issue32694] Can no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ?

2018-01-30 Thread Josh Rosenberg

Change by Josh Rosenberg :


--
title: Can no longer specify OpenSLL locations with CPPFLAGS / LDFLAGS ? -> Can 
no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ?

___
Python tracker 

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



[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-30 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32623] Resize dict on del/pop

2018-01-30 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32637] Android: set sys.platform to android

2018-01-30 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2018-01-30 Thread Ned Deily

Ned Deily  added the comment:

Guido:
> But we should make some noise around this change in the 3.7 announcement.

How about a paragraph in the Deprecation section of the "What's New in Python 
3.7"? document

https://docs.python.org/dev/whatsnew/3.7.html#deprecated

--
nosy: +ned.deily

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2018-01-30 Thread Guido van Rossum

Guido van Rossum  added the comment:

> > But we should make some noise around this change in the 3.7 announcement.
>
> How about a paragraph in the Deprecation section of the "What's New in Python 
> 3.7"? document
>
> https://docs.python.org/dev/whatsnew/3.7.html#deprecated

You mean other than what's there? The text that's currently there begins with 
"In Python 3.8, ..." which almost sounds like it's misplaced or a typo.  Maybe 
you can amend it somehow to explain that in 3.7, using or importing the ABCs 
from "collections" instead of from "collections.abc" is deprecated, and in 3.8 
it will stop working.

--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Lisa Roach

Change by Lisa Roach :


--
pull_requests: +5284
stage:  -> patch review

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Lisa Roach

Lisa Roach  added the comment:

I gave it a shot- looks like we need to ensure that we catch any errors that 
could be thrown by the warning itself.

I wasn't entirely sure how to create a test for this, if anyone knows how I'll 
definitely add it!

--

___
Python tracker 

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



[issue32729] socket error handling needed

2018-01-30 Thread 양영일

New submission from 양영일 :

socket error handling needed

--
components: IO
messages: 311313
nosy: 양영일
priority: normal
severity: normal
status: open
title: socket error handling needed
type: crash
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Interesting use case Josh.  I don't know of a good way to deal with 
non-extension-module Python API using .so files.  I like your extension hack, 
but what is the problem with having the version embedded in the .so name?

--

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-30 Thread Kubilay Kocak

Kubilay Kocak  added the comment:

The changeset(s) applied in this issue were/are fine (thus no response on the 
issue)

It is the *removal* of the changesets included in this issue (as proposed in 
https://github.com/python/cpython/pull/5233) that would re-break compilation of 
extensions with clang (requiring re-opening this issue)

The root cause of the current confusion is the special case added here was 
conditional on the OS ('freebsd'), whereas it should (arguably) have been for a 
specific compiler (clang). 

In order to do this, this leads to the compiler detection code requiring 
improvement, see: 
https://github.com/python/cpython/pull/5233#issuecomment-358906977 as it 
currently does not detect clang as the default compiler (cc), see: 
https://github.com/python/cpython/pull/5233#issuecomment-358948425

--

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-30 Thread Kubilay Kocak

Kubilay Kocak  added the comment:

If the intent is to use this issue to track the resolution of the original 
issue (clang compilation broken) and cover the new PR (which just moves the 
code from os detection to compiler detection), then it can remain open. 

Otherwise it can be closed, as the original issue 'has' been fixed.

--

___
Python tracker 

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