[issue35449] documenting objects

2018-12-10 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I asked:
> > Are you suggesting we need new syntax to automatically assign docstrings 
> > to instances?

Stefan replied:
> No, I'm not suggesting that.

And then immediately went on to suggest new syntax for automatically 
binding a string to objects as docstrings. I am amused :-)

Whether you want to call it "new semantics for existing syntax" or "new 
syntax" is a matter of terminology. The point is, you are suggesting 
something that requires dedicated support from the interpreter, as 
opposed to merely writing some Python code.

> I'm suggesting that within the current
> syntax, some additional semantic rules might be required to bind
> comments (or strings) to objects as "docstrings".

To my mind, it makes sense to have dedicated docstring syntax for 
classes, modules and functions: I expect that they will make up in 
excess of 95% of use-cases for docstrings. In this case, special cases 
*are* special enough to change the rules.

But for the rare(?) cases of wanting to add docstrings to arbitrary 
instances, I don't think it is justified to have dedicated syntax to do 
it. It's easy enough and more than flexible enough to just do an 
instance attribute assignment:

instance.__doc__ = """This is the instance docstring."""

I strongly oppose any suggestion that *comments* be treated as code:

> foo = 123
> # This is foo's docstring

Deleting comments shouldn't make have any runtime effect on the code, 
but in this case it would. (I'm willing to make an exception for the 
optional encoding cookie at the beginning of modules, as a rather 
special case.)

So I think there are three related but separate issues here:

1. help(obj) and possibly PyDoc in general ought to support per-instance 
docstrings. I think that is uncontroversial and we just need somebody to 
do the work to make it happen.

2. Add special syntactic sugar to automatically associate a string with 
arbitrary instances as a docstring. I think that's overkill and 
unnecessary, but I'd be willing to be convinced otherwise.

3. Your examples suggest that even built-in immutable objects like ints 
should be able to take docstrings. I don't think that idea is going to 
fly, but I'm also not sure how serious you are about that. It runs into 
the problem that small ints and certain strings are cached, so your 
docstring could clobber my docstring. It is also going to require the 
addition of an extra attribute slot to every int, str, etc for the 
docstring, even if 99.999% of them never use it.

> It would be great to establish a convention for this, so in the future
> tools don't have to invent their own (non-portable) convention.

``instance.__doc__ = "docstring"`` seems pretty portable to me :-)

--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor

STINNER Victor  added the comment:

The bug was introduced in 2003 by:

commit 787354c3b99c9a0c5fdbdd33d29f58ef26df379f
Author: Martin v. Löwis 
Date:   Sat Jan 25 15:28:29 2003 +

Merge with PyXML 1.80:
Basic minidom changes to support the new higher-performance builder, as
described: 
http://mail.python.org/pipermail/xml-sig/2002-February/007217.html

--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote a fix: PR 11061.

--
keywords:  -easy

___
Python tracker 

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



[issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2018-12-10 Thread Mario Corchero


Change by Mario Corchero :


--
pull_requests: +10296

___
Python tracker 

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



[issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions

2018-12-10 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Borrowed references are incorrectly decrefed in get_warnoptions() and 
get_xoptions() in Python/sysmodule.c. The bag was introduced in issue30860.

--
components: Interpreter Core
messages: 331478
nosy: eric.snow, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Incorrect reference counting for sys.warnoptions and sys._xoptions
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue35446] incorrect example

2018-12-10 Thread Martin Panter

Martin Panter  added the comment:

It doesn’t make sense to move the “except” line without moving the matching 
“print” line. According to 
, “A clause 
consists of a header and a ‘suite’.” So when it talks about reversing the 
“except” clauses, that includes reversing the corresponding “print” lines, so 
they condinue to identify which exception handler was triggered.

--
nosy: +martin.panter

___
Python tracker 

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



[issue35446] incorrect example

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The example is correct. If the except clauses were reversed

for cls in [B, C, D]:
try:
raise cls()
except B:
print("B")
except C:
print("C")
except D:
print("D")

it would have printed B, B, B.

--
nosy: +serhiy.storchaka
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



[issue35447] Redundant try-except block in urllib

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Martin. The try-except block was added for purpose.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10298

___
Python tracker 

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



[issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10299

___
Python tracker 

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



[issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 72ff7b4c000f7b8199231a0eb1ca4b119fab40a5 by Serhiy Storchaka in 
branch 'master':
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. 
(GH-11063)
https://github.com/python/cpython/commit/72ff7b4c000f7b8199231a0eb1ca4b119fab40a5


--

___
Python tracker 

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



[issue35445] Do not ignore errors when create posix.environ

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6fef0f1a8162e755f3b46677265b7cf052d9b83f by Serhiy Storchaka in 
branch 'master':
bpo-35445: Do not ignore memory errors when create posix.environ. (GH-11049)
https://github.com/python/cpython/commit/6fef0f1a8162e755f3b46677265b7cf052d9b83f


--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8e0418688906206fe59bd26344320c0fc026849e by Victor Stinner in 
branch 'master':
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061)
https://github.com/python/cpython/commit/8e0418688906206fe59bd26344320c0fc026849e


--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10300

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10301

___
Python tracker 

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



[issue35445] Do not ignore errors when create posix.environ

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10302

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2eb6ad8578fa9d764c21a92acd8e054e3202ad19 by Victor Stinner 
(Christian Heimes) in branch 'master':
bpo-35050: AF_ALG length check off-by-one error (GH-10058)
https://github.com/python/cpython/commit/2eb6ad8578fa9d764c21a92acd8e054e3202ad19


--

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10303

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10304

___
Python tracker 

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



[issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset fc79175f5e6424c4978ba9e9b9bc006778cdfd40 by Miss Islington (bot) 
in branch '3.7':
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. 
(GH-11063)
https://github.com/python/cpython/commit/fc79175f5e6424c4978ba9e9b9bc006778cdfd40


--
nosy: +miss-islington

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10305

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cf247359d5b7082044eea1fa94b5211a172b1ff6 by Victor Stinner in 
branch 'master':
bpo-31374: Include pyconfig.h earlier in expat (GH-11064)
https://github.com/python/cpython/commit/cf247359d5b7082044eea1fa94b5211a172b1ff6


--

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10306

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10307

___
Python tracker 

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



[issue35452] Make PySys_HasWarnOptions() never raising an exception

2018-12-10 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

While "warnings" was a static variable in Python/sysmodule.c, it was guarantied 
that PySys_HasWarnOptions() never raises an exception. But since it became a 
value of the sys dict (see issue30860), it can have an arbitrary type, and 
PySys_HasWarnOptions() can raise an exception (while returning 0).

The proposed PR makes it never raising an exception again.

--
components: Interpreter Core
messages: 331488
nosy: eric.snow, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Make PySys_HasWarnOptions() never raising an exception
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue35452] Make PySys_HasWarnOptions() never raising an exception

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35451] Incorrect reference counting for sys.warnoptions and sys._xoptions

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35452] Make PySys_HasWarnOptions() to never raise an exception

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: Make PySys_HasWarnOptions() never raising an exception -> Make 
PySys_HasWarnOptions() to never raise an exception

___
Python tracker 

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



[issue35325] imp.find_module() return value documentation discrepancy

2018-12-10 Thread Stefan Bauer (TraceTronic)


Stefan Bauer (TraceTronic)  added the comment:

Hi, thank you for your proposal. However, your version still contains the 
discepancy. Maybe I formulated the problem not clear, so let's try again:

The documentation should state that "pathname" will be None (not the empty 
string) for built-in and frozen modules in order to be in line with the 
implementation.

Thank you very much for your efforts.
Kind regards, Stefan

--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3fd975583b8e43d8dc23c83d699cd10b1fee6f7f by Victor Stinner in 
branch '3.6':
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11067)
https://github.com/python/cpython/commit/3fd975583b8e43d8dc23c83d699cd10b1fee6f7f


--

___
Python tracker 

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



[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Cristian Ciupitu


New submission from Cristian Ciupitu :

pathlib.Path.glob and pathlib.Path.rglob don't work with os.PathLike patterns.

Short example:

from pathlib import Path, PurePath
# fails
tuple(Path('/etc').glob(PurePath('passwd')))# TypeError
tuple(Path('/etc').rglob(PurePath('passwd')))   # TypeError
tuple(Path('C:\\').glob(PurePath('Windows')))   # AttributeError
tuple(Path('C:\\').rglob(PurePath('Windows')))  # AttributeError
# works
from os import fspath
tuple(Path('/etc').glob(fspath(PurePath('passwd'
tuple(Path('/etc').rglob(fspath(PurePath('passwd'
tuple(Path('C:\\').glob(fspath(PurePath('Windows'
tuple(Path('C:\\').rglob(fspath(PurePath('Windows'

--
components: Library (Lib)
messages: 331491
nosy: ciupicri
priority: normal
severity: normal
status: open
title: pathlib.Path: glob and rglob should accept PathLike patterns
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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c3cc75134d41c6d436c21d3d315dc069b4826432 by Victor Stinner in 
branch '3.7':
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11066)
https://github.com/python/cpython/commit/c3cc75134d41c6d436c21d3d315dc069b4826432


--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cecf313d1ef4adc0ee5338dd0ca9be0b98302c87 by Victor Stinner in 
branch '2.7':
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11068)
https://github.com/python/cpython/commit/cecf313d1ef4adc0ee5338dd0ca9be0b98302c87


--

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the bug report and proposed fix Charalampos Stratakis, thanks for 
the reproducer script Petr Viktorin.

Shivank Gautam:
> Hey Tal, I am extremely sorry for all delay. actually, due to internship and 
> my university exams, I am unable to dedicate my time to bug(#35052). please 
> consider it and you can tell Charalampos Stratakis in the bug to push his 
> prepared pull request. I hope you will be still supportive when I will return 
> in mid-dec after completing my exams.

No problem. Charalampos Stratakis told me that he wanted to see this bug fixed 
to reduce the number of issues spotted by Coverity, so I fixed it.

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



[issue35050] Off-by-one bug in AF_ALG

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1a7b62d5571b3742e706d247dfe6509f68f1409d by Victor Stinner in 
branch '3.7':
bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11069)
https://github.com/python/cpython/commit/1a7b62d5571b3742e706d247dfe6509f68f1409d


--

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bad41cefef6625807198a813d9dec2c08d59dc60 by Victor Stinner in 
branch '3.6':
bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11070)
https://github.com/python/cpython/commit/bad41cefef6625807198a813d9dec2c08d59dc60


--

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Christian!

Note: Python 2 is not affected, it doesn't support AF_ALG.

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



[issue35257] Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
title: Avoid leaking linker flags into distutils. -> Avoid leaking linker flags 
into distutils: add PY_LDFLAGS_NODIST

___
Python tracker 

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



[issue9633] pdb go stack up/down

2018-12-10 Thread Henry Chen


Change by Henry Chen :


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

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset 1467a3ac121897c2ad7512d664478d8916a35217 by Miss Islington (bot) 
in branch '3.7':
bpo-31374: Include pyconfig.h earlier in expat (GH-11064)
https://github.com/python/cpython/commit/1467a3ac121897c2ad7512d664478d8916a35217


--
nosy: +miss-islington

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset 7215e4857123afa8577f63c1024bcd1889a96305 by Miss Islington (bot) 
in branch '3.6':
bpo-31374: Include pyconfig.h earlier in expat (GH-11064)
https://github.com/python/cpython/commit/7215e4857123afa8577f63c1024bcd1889a96305


--

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset 7bbf7b02ab0852aa757505a7e4062eb52817037a by Miss Islington (bot) 
in branch '2.7':
bpo-31374: Include pyconfig.h earlier in expat (GH-11064)
https://github.com/python/cpython/commit/7bbf7b02ab0852aa757505a7e4062eb52817037a


--

___
Python tracker 

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



[issue35449] documenting objects

2018-12-10 Thread Stefan Seefeld


Stefan Seefeld  added the comment:

ad 3) sorry, I picked a bad example - I didn't mean to suggest that immutable 
objects should in fact become mutable by modifying their `__doc__` attribute.

ad 1) good, glad to hear that.

ad 2) fine. In fact, I'm not even proposing that per-instance docstring 
generation should be "on" by default. I'm merely asking whether the Python 
community can't (or even shouldn't) agree on a single convention for how to 
represent them, such that special tools can then support them, rather than 
different tools supporting different syntax / conventions.

--

___
Python tracker 

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



[issue35452] Make PySys_HasWarnOptions() to never raise an exception

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset dffccc6b594951fc798973e521da205785823f0f by Serhiy Storchaka in 
branch 'master':
bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075)
https://github.com/python/cpython/commit/dffccc6b594951fc798973e521da205785823f0f


--

___
Python tracker 

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



[issue35452] Make PySys_HasWarnOptions() to never raise an exception

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10310

___
Python tracker 

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



[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is for purpose. Path is not a glob pattern, and glob pattern is not a 
path. '*.txt' is aт ordinary file name on Linux and is invalid file name on 
Windows. If we wanted to accept Path in any place that accepts a string, we 
would make Path a subclass of str.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35454] Fix miscellaneous issues in error handling

2018-12-10 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The proposed patch fixes miscellaneous issues in error handling.

--
components: Extension Modules, Interpreter Core
messages: 331504
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Fix miscellaneous issues in error handling
type: behavior
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



[issue35454] Fix miscellaneous issues in error handling

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35454] Fix miscellaneous issues in error handling

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is an extraction from my larger patch. These changes fix real bugs and 
should be backported.

--

___
Python tracker 

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



[issue35452] Make PySys_HasWarnOptions() to never raise an exception

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset ea773eb1f9e79e9f558ca1fe8909cf6ac1c00371 by Miss Islington (bot) 
in branch '3.7':
bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075)
https://github.com/python/cpython/commit/ea773eb1f9e79e9f558ca1fe8909cf6ac1c00371


--
nosy: +miss-islington

___
Python tracker 

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



[issue35452] Make PySys_HasWarnOptions() to never raise an exception

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

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



[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Cristian Ciupitu


Cristian Ciupitu  added the comment:

What if the pattern has some directories in it, e.g. "SourceArt/**/*.png", how 
do you compose it? The traditional way is to either hardcode the separator 
(e.g. / or \) or use os.path.combine. I don't see why PurePath can't be used 
for this, e.g. PurePath('SourceArt')/"**'/'*.png'.

--

___
Python tracker 

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



[issue27004] Handle script shbang options

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



[issue32788] Better error handling in sqlite3

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fc662ac332443a316a120fa5287c235dc4f8739b by Serhiy Storchaka in 
branch 'master':
bpo-32788: Better error handling in sqlite3. (GH-3723)
https://github.com/python/cpython/commit/fc662ac332443a316a120fa5287c235dc4f8739b


--

___
Python tracker 

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



[issue32788] Better error handling in sqlite3

2018-12-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10312

___
Python tracker 

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



[issue35455] Solaris thread_time doesn't work with current implementation

2018-12-10 Thread Jakub Kulik


New submission from Jakub Kulik :

Implementation of time.thread_time() doesn't work on Solaris because clock_id 
CLOCK_THREAD_CPUTIME_ID is not known (it is defined, but clock_gettime returns 
EINVAL error). Solaris, however, has function gethrvtime() which can substitute 
this functionality.

I attached a possible patch which does work during tests and I further tested 
it with some basic scripts.

--
components: Extension Modules
files: thread_time.diff
keywords: patch
messages: 331509
nosy: kulikjak
priority: normal
severity: normal
status: open
title: Solaris thread_time doesn't work with current implementation
versions: Python 3.7
Added file: https://bugs.python.org/file47984/thread_time.diff

___
Python tracker 

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



[issue35425] test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

Sometimes a test is killed by SIGALRM (signal 14). I don't understand how it 
can happen, since test_eintr always disarm the ITIMER_REAL timer before 
restoring the old signal handler (which kills the process when SIGARLM is 
received).

https://buildbot.python.org/all/#/builders/170/builds/190

0:05:34 load avg: 4.19 [102/416/1] test_eintr failed
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... skipped 'need select.epoll'
test_kqueue (__main__.SelectEINTRTest) ... ok
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... test_all 
(test.test_eintr.EINTRTests) ... 
--- run eintr_tester.py ---
--- eintr_tester.py completed: exit code -14 ---
FAIL

==
FAIL: test_all (test.test_eintr.EINTRTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_eintr.py",
 line 31, in test_all
self.fail("eintr_tester.py failed")
AssertionError: eintr_tester.py failed

--

Ran 1 test in 7.889s

FAILED (failures=1)
test test_eintr failed

--

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10313

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2632df4c3f48f23af85a60bffc61030d52e83ee2 by Victor Stinner in 
branch '2.7':
[2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078)
https://github.com/python/cpython/commit/2632df4c3f48f23af85a60bffc61030d52e83ee2


--

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10314

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10315

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b6ef6f69a9afc979640a5f9883f799de1364bff7 by Victor Stinner in 
branch 'master':
bpo-31374: expat doesn't include  on Windows (GH-11079)
https://github.com/python/cpython/commit/b6ef6f69a9afc979640a5f9883f799de1364bff7


--

___
Python tracker 

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



[issue35433] Correctly detect installed SDK versions

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue since https://github.com/python/cpython/pull/11060 for 
Python 3.6 is still open.

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset ef1fc0d031c925416d49b407518932ccbf57a0d2 by Miss Islington (bot) 
in branch '3.7':
bpo-31374: expat doesn't include  on Windows (GH-11079)
https://github.com/python/cpython/commit/ef1fc0d031c925416d49b407518932ccbf57a0d2


--

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread miss-islington


miss-islington  added the comment:


New changeset 3acf30de90936fe3714bb62873e2523c0440e652 by Miss Islington (bot) 
in branch '3.6':
bpo-31374: expat doesn't include  on Windows (GH-11079)
https://github.com/python/cpython/commit/3acf30de90936fe3714bb62873e2523c0440e652


--

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the warning should be fixed in all supported branches.

--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread Steve Dower


Steve Dower  added the comment:

I'm just waiting on Victor to sign off on PR 11029 (or someone else to do it) 
so I can merge it and rebase PR 11027.

Hopefully then someone will review it today so that we don't have to hold up 
3.7.2rc1 any longer.

--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

Sorry, I don't have the bandwidth to provide a proper review.

--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread Steve Dower


Steve Dower  added the comment:

Okay, I'll merge the first part now so I can rebase the main one and 
*hopefully* someone will be willing to review it now it's smaller. Otherwise, I 
think we're best to go with buildbots and all the testing I've already done.

This is my sole job today, so I'll keep an eye on the buildbots. I'll also get 
the docs updated as Paul suggested for the main PRs.

--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread Steve Dower


Steve Dower  added the comment:


New changeset 1c3de541e64f75046b20cdd27bada1557e550bcd by Steve Dower in branch 
'master':
bpo-34977: Use venv redirector instead of original python.exe on Windows 
(GH-11029)
https://github.com/python/cpython/commit/1c3de541e64f75046b20cdd27bada1557e550bcd


--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread Steve Dower


Steve Dower  added the comment:


New changeset b264c609853eae9dbb45c6dbee11e84ae3927e88 by Steve Dower in branch 
'3.7':
[3.7] bpo-34977: Use venv redirector instead of original python.exe on Windows 
(GH-11029)
https://github.com/python/cpython/commit/b264c609853eae9dbb45c6dbee11e84ae3927e88


--

___
Python tracker 

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



[issue35438] Extension modules using non-API functions

2018-12-10 Thread Eddie Elizondo


Change by Eddie Elizondo :


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

___
Python tracker 

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



[issue35438] Extension modules using non-API functions

2018-12-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Three extension modules: _testcapimodule.c, posixmodule.c, and mathmodule.c 
> are using `_PyObject_LookupSpecial` which is not API.

I don't understand the issue that you are trying to solve. Yes, Python builtin 
extensions use private functions of the C API.

--
nosy: +vstinner

___
Python tracker 

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



[issue35438] Extension modules using non-API functions

2018-12-10 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

@vstinner: Sorry for not being clear - The intention of this change is two-fold:
1) Simplify the implementation of these functions.
2) Reduce the surface area of the C-API.

Given that the same functionality can be achieved with public functions of the 
C-API. This is a nice cleanup over the current approach.

--

___
Python tracker 

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



[issue35438] Cleanup extension functions using _PyObject_LookupSpecial

2018-12-10 Thread Eddie Elizondo


Change by Eddie Elizondo :


--
title: Extension modules using non-API functions -> Cleanup extension functions 
using _PyObject_LookupSpecial

___
Python tracker 

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



[issue35438] Cleanup extension functions using _PyObject_LookupSpecial

2018-12-10 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

I also fixed the title to properly reflect what this is trying to achieve.

--

___
Python tracker 

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



[issue34616] implement "Async exec"

2018-12-10 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

So through time our heuristic to check wether a code should be async or not 
grew: 

https://github.com/ipython/ipython/blob/320d21bf56804541b27deb488871e488eb96929f/IPython/core/async_helpers.py#L94-L165

There also seem to be some code that uses `codeop.compile_command` to figure 
out wether the user code is valid syntax (or not), so that would need some 
update too. 

I'm thinking of submitting a talk at PyCon to explain what we've discover so 
far in IPython.

--

___
Python tracker 

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



[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-12-10 Thread Gregory P. Smith


Change by Gregory P. Smith :


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



[issue34616] implement "Async exec"

2018-12-10 Thread pmpp


pmpp  added the comment:

indeed adding async flag to compile and providing some 'aexec' is a very good 
idea ! 

*an async repl is really usefull when stuck with a threadless python*

( specific engines, or emscripten cpython )

"top-level async is invalid syntax" : 
Rewinding the readline history stack to get code "async'ified" is probably not 
the best way : readline is specific to some platforms.
see https://github.com/pmp-p/aioprompt for a hack using that.

First raising an exception "top level code is async" and allowing user to get 
source code from exception would maybe a nice start to an async repl.

--
nosy: +pmpp

___
Python tracker 

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



[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-12-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

In 3.6 this help(subprocess.Popen.__init__) is accurate and encourages looking 
at the docs.  In 3.7 and later it'll simply report close_fds=True in the 
siguature as that is the case in 3.7 onwards.

I see nothing to fix here.

--
nosy: +gregory.p.smith
resolution:  -> wont fix
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



[issue35403] support application/wasm in mimetypes and http.server

2018-12-10 Thread R. David Murray


R. David Murray  added the comment:

We don't generally add a mime type until it is a de-jure or de-facto standard.  
If it is still in testing it is probably too soon to add it.  For testing, you 
can always add it yourself in your code via the api that mimetypes provides.

--

___
Python tracker 

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



[issue34616] implement "Async exec"

2018-12-10 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

In IPython we use `prompt_toolkit`  which does already provide a async readline 
alternative.

Also have a look at 
https://github.com/ipython/ipython/blob/320d21bf56804541b27deb488871e488eb96929f/IPython/core/interactiveshell.py#L121-L150

Seem to be equivalent to what you aare trying to do with updating your locals 
here 
https://github.com/pmp-p/aioprompt/blob/93a25ea8753975be6ed891e8d45f22db91c52200/aioprompt/__init__.py#L78-L94

It just sets the function to not create a new local scope

--

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

See also bpo-35450: venv module doesn't create a copy of python binary by 
default

--
nosy: +jkloth

___
Python tracker 

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



[issue34616] implement "Async exec"

2018-12-10 Thread pmpp


pmpp  added the comment:

i already use prompt_toolkit on droid as it uses concurrent futures for 
completion and threads are allowed on that platform, and yeah it is quite good.

but no way to use it on emscripten where cpython is 100% async ( it uses 
dummy_threading to load asyncio ). best you can do is fill an history buffer 
with the indented input, eval the whole thing when it's done with 
PyRun_SimpleString. 

having cpython storing code until sync/async path can  be choosen could save a 
lot of external hacks with minimal impact on original repl loop, unless 
somebody is willing to make it *fully* async ( i know i can't ). 

The original repl input loop is really not made for async and i don't know if 
Sylvain Beuclair's work on "emterpreted" cpython covers also python3.

thx for the pointers anyway and your article on async and ast was inspiration.

--

___
Python tracker 

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



[issue35438] Cleanup extension functions using _PyObject_LookupSpecial

2018-12-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There is nothing wrong with using private C API in the implementation of 
standard CPython extensions. This API was designed for this.

In contrary, there are problems with your code:

* It is less efficient. String objects are created and destroyed twice per 
every function call, in PyObject_HasAttrString() and in PyObject_CallMethod(). 
Format string is parsed in PyObject_CallMethod(). Other temporary objects are 
created and destroyed.

* It uses inherently broken PyObject_HasAttrString(). PyObject_HasAttrString() 
swallows exceptions (for example a MemoryError raised when create a temporary 
string object) and can return an incorrect result.

* It is not equivalent with the existing code. For example it does not work 
properly if the dunder method is a static method.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35448] ConfigParser .read() - handling of nonexistent files

2018-12-10 Thread David Heiberg


Change by David Heiberg :


--
nosy: +dheiberg

___
Python tracker 

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



[issue35433] Correctly detect installed SDK versions

2018-12-10 Thread Steve Dower


Steve Dower  added the comment:


New changeset f04cc5fc0d2f644cccb57543aae487ee30091924 by Steve Dower (Jeremy 
Kloth) in branch '3.6':
[3.6] bpo-35433: Properly detect installed SDK versions (GH-11009)
https://github.com/python/cpython/commit/f04cc5fc0d2f644cccb57543aae487ee30091924


--

___
Python tracker 

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



[issue35433] Correctly detect installed SDK versions

2018-12-10 Thread Steve Dower


Change by Steve Dower :


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



[issue34977] Release Windows Store app containing Python

2018-12-10 Thread Steve Dower


Steve Dower  added the comment:

Paul (and anyone else) - the below link should go directly to just the commit 
with the docs update. I did a slight rearrangement of the install docs to make 
the options clearer, and wrote up *just* enough info on nuget to help people 
use it right (I hope). Similarly for the Store package.

Any comments appreciated. Still aiming to get this in for 3.7.2rc1 today.

https://github.com/python/cpython/pull/11027/commits/7d7ddbc41bd30690de8c6227cebc41c4e0f3cf88

I've also kicked off a custom buildbot run against the 3.7 version of the 
change. The version in master ran earlier and was clean. Plus I'm running test 
builds on the release machine, so it should be ready to go.

--

___
Python tracker 

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



[issue34616] implement "Async exec"

2018-12-10 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

> I'm thinking of submitting a talk at PyCon to explain what we've discover so 
> far in IPython.

You totally should!

Or actually there are two options to think about: you can submit a general 
talk, or submit a talk to the language summit. (Or write two talks and do both, 
I guess.) They're pretty different – the summit is a more informal thing (no 
video, smaller room), mostly just core devs, more of a working meeting kind of 
thing where you can argue about technical details.

--

___
Python tracker 

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



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Anthony Sottile


Change by Anthony Sottile :


--
pull_requests: +10317

___
Python tracker 

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



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Anthony Sottile


Anthony Sottile  added the comment:

I've opened a PR with the test included: 
https://github.com/python/cpython/pull/11085

--

___
Python tracker 

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



[issue35438] Cleanup extension functions using _PyObject_LookupSpecial

2018-12-10 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Agreed with everything in Serhiy's comments. This patch disregards why 
_PyObject_LookupSpecial and the various _Py_IDENTIFIER related stuff was 
created in the first place (to handle a non-trivial task efficiently/correctly) 
in favor of trying to avoid C-APIs that are explicitly okay to use for the 
CPython standard extensions. The goal is a mistake in the first place; no patch 
fix will make the goal correct.

Closing as not a bug.

--
resolution:  -> not a bug
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



[issue35338] set union/intersection/difference could accept zero arguments

2018-12-10 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Given the "feature" in question isn't actually an intended feature (just an 
accident of how unbound methods work), I'm closing this. We're not going to try 
to make methods callable without self.

--
resolution:  -> wont fix
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



[issue34616] implement "Async exec"

2018-12-10 Thread Matthias Bussonnier

Matthias Bussonnier  added the comment:

> Or actually there are two options to think about: you can submit a general 
> talk, or submit a talk to the language summit. (Or write two talks and do 
> both, I guess.) They're pretty different – the summit is a more informal 
> thing (no video, smaller room), mostly just core devs, more of a working 
> meeting kind of thing where you can argue about technical details.

Thanks, I may do that then – if a core dev invite me to do so – I wouldn't have 
dared otherwise. I'm not even sure you can suggest a language summit proposal 
yet.

For the normal talk proposal here is what I have so far: 

https://gist.github.com/Carreau/20881c6c70f1cde9878db7aa247d432a

--

___
Python tracker 

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



  1   2   >