[issue35506] Doc: fix keyword `as` link from `import` and `try`

2018-12-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue35506] Doc: fix keyword `as` link from `import` and `try`

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1e47fbcf78c4d66fbe1fc7b4ea91a6b147ff83d2 by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-35506: Remove redundant and incorrect links from keywords. 
(GH-11174). (GH-11232)
https://github.com/python/cpython/commit/1e47fbcf78c4d66fbe1fc7b4ea91a6b147ff83d2


--

___
Python tracker 

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



[issue35509] Unable to inherit from logging.Formatter

2018-12-18 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

Oh so that's a simple Python question. Yep it works if `self` is removed. Thank 
you very much for the comment and sorry for bothering. I'll fix the code I'm 
using.

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



[issue35506] Doc: fix keyword `as` link from `import` and `try`

2018-12-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10466

___
Python tracker 

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



[issue35506] Doc: fix keyword `as` link from `import` and `try`

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2b57c43f21f891df4c6f2294a3b9e1b9029a16b6 by Serhiy Storchaka in 
branch 'master':
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
https://github.com/python/cpython/commit/2b57c43f21f891df4c6f2294a3b9e1b9029a16b6


--

___
Python tracker 

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



[issue10320] printf %qd is nonstandard

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 838645dc4191c4109e2b300cf9ed9d481b55509f by Serhiy Storchaka 
(Zackery Spytz) in branch '2.7':
bpo-10320: Use PY_FORMAT_LONG_LONG in ctypes' PyCArg_repr(). (GH-11230)
https://github.com/python/cpython/commit/838645dc4191c4109e2b300cf9ed9d481b55509f


--

___
Python tracker 

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Ma Lin


Ma Lin  added the comment:

 comes from html.escape(s, quote=True)
https://github.com/python/cpython/blob/4a9ee26750aa8cb37b5072b2bb4dd328819febb4/Lib/html/__init__.py#L24
Of course, it's not a bug.

It would be better to patch in Sphinx, I will do it at some point.

--

___
Python tracker 

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



[issue35531] xml.etree.ElementTree Elment.find bug, fails to find tag

2018-12-18 Thread Justin


Justin  added the comment:

Issue was user error. I though that find did a full search of the tree when it 
only searches children.
Solution is:

ele = xml.find('.//faultstring')

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



[issue35531] xml.etree.ElementTree Elment.find bug, fails to find tag

2018-12-18 Thread Justin


New submission from Justin :

When the following text it loaded in to an ElementTree Element, the find method 
is unable to find one of the elements without a namespace assigned to it.
```
import xml.etree.ElementTree as ElementTree

xml_text = """
http://schemas.xmlsoap.org/soap/envelope/;>a:ActionNotSupportedThe message with Action \'\' cannot be processed at the 
receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may 
be because of either a contract mismatch (mismatched Actions between sender and 
receiver) or a binding/security mismatch between the sender and the receiver.  
Check that sender and receiver have the same contract and the same binding 
(including security requirements, e.g. Message, Transport, 
None).
"""

xml = ElementTree.fromstring(xml_text)
ele = xml.find('faultstring')
ele == None #True
```

--
components: XML
messages: 332106
nosy: spacether
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree Elment.find bug, fails to find tag
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



[issue33610] IDLE: Make multiple improvements to CodeContext

2018-12-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

For M1 and M2 - #22703.

--

___
Python tracker 

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



[issue35499] "make profile-opt" overrides CFLAGS_NODIST

2018-12-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

But the `build_all_generate_profile` build is an intermediate instrumented 
interpreter build, it isn't shipped and things like PGO often require flags 
that the linker sees in order to generate the instrumented binary.

If those are left off of the link step, you won't have an instrumented binary 
and won't generate profile data.

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



[issue10320] printf %qd is nonstandard

2018-12-18 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +10465

___
Python tracker 

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



[issue35530] Counter-intuitive logging API

2018-12-18 Thread Victor Porton


New submission from Victor Porton :

The following script:

#/usr/bin/env python3
import logging
logger = logging.getLogger(name='main')
logger.setLevel(logging.INFO)
logger.error('XXX')
logging.error('ZZZ')
logger.error('XXX')

outputs

XXX
ERROR:root:ZZZ
ERROR:main:XXX

That is counter-intuitive: two logger.error('XXX') operators should output the 
same string, not two different strings "XXX" and "ERROR:main:XXX".

Please discuss how to make Python behave as a user could expect.

--
components: Library (Lib)
messages: 332103
nosy: porton
priority: normal
severity: normal
status: open
title: Counter-intuitive logging API
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue10320] printf %qd is nonstandard

2018-12-18 Thread miss-islington


miss-islington  added the comment:


New changeset 53e2248a94cd89e65326c5cfd400f74a88552d8c by Miss Islington (bot) 
in branch '2.7':
bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' 
PyCArg_repr(). (GH-10853)
https://github.com/python/cpython/commit/53e2248a94cd89e65326c5cfd400f74a88552d8c


--

___
Python tracker 

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



[issue35529] A reference counting bug in ctypes

2018-12-18 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue35529] A reference counting bug in ctypes

2018-12-18 Thread Zackery Spytz


New submission from Zackery Spytz :

In PyCFuncPtr_FromDll(), "dll" will leak if an error occurs in 
_validate_paramflags() or GenericPyCData_new().

--
components: Extension Modules, ctypes
messages: 332101
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: A reference counting bug in ctypes
type: behavior
versions: Python 2.7, 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



[issue35424] multiprocessing.Pool: emit ResourceWarning

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c74e7c48ba4f8437d4c8b402098b8cefc33a28a9 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-35424: Fix test_multiprocessing_main_handling (GH-11223) (GH-11227)
https://github.com/python/cpython/commit/c74e7c48ba4f8437d4c8b402098b8cefc33a28a9


--

___
Python tracker 

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



[issue10320] printf %qd is nonstandard

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10463

___
Python tracker 

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



[issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7)

2018-12-18 Thread miss-islington


miss-islington  added the comment:


New changeset 729fc5d2acab9eb672c4804092236af5362a4c66 by Miss Islington (bot) 
in branch '3.7':
bpo-31731: Fix test_io.check_interrupted_write() (GH-11225)
https://github.com/python/cpython/commit/729fc5d2acab9eb672c4804092236af5362a4c66


--
nosy: +miss-islington

___
Python tracker 

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



[issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7)

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

The test can be fixed in Python 2.7 by exposing pthread_sigmask() somehow, or 
at least pthread_sigmask(SIG_BLOCK, [SIGALARM]), but honestly, I don't think 
that it's worth it. The test only very rarely hangs, and the bug has already 
been fixed in Python 3.

I close the issue. I fixed a race condition in test_io of Python 3. (The bot 
will shortly backport the fix to 3.7).

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



[issue35424] multiprocessing.Pool: emit ResourceWarning

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10462

___
Python tracker 

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



[issue35424] multiprocessing.Pool: emit ResourceWarning

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6cdce3ddef805e11d75142f3e20e23c3fe21fdf4 by Victor Stinner in 
branch 'master':
bpo-35424: Fix test_multiprocessing_main_handling (GH-11223)
https://github.com/python/cpython/commit/6cdce3ddef805e11d75142f3e20e23c3fe21fdf4


--

___
Python tracker 

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



[issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7)

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10461

___
Python tracker 

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



[issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7)

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 05c9d31eb62cc45dc3c55a5cdb7cbc713d0421db by Victor Stinner in 
branch 'master':
bpo-31731: Fix test_io.check_interrupted_write() (GH-11225)
https://github.com/python/cpython/commit/05c9d31eb62cc45dc3c55a5cdb7cbc713d0421db


--

___
Python tracker 

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



[issue35012] [3.7] test_multiprocessing_spawn hangs randomly on AppVeyor

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

I haven't seen this bug for 2 months, I'm unable to reproduce the bug and I 
don't know how to fix it. I close the bug as out of date. Reopen it if it comes 
back.

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



[issue14094] ntpath.realpath() should use GetFinalPathNameByHandle()

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

Any update on this issue?

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



[issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7)

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

> AMD64 FreeBSD 10.x Shared 3.7 issue:

I wrote PR 11225 which may fix it.

--

___
Python tracker 

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



[issue35528] [DOC] [LaTeX] Sphinx 2.0 uses GNU FreeFont as default for xelatex

2018-12-18 Thread jfbu


New submission from jfbu :

Not sure if any issue at all, but as said in title, starting with Sphinx 2.0 
(Spring 2019), XeLaTeX will be configured to use by default GNU FreeFont, (see 
https://github.com/sphinx-doc/sphinx/blob/master/CHANGES), and this means new 
dependency (for documentation builds on Ubuntu, package fonts-freefont-otf; for 
builds on Fedora 29 it is texlive-gnu-freefont).  Indeed currently CPython PDFs 
are built using ``xelatex``.

--
assignee: docs@python
components: Documentation
messages: 332092
nosy: docs@python, jfbu
priority: normal
severity: normal
status: open
title: [DOC] [LaTeX] Sphinx 2.0 uses GNU FreeFont as default for xelatex

___
Python tracker 

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



[issue31731] [2.7] test_io: race condition in test_interrupted_write_text() (test_io hangs on x86 Gentoo Refleaks 2.7)

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10460

___
Python tracker 

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +10459

___
Python tracker 

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Steve Dower


Steve Dower  added the comment:

I've got an alternate PR to do the fixup in an extension, as well as fixing two 
other minor build problems for docs (on Windows).

--

___
Python tracker 

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think this is a Sphinx bug. It should work around limitations of the CHM 
compiler.

--

___
Python tracker 

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



[issue35394] Add __slots__ = () to asyncio protocols

2018-12-18 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



[issue23057] [Windows] asyncio: support signal handlers on Windows (feature request)

2018-12-18 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue32706] test_check_hostname() of test_ftplib started to fail randomly

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, let's keep this permanent temporary fix (test skipped until someone finds a 
solution). I close the issue.

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

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

Even if the code isn't perfect, I didn't see the failure recently. So I close 
the bug again.

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



[issue23057] [Windows] asyncio: support signal handlers on Windows (feature request)

2018-12-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset b5c8cfa1da17c6f3acac80a0afca7f7104fb9589 by Andrew Svetlov 
(Vladimir Matveev) in branch 'master':
bpo-23057: add loop self socket as wakeup fd for signals (#11135)
https://github.com/python/cpython/commit/b5c8cfa1da17c6f3acac80a0afca7f7104fb9589


--

___
Python tracker 

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



[issue35527] Make fields selectively immutable in dataclasses

2018-12-18 Thread Yury Selivanov


Yury Selivanov  added the comment:

+1.  I've tried to use `field(frozen=True)` today and was surprised it's not 
supported.

--
nosy: +yselivanov

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 12f3979b3807b448ca070b44bbc1597cf800f8a4 by Yury Selivanov (Miss 
Islington (bot)) in branch '3.7':
bpo-35465: Document _UnixSelectorEventLoop.add_signal_handler. (GH-11145) 
(GH-11221)
https://github.com/python/cpython/commit/12f3979b3807b448ca070b44bbc1597cf800f8a4


--

___
Python tracker 

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



[issue34833] [CI] Azure Pipeline: Initialize Agent failed

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see the failure recently, so I close the issue.

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Steve Dower


Steve Dower  added the comment:

It looks like generally the  entity does not work in the CHM index - 
there should be b' and u' entries as well, but they show up as b and u (whereas 
b" and u" are fine).

Substituting  seems to work fine, but I had to do that manually in the hhk 
file and then rebuild the hhp directly. I'm not sure the best way to integrate 
it into our entire build process is.

--

___
Python tracker 

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



[issue35424] multiprocessing.Pool: emit ResourceWarning

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10458

___
Python tracker 

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



[issue34764] Improve documentation example for using iter() with sentinel value

2018-12-18 Thread ChrisRands


Change by ChrisRands :


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

___
Python tracker 

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



[issue35502] Memory leak in xml.etree.ElementTree.iterparse

2018-12-18 Thread miss-islington


miss-islington  added the comment:


New changeset 60c919b58bd3cf8730947a00ddc6a527d6922ff1 by Miss Islington (bot) 
in branch '3.7':
bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170)
https://github.com/python/cpython/commit/60c919b58bd3cf8730947a00ddc6a527d6922ff1


--
nosy: +miss-islington

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread Yury Selivanov


Change by Yury Selivanov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue35520] Python won't build with dtrace enabled on some systems.

2018-12-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10456

___
Python tracker 

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



[issue35465] [asyncio] Document loop.add_signal_handler

2018-12-18 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset e3666fc8effb05b555121f4ab7388df59e21f8b4 by Yury Selivanov 
(Hrvoje Nikšić) in branch 'master':
bpo-35465: Document _UnixSelectorEventLoop.add_signal_handler. (GH-11145)
https://github.com/python/cpython/commit/e3666fc8effb05b555121f4ab7388df59e21f8b4


--

___
Python tracker 

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



[issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue35527] Make fields selectively immutable in dataclasses

2018-12-18 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The unsafe_hash option is unsafe only because it doesn't afford mutability 
protections.  This can be mitigated with selective immutability.

@dataclass
class Person:
ssn: int = field(immutable=True)
birth_city: int = field(immutable=True)
name: str  # A person can change their name
address: str   # A person can move  
age: int   # An age can change

This would generate something like this:

   def __setattr__(self, attr, value):
  if attr in {'ssn', 'birth_city'} and hasattr(self, attr):
   raise TypeError(
   f'{attr!r} is not settable after initialization')
  return object.__setattr__(self, name, attr)

A number of APIs are possible -- the important thing to be able to selectively 
block updates to particular fields (particularly those used in hashing and 
ordering).

--
assignee: eric.smith
components: Library (Lib)
messages: 332080
nosy: eric.smith, rhettinger
priority: normal
severity: normal
status: open
title: Make fields selectively immutable in dataclasses
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



[issue35499] "make profile-opt" overrides CFLAGS_NODIST

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35499] "make profile-opt" overrides CFLAGS_NODIST

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

Oh wait, "make build_all_generate_profile" and "make profile-opt" have another 
issue. They modify LDFLAGS, whereas PGO flags seem to be very specific to the 
compiler, not to the linker.

I reopen the issue.

build_all_generate_profile:
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) 
$(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"

profile-opt: profile-run-stamp
...
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) 
$(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)"

LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" of "make build_all_generate_profile" 
looks harmless: passing PGO flags to the linker works since gcc is used as the 
linker. Except that LDFLAGS is exported and used by distutils, and passing PGO 
flags to build third party code is not ok: see bpo-35257.

For "make profile-opt", LDFLAGS="$(LDFLAGS)" looks useless.

PGO flags depend on the compiler:

* clang
 
  * PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
  * PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"

* gcc:

 * PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
 * PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"

* ICC:

  * PGO_PROF_GEN_FLAG="-prof-gen"
  *  PGO_PROF_USE_FLAG="-prof-use"

* Default:

  * PGO_PROF_GEN_FLAG="-fprofile-generate"
  * PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"

I don't think that any of these flags should be passed to the LDFLAGS. Passing 
these flags to CFLAGS should be enough.

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



[issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9

2018-12-18 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue17561] Add socket.create_server_sock() convenience function

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue35502] Memory leak in xml.etree.ElementTree.iterparse

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10453

___
Python tracker 

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



[issue35502] Memory leak in xml.etree.ElementTree.iterparse

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d2a75c67830d7c9f59e4e9b60f36974234c829ef by Serhiy Storchaka in 
branch 'master':
bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170)
https://github.com/python/cpython/commit/d2a75c67830d7c9f59e4e9b60f36974234c829ef


--

___
Python tracker 

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



[issue35461] Document C API functions which swallow exceptions

2018-12-18 Thread miss-islington


miss-islington  added the comment:


New changeset f265afec1c2a5acb8cb9c9ddb6cd45f7465c6eb5 by Miss Islington (bot) 
in branch '3.7':
bpo-35461: Document C API functions which suppress exceptions. (GH-9)
https://github.com/python/cpython/commit/f265afec1c2a5acb8cb9c9ddb6cd45f7465c6eb5


--
nosy: +miss-islington

___
Python tracker 

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



[issue17561] Add socket.create_server_sock() convenience function

2018-12-18 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue17561] Add socket.create_server_sock() convenience function

2018-12-18 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


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

___
Python tracker 

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



[issue22703] Idle Code Context menu entrie(s)

2018-12-18 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue35516] platform.system_alias(): add macOS support

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35516] platform.system_alias(): add macOS support

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 60875db2f67815d7d181c552bfac59e8c97619e3 by Victor Stinner in 
branch 'master':
bpo-35516: platform.system_alias() don't replace Darwin (GH-11207)
https://github.com/python/cpython/commit/60875db2f67815d7d181c552bfac59e8c97619e3


--

___
Python tracker 

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



[issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9

2018-12-18 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

Let's extend the "joke" and make it mandatory in Python 4! :)

--

___
Python tracker 

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



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2018-12-18 Thread Yury Selivanov


Yury Selivanov  added the comment:

Dima, we'll likely address this in 3.8, when we land new SSL implementation.  
Meanwhile you can use uvloop where all these bugs should be fixed.

--

___
Python tracker 

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



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2018-12-18 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2018-12-18 Thread Steve Dower


Steve Dower  added the comment:

That option is only for the py.exe launcher and not the whole installation 
(notice the target path is still under C:\Users).

Having an updated image would be fine, though the only difference should be the 
version number. If you can provide a similar sized image of the 3.7 installer 
(screen scaling at 100%) then I'll add the drop shadow, cover the username and 
update the docs.

--

___
Python tracker 

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



[issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9

2018-12-18 Thread Eric Snow


Change by Eric Snow :


--
nosy: +barry, brett.cannon

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2018-12-18 Thread Zachary Ware


Change by Zachary Ware :


--
assignee: docs@python -> steve.dower
components: +Windows
nosy: +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



[issue35348] Problems with handling the file command output in platform.architecture()

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

The initial issue has been fixed, I close the issue. Thanks for the review and 
feedback!

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



[issue10496] Python startup should not require passwd entry

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

A few minor tests are still failing when the uid doesn't exist in the password 
database, but the main issue in pwdhas been fixed and distutils should work 
more or lesss. I close this 8 years old issue. Thanks to everyone who has been 
involved in helping to fix it!

--
components: +Library (Lib), Tests -None
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue10496] Python startup should not require passwd entry

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ea6b322829c62951362f267d7afdd262aa2b3e2c by Victor Stinner in 
branch '2.7':
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931) 
(GH-11213)
https://github.com/python/cpython/commit/ea6b322829c62951362f267d7afdd262aa2b3e2c


--

___
Python tracker 

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



[issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9

2018-12-18 Thread ChrisRands


ChrisRands  added the comment:

SO question where this derived from:

https://stackoverflow.com/questions/53830960/can-all-future-statements-be-removed-from-a-python-code-without-affecting-i

--

___
Python tracker 

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



[issue35526] __future__.barry_as_FLUFL documented as mandatory for Python 3.9

2018-12-18 Thread ChrisRands


New submission from ChrisRands :

A festive bug report:

>>> from __future__ import barry_as_FLUFL
>>> barry_as_FLUFL.mandatory
(3, 9, 0, 'alpha', 0)

So barry_as_FLUFL is documented to become mandatory for Python 3.9. Note that 
mandatory here means that the feature becomes permanent without the __future__ 
import and cannot be switched off. In this case, this means the '!=' operator 
becomes a SynaxError, with obvious consequences for existing python code.

Now of course this is just an Easter egg, but given that 3.9 is surely on the 
horizon now, isn't it time to modify the joke, or maybe I'm missing the point 
and the joke is on me?

--
messages: 332068
nosy: ChrisRands
priority: normal
severity: normal
status: open
title: __future__.barry_as_FLUFL documented as mandatory for Python 3.9

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-18 Thread miss-islington


miss-islington  added the comment:


New changeset 6e96fb44f12c2e9d7ab0d14a21f2aa85ecaa2f83 by Miss Islington (bot) 
in branch '3.7':
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931)
https://github.com/python/cpython/commit/6e96fb44f12c2e9d7ab0d14a21f2aa85ecaa2f83


--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10450

___
Python tracker 

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



[issue35525] Incorrect keyword name in NNTP.starttls() documentation

2018-12-18 Thread Colin McPhail


New submission from Colin McPhail :

The library documentation for nntplib.NNTP.starttls() says that it takes a 
keyword parameter called ssl_context. The source code referenced via the link 
at the top of the nntplib documentation shows the keyword is actually called 
context. The result is a TypeError if the documented name is used:
TypeError: starttls() got an unexpected keyword argument 'ssl_context'

--
assignee: docs@python
components: Documentation
messages: 332066
nosy: cmcp22, docs@python
priority: normal
severity: normal
status: open
title: Incorrect keyword name in NNTP.starttls() documentation
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



[issue10496] Python startup should not require passwd entry

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 17d0c0595e101c4ce76b58e55de37e6b5083e6cd by Victor Stinner in 
branch 'master':
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931)
https://github.com/python/cpython/commit/17d0c0595e101c4ce76b58e55de37e6b5083e6cd


--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10449

___
Python tracker 

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



[issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work

2018-12-18 Thread Jason


Jason  added the comment:

Yes, it does. I haven't tried that code, but it looks similar to a fix I
implemented locally.

Jason O'Gray

On Sun, Dec 2, 2018 at 2:41 PM Karthikeyan Singaravelan <
rep...@bugs.python.org> wrote:

>
> Karthikeyan Singaravelan  added the comment:
>
> > However, I think there might be a bug with the implementation that
> doesn't correctly respect the BROWSER preference. Notice how the
> webbrowser._tryorder has two 'lynx' items and both of them
> are last. If you look at the comment in the code, it says that it should
> be prepended to _tryorder because it's the preferred browser
>
> @ograycode Is this similar to issue35308 ?
>
> --
> nosy: +xtreak
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue17679] sysconfig generation uses some env variables multiple times

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

build.diff: Difference without/with the patch on Python build from source.

Example:

-   CPPFLAGS = "-I. -I./Include"
+   CPPFLAGS = "-I. -I/Include"

This change is wrong: /Include directory doesn't exist.

Another example:

-   LIBPL = "/usr/local/lib/python3.8/config-3.8dm-x86_64-linux-gnu"
+   LIBPL = "/usr/local/lib/python3.8/config-dm-x86_64-linux-gnu"

I don't understand why "3.8" is removed from the path.

--
Added file: https://bugs.python.org/file48004/build.diff

___
Python tracker 

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



[issue17679] sysconfig generation uses some env variables multiple times

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that the attached patch is correct. See attached install.diff: 
difference without/with 00178-dont-duplicate-flags-in-sysconfig.patch on Python 
installed in /usr/bin/python3.

Example of bug:

  'TESTRUNNER': 
'LD_LIBRARY_PATH=/builddir/build/BUILD/Python-3.7.1/build/optimized '
-   './python '
-   '/builddir/build/BUILD/Python-3.7.1/Tools/scripts/run_tests.py',
+   './python /Tools/scripts/run_tests.py',

The /Tools directory doesn't exist :-/


> I think that this is not the correct behaviour, but not sure, maybe I'm doing 
> something wrong.

Technically, it's perfectly fine to pass the same flag multiple times. It's 
common to pass -O0 -Og to gcc for example: gcc uses the last -O option value 
(which overrides the previous ones).

--

This patch is used in the python3 package of Fedora:
https://src.fedoraproject.org/rpms/python3/blob/master/f/00178-dont-duplicate-flags-in-sysconfig.patch

Patch added by:

commit 58f477b403222ea6c13d5d7358551b606cddc0f8
Author: Bohuslav Kabrda 
Date:   Wed Apr 10 14:30:09 2013 +0200

Updated to Python 3.3.1.

- Refreshed patches: 55 (systemtap), 111 (no static lib), 146 (hashlib 
fips),
153 (fix test_gdb noise), 157 (uid, gid overflow - fixed upstream, just
keeping few more downstream tests)
- Removed patches: 3 (audiotest.au made it to upstream tarball)
- Removed workaround for http://bugs.python.org/issue14774, discussed in
http://bugs.python.org/issue15298 and fixed in revision 24d52d3060e8.

https://src.fedoraproject.org/rpms/python3/c/58f477b403222ea6c13d5d7358551b606cddc0f8?branch=master

--
nosy: +vstinner
Added file: https://bugs.python.org/file48003/install.diff

___
Python tracker 

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



[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

I will keep an eye on buildbots next days.

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



[issue30525] Expose SCTs on TLS connections

2018-12-18 Thread Christian Heimes


Christian Heimes  added the comment:

I looked into the matter. It's certainly doable to have simple CT validation. A 
custom CT policy is a bit more work, as I would have to provide a callback and 
two new types.

* a method to load CT log config, SSL_CTX_set_ctlog_list_file()
* a method to enable CT verification mode, SSL_CTX_enable_ct()
* an optional callback to handle SCTs and enforce policies.
* wrappers for CT_POLICY_EVAL_CTX and SCT structs

There is also the issue of CT log list configuration. Neither Fedora nor Debian 
ship a CT log file [1]. Without a CT log configuration, SCT validation doesn't 
work. I created [2] to generate a config file from Chrome's known CT list. The 
configuration isn't static and list needs to be updated regularly.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876403
https://github.com/tiran/ct_log_list

--

___
Python tracker 

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



[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e6b247c8e524dbe5fc03b3492f628d0d5348bc49 by Victor Stinner in 
branch 'master':
bpo-35523: Remove ctypes callback workaround (GH-11211)
https://github.com/python/cpython/commit/e6b247c8e524dbe5fc03b3492f628d0d5348bc49


--

___
Python tracker 

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



[issue35509] Unable to inherit from logging.Formatter

2018-12-18 Thread Luna Chen


Luna Chen  added the comment:

Hi Chih-Hsuan Yen,

I have noticed in your `__init__` method, you have `super().__init__(self)`, 
I'm just wondering if the `self` argument is intentional, as the `Foo` object 
is to become the format itself?

Because inheritance seems to work fine for me with `super().__init__()`, as 
super() is used for the parent class object, so I don't need to pass in the 
`self` for the object itself. the `self` in `super().__init__(self)` becomes 
the value of `fmt` argument..

--

___
Python tracker 

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



[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
title: Remove ctypes old workaround: creating the first instance of a callback 
-> Remove old ctypes callback workaround: creating the first instance of a 
callback

___
Python tracker 

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



[issue35523] Remove ctypes old workaround: creating the first instance of a callback

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35509] Unable to inherit from logging.Formatter

2018-12-18 Thread Luna Chen


Luna Chen  added the comment:

Hi Chih-Hsuan Yen,
I will check this out and let you know the outcome.

Thanks! :)

--

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2018-12-18 Thread Jules Lasne

Jules Lasne  added the comment:

There is also a conflict between the image and the text:

Under `Selecting a custom install`, a line says
```
To perform an all-users installation, you should select “Customize 
installation”. In this case:
```

But the screenshot of the installer shows that you can select an option on the 
main menu to install for all users.

What should be done about this conflict ? I cannot currently run the latest 
installer on Windows but will be able to tonight or tomorrow to check it if no 
one did before.

--
nosy: +mdk

___
Python tracker 

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



[issue35524] using/windows launcher image might be deprecated

2018-12-18 Thread Jules Lasne


New submission from Jules Lasne :

https://docs.python.org/3/_images/win_installer.png

This image corresponds to the Python 3.5 installer. Would it be useful to get a 
new screenshot of the latest installer ?

I can do it if needed

--
assignee: docs@python
components: Documentation
messages: 332055
nosy: docs@python, seluj78
priority: normal
severity: normal
status: open
title: using/windows launcher image might be deprecated
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



[issue35523] Remove ctypes old workaround: creating the first instance of a callback

2018-12-18 Thread STINNER Victor


New submission from STINNER Victor :

ctypes._reset_cache() contains the following code:

# XXX for whatever reasons, creating the first instance of a callback
# function is needed for the unittests on Win64 to succeed.  This MAY
# be a compiler bug, since the problem occurs only when _ctypes is
# compiled with the MS SDK compiler.  Or an uninitialized variable?
CFUNCTYPE(c_int)(lambda: None)

This code has been added 11 years ago:

commit 674e9389e9fdadd622829f4833367ac3b38475b5
Author: Thomas Heller 
Date:   Fri Aug 31 13:06:44 2007 +

Add a workaround for a strange bug on win64, when _ctypes is compiled
with the SDK compiler.  This should fix the failing
Lib\ctypes\test\test_as_parameter.py test.

diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index cdf6d36e47..f55d194b8f 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -535,3 +535,9 @@ for kind in [c_ushort, c_uint, c_ulong, c_ulonglong]:
 elif sizeof(kind) == 4: c_uint32 = kind
 elif sizeof(kind) == 8: c_uint64 = kind
 del(kind)
+
+# XXX for whatever reasons, creating the first instance of a callback
+# function is needed for the unittests on Win64 to succeed.  This MAY
+# be a compiler bug, since the problem occurs only when _ctypes is
+# compiled with the MS SDK compiler.  Or an uninitialized variable?
+CFUNCTYPE(c_int)(lambda: None)

--

This call is removed from Fedora package by the following patch:

https://src.fedoraproject.org/rpms/python3/blob/master/f/00155-avoid-ctypes-thunks.patch

Extract of Fedora python3.spec:

# 00155 #
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
# generating SELinux denials on "import ctypes" and "import uuid" when
# embedding Python within httpd
# See https://bugzilla.redhat.com/show_bug.cgi?id=814391
Patch155: 00155-avoid-ctypes-thunks.patch

The patch has been added 6 years ago in Fedora:

commit 8a28107df1670a03a12cf6a7787160f103d8d8c8
Author: David Malcolm 
Date:   Fri Apr 20 15:28:39 2012 -0400

3.2.3-4: avoid allocating thunks in ctypes unless absolutely necessary 
(patch 155; rhbz#814391)

* Fri Apr 20 2012 David Malcolm  - 3.2.3-4
- avoid allocating thunks in ctypes unless absolutely necessary, to avoid
generating SELinux denials on "import ctypes" and "import uuid" when 
embedding
Python within httpd (patch 155; rhbz#814391)

https://src.fedoraproject.org/rpms/python3/c/8a28107df1670a03a12cf6a7787160f103d8d8c8?branch=master

--

I don't understand the purpose of the workaround and ctypes is working well on 
Fedora. I propose to also remove the workaround in the master branch.

In case of doubt, I prefer to keep the workaround in Python 3.7.

Attached PR removes the workaround.

--
components: Library (Lib)
messages: 332054
nosy: vstinner
priority: normal
severity: normal
status: open
title: Remove ctypes old workaround: creating the first instance of a callback
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



[issue35461] Document C API functions which swallow exceptions

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10447

___
Python tracker 

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



[issue35461] Document C API functions which swallow exceptions

2018-12-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10446

___
Python tracker 

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



[issue35461] Document C API functions which swallow exceptions

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b by Serhiy Storchaka in 
branch 'master':
bpo-35461: Document C API functions which suppress exceptions. (GH-9)
https://github.com/python/cpython/commit/3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b


--

___
Python tracker 

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



[issue35502] Memory leak in xml.etree.ElementTree.iterparse

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not easy to avoid reference cycles if use a generator function. And 
generator function is much faster than an implementation as a class with the 
__next__ method. We need to access the iterator object from the code of the 
generator function, and this creates a cycle.

--

___
Python tracker 

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



[issue35502] Memory leak in xml.etree.ElementTree.iterparse

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, my PR 11169 used the wrong issue number: bpo-35257 instead of bpo-35502. 
Anyway, I closed it, the change is too complex.

--

IMHO the root issue is the handling of the SyntaxError exception in 
XMLPullParser.feed(). I wrote a fix, but I don't have the bandwidth to write an 
unit test checking that the reference cycle is broken.

commit 9f3354d36a89d7898bdb631e5119cc37e9a74840 (fix_etree_leak)
Author: Victor Stinner 
Date:   Fri Dec 14 22:03:16 2018 +0100

bpo-35257: Fix memory leak in XMLPullParser.feed()

Fix memory leak in XMLPullParser.feed() of xml.etree: on syntax
error, clear the traceback to break a reference cycle.

diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index c1cf483cf5..f17c52541b 100644
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -1266,6 +1266,8 @@ class XMLPullParser:
 try:
 self._parser.feed(data)
 except SyntaxError as exc:
+# bpo-35502: Break reference cycle
+#exc.__traceback__ = None
 self._events_queue.append(exc)
 
 def _close_and_return_root(self):


I don't see any behavior difference in XMLPullParser.read_events() which raise 
again the exception:

events = self._events_queue
while events:
event = events.popleft()
if isinstance(event, Exception):
raise event
else:
yield event

--

PR 11170 is also a nice enhancement (fix treebuilder_gc_traverse()), but maybe 
we should also prevent creating reference cycles in the first place?

--

___
Python tracker 

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



[issue35348] Problems with handling the file command output in platform.architecture()

2018-12-18 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I closed my PR 11186 which modified architecture() to only return 
struct.calcsize('P') if the executable argument is equal to sys.executable.

> please read the doc-string of the platform.architecture() function (or ask 
> the person who wrote most of the module). It clearly refers to inspecting a 
> specific executable and only uses the Python interpreter as default. The 
> running process can provide some sane defaults, but is not necessarily using 
> the same values as the given executable.

I see the platform module as a module to get info about the operating system 
and Python, but it seems like I misunderstood the purpose of the specific case 
of the architecture() function.

I propose a small addition to the doc to avoid confusion:
https://github.com/python/cpython/pull/11208/files

--

___
Python tracker 

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



[issue35348] Problems with handling the file command output in platform.architecture()

2018-12-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10445

___
Python tracker 

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Ma Lin


Ma Lin  added the comment:

amazing, you did find it.

--

___
Python tracker 

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



[issue35482] can't open python368rc1.chm and python372rc1.chm

2018-12-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The breakage was caused by the index entry for ''' (triple single quote). After 
removing it a correct CHM file is created.

--

___
Python tracker 

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



  1   2   >