[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2019-07-03 Thread Ma Lin
Ma Lin added the comment: I tried PR 14030 today. By default, the fgcolor is black. Looks like a black belt always on the left side, this makes me feel a bit oppressive. Of course, the fgcolor can be changed. -- nosy: +Ma Lin Added file: https://bugs.python.org/file48455/1.png

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2019-07-03 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37495] socket.inet_aton parsing issue on some libc versions

2019-07-03 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: indeed, can confirm that a string starting with valid ip address and a space followed with anything, will not trigger the exception. do_ping('1.1.1.1 1.256.300.1 ; whoami') => no exception -- ___ Python tracker

[issue37495] socket.inet_aton parsing issue on some libc versions

2019-07-03 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: >From : >https://docs.python.org/3.9/library/subprocess.html#security-considerations Security Considerations Unlike some other popen functions, this implementation will never implicitly call a system shell. This means that all characters, including shell

[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset 070d3d928d20ccb4790dd077f3794af3c2932e5c by Barry Warsaw (Miss Islington (bot)) in branch '3.8': bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14580)

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset d7d9c9f7c22113a405f1a340d050edfa2d024dff by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14581)

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-03 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> fixed stage: patch review -> backport needed status: open -> closed ___ Python tracker ___

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset b607d992e76e485f20be3bfd6b311525123f936b by Barry Warsaw (aldwinaldwin) in branch 'master': bpo-37459: importlib docs improperly reference get_resource_loader() (#14568)

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +14400 pull_request: https://github.com/python/cpython/pull/14581 ___ Python tracker ___

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +14399 pull_request: https://github.com/python/cpython/pull/14580 ___ Python tracker ___

[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Eric Snow
Eric Snow added the comment: Note that there has been a little discussion of this in the past, particularly around the time that argument clinic was introduced: https://bugs.python.org/issue23967#msg241140. -- ___ Python tracker

[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Eric Snow
New submission from Eric Snow : In early 2014 (3.3), when argument clinic was added, we added support for turning func.__text_signature__ into an inspect.Signature object. However, the functionality to convert a string into a Signature was never exposed publicly. Here's a patch to do so.

[issue32179] Empty email address in headers triggers an IndexError

2019-07-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Closing this per @maxking's comment. If it can be recreated, please reopen. -- nosy: +cheryl.sabella resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError

2019-07-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Based on @maxking's comment, I'm going to close this issue. Thank you! -- nosy: +cheryl.sabella resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37496] Support annotations in signature strings.

2019-07-03 Thread Eric Snow
New submission from Eric Snow : In early 2014 (3.3), when argument clinic was added, we added support for turning func.__text_signature__ into an inspect.Signature object. However, at that time we did not add support for annotations (see the nested "parse_name()" in _signature_fromstr().

[issue15500] Python should support exporting thread names to the OS

2019-07-03 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.9 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue15500] Python should support exporting thread names to the OS

2019-07-03 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +14397 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14578 ___ Python tracker

[issue27452] IDLE: Cleanup config code

2019-07-03 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27452] IDLE: Cleanup config code

2019-07-03 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +14396 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14577 ___ Python tracker ___

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-07-03 Thread Ned Deily
Ned Deily added the comment: Thanks for the additional PR. Accepted for post-3.6.9 (PR 14576, commit a6d97e200863e7e5fc60bbc8f121b86a2098ef2d - message AWOL?) -- ___ Python tracker

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-07-03 Thread Ned Deily
Change by Ned Deily : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-07-03 Thread Anthony Sottile
Anthony Sottile added the comment: yes, as was the original PR -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-07-03 Thread Steve Dower
Steve Dower added the comment: Your PR is against 3.6 - is that intentional? -- resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker ___

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-07-03 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +14395 pull_request: https://github.com/python/cpython/pull/14576 ___ Python tracker ___

[issue37495] socket.inet_aton parsing issue on some libc versions

2019-07-03 Thread Dominik Czarnota
Change by Dominik Czarnota : -- type: -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37495] socket.inet_aton parsing issue on some libc versions

2019-07-03 Thread Dominik Czarnota
New submission from Dominik Czarnota : The socket.inet_aton Python function uses libc's inet_aton function. This, on some implementations, for example the latest GNU C Library (glibc 2.29 as of today), accepts whitespace with trailing characters after a valid IP. An example can be seen below:

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-07-03 Thread Anthony Sottile
Anthony Sottile added the comment: This has regressed again -- I'll make another patch -- ___ Python tracker ___ ___

[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2019-07-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +asvetlov, yselivanov versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31517] MainThread association logic is fragile

2019-07-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +aldwinaldwin, fabioz, int19h, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31517] MainThread association logic is fragile

2019-07-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 3.8, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.

2019-07-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a duplicate of #31517. -- nosy: +pitrou resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> MainThread association logic is fragile ___ Python tracker

[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-07-03 Thread Yhojann Aguilera
Yhojann Aguilera added the comment: Same problem using Python 3.6.8 on Ubuntu 18.04 LTS. For now, solve this using LD_PRELOAD=libgcc_s.so.1 python3 ... For more details and pocs: https://github.com/WHK102/wss/issues/2 -- nosy: +Yhojann Aguilera versions: +Python 3.6

[issue33408] Enable AF_UNIX support in Windows

2019-07-03 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22107] tempfile module misinterprets access denied error on Windows

2019-07-03 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-07-03 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- resolution: rejected -> versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-07-03 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- resolution: -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34896] Unable to install Python 3.5

2019-07-03 Thread Hobs
Hobs added the comment: I'd suggest using Anaconda to install python and all python packages that you need. Once you have Anaconda installed you can type `conda install django` and that should work. Also I'd suggest sticking with the lastest version of python (3.7) that installs with anaconda

[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2019-07-03 Thread Ned Deily
Ned Deily added the comment: Tal, I took a quick look at the results with the current PR and, as someone who doesn't use IDLE other than to smoke test, It looks fine to me. The concerns I raised previously about the interaction between changing the state of Options->Line Numbers and

[issue37489] pickling instance which inherited from Exception with keyword only parameter

2019-07-03 Thread liugang
Change by liugang : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37494] Call asyncio Future in scope

2019-07-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: It doesn't. Loop is executed by asyncio.run() (recommended) or low-level loop.run_until_complete() / loop.run_forever() calls. Please note, this tracker is for working on Python itself, not for teaching Python usage. Please use other resources like forums

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14394 pull_request: https://github.com/python/cpython/pull/14575 ___ Python tracker ___

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-03 Thread miss-islington
miss-islington added the comment: New changeset 56ec4f1fdedd5b38deb06d94d51dd1a540262e90 by Miss Islington (bot) (Kyle Stanley) in branch 'master': bpo-19696: Replace deprecated method in "test_import_pkg.py" (GH-14466)

[issue37494] Call asyncio Future in scope

2019-07-03 Thread Fourcade
Fourcade added the comment: Here's the file with an example. The get_progress function always outputs 0. -- Added file: https://bugs.python.org/file48454/test_progress.py ___ Python tracker

[issue37494] Call asyncio Future in scope

2019-07-03 Thread Fourcade
Fourcade added the comment: If I add a simple print inside long_task, the print is executed correctly. So it seems this code actually runs the loop. (I'm on python 3.6.8). -- ___ Python tracker

[issue37494] Call asyncio Future in scope

2019-07-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: Your code doesn't run the event loop, only creates it. What do you expect? -- ___ Python tracker ___

[issue37494] Call asyncio Future in scope

2019-07-03 Thread Fourcade
New submission from Fourcade : I'm trying to get the progession of my asyncIO Futures. For some reason, I can't get value updates inside any other scope. For example: ``` import concurrent.futures import time import asyncio import random def get_progress(futures): return sum([f.done()

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Test of stack usage: from _testcapi import stack_pointer class D(dict): def __missing__(self, key): sp = stack_pointer() print(f"stack usage = {TOP - sp}") return None d = D() TOP = stack_pointer() d[0] **before**: stack usage =

[issue37493] Use _PyObject_CallNoArg() in a few more places

2019-07-03 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- keywords: +patch pull_requests: +14393 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14575 ___ Python tracker ___

[issue37493] Use _PyObject_CallNoArg() in a few more places

2019-07-03 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : Try to use _PyObject_CallNoArg in all places where a function is called without arguments. -- components: Interpreter Core messages: 347230 nosy: jdemeyer priority: normal severity: normal status: open title: Use _PyObject_CallNoArg() in a few more

[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-07-03 Thread miss-islington
miss-islington added the comment: New changeset 1099e343e88ddfb46b84ba4ffc6ecc449b7f7891 by Miss Islington (bot) in branch '3.8': bpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550) https://github.com/python/cpython/commit/1099e343e88ddfb46b84ba4ffc6ecc449b7f7891

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-03 Thread Mark Dickinson
Mark Dickinson added the comment: The current FreeBSD documentation for fedisableexcept says: > All exceptions are masked by default. Source: https://www.freebsd.org/cgi/man.cgi?query=fedisableexcept=0=0=FreeBSD+12.0-RELEASE+and+Ports=default=html So it looks as though it may be safe to

[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +14392 pull_request: https://github.com/python/cpython/pull/14574 ___ Python tracker ___

[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset c7570d402e3ee8717615ffa020eb9e2215a77660 by Inada Naoki in branch '3.8': [3.8] bpo-37233: use _PY_FASTCALL_SMALL_STACK in method_vectorcall (GH-13974) https://github.com/python/cpython/commit/c7570d402e3ee8717615ffa020eb9e2215a77660 --

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-03 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-03 Thread Mark Dickinson
Mark Dickinson added the comment: > What is the behavior on FreeBSD when fedisableexcept(FE_OVERFLOW) is not > called? That's an excellent question, that I'd love to have an answer to for currently supported FreeBSD versions. I think the old behaviour is that anything that you'd expect to

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread jpic
jpic added the comment: Thanks a heap Eric, I feel a bit silly I missed it. Closing the issue as not a bug, please feel free to reopen if necessary. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Victor, what's your opinion on adding PyObject_CallOneArg() to the limited API? -- ___ Python tracker ___

[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-07-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +14391 pull_request: https://github.com/python/cpython/pull/14573 ___ Python tracker ___

[issue34155] email.utils.parseaddr mistakenly parse an email

2019-07-03 Thread jpic
jpic added the comment: Thanks for the kind words Cyril, sorry that this patch doesn't address exactly the issue that you have described initially, but rather the security issue related to it. The exception depending on the parsing issue is already supported by the new API, although it's

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: I don't want to add many functions to limited/public APIs. Note that public APIs defined outside of cpython/ are considered mandatory for all Python implementations supporting Python/C API. When portability is more important than performance, there are many

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: Counterpoint: I just sent an email to "info@info.", and Thunderbird and my MTA (postfix) and my mail relay all accepted it. I guess it's possible that a TLD (especially one of the newer ones) could accept email addresses in the TLD itself. It turns out that

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Stefan: I used an underscore by analogy with PyObject_CallNoArgs()/_PyObject_CallNoArg(), where the first is in the limited API and the second is an inline function in the cpython API. But maybe we could revisit that decision. --

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: RFC 1034 defines absolute domain names as ending with dot: When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). Since a complete domain name ends with the root label, this

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Is there any benchmark showing if it's faster Here is one example: class D(dict): def __missing__(self, key): return None d = D() and now benchmark d[0] **before**: Mean +- std dev: 173 ns +- 1 ns **after**: Mean +- std dev: 162 ns +- 1 ns

[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 53c214344038341ce86fcf7efa12dc33be9d5b45 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550)

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Stefan Krah
Stefan Krah added the comment: > Or do you care about *using* API with underscore? If so, I'm OK to stop > changing some callers which are not tightly coupled with Python. I care about this one. Indeed I think underscore functions should be used in strategic places inside the core

[issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 469d1a70cecc918499c288fc0e5e3d79711bc5e5 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37484: use _PyObject_Vectorcall for __exit__ (GH-14557) https://github.com/python/cpython/commit/469d1a70cecc918499c288fc0e5e3d79711bc5e5 --

[issue37421] Some tests leak temporary files

2019-07-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +14390 pull_request: https://github.com/python/cpython/pull/14572 ___ Python tracker ___

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: > It adds yet another special case underscore function that one cannot use in > external projects. So I would not say that is simpler. I don't get what you mean. Do you care about *adding* API with underscore? If so, it doesn't make caller code complex. It

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread STINNER Victor
STINNER Victor added the comment: > Exactly. I see no reason to prefer PyObject_CallFunctionObjArgs(func, arg, > NULL) over _PyObject_CallOneArg(func, arg) In this case, maybe the whole idea of _PyObject_CallOneArg() is not worth it? Is there any benchmark showing if it's faster or use less

[issue37490] poor documentation for .startswith, .endswith

2019-07-03 Thread Glenn Linderman
Glenn Linderman added the comment: Thanks for the explanations and suggestions. Now that I think I know what those parameters are used for... Sorry, my first example was tweaked on the fly, and doesn't make as much sense as it could because it wound up being a mix of pre-tweaked and tweaked

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > It adds yet another special case underscore function that one cannot use in > external projects. So I would not say that is simpler. If you're worried about the underscore, I will make a separate PR to add a non-underscored version, similar to

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Stefan Krah
Stefan Krah added the comment: It adds yet another special case underscore function that one cannot use in external projects. So I would not say that is simpler. Has there been any performance measurement at all? -- ___ Python tracker

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Exactly. I see no reason to prefer PyObject_CallFunctionObjArgs(func, arg, NULL) over _PyObject_CallOneArg(func, arg) -- ___ Python tracker

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: This change doesn't make caller code complicated. It makes caller little simpler. Choosing performance sensitive code is much hard than replace all occurrences. So I'm OK to change all callers except code owner opposed at once. --

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread jpic
New submission from jpic : Following up bpo-34155[0] PR#13079[1], which changes: >>> parseaddr('a@malicious@good') >From returning: ('', 'a@malicious') To return: ('', '') As such, parseaddr behaves more like documented: email.utils.parseaddr(address) Parse address – which

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Stefan Krah
Stefan Krah added the comment: The motivation for this PR is "it would be convenient to have this function". This is probably true, but generally I would not change 47 files at once. Most of the locations are probably not performance sensitive. -- nosy: +skrah

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: > Macros cannot be used in all C extensions. For the PEP 587, I was asked to > replace macros with functions. This is just an helper inline function / macro to ease calling _PyObject_Vectorcall. Extensions can port this helper inline function / macro to ease

[issue37421] Some tests leak temporary files

2019-07-03 Thread miss-islington
miss-islington added the comment: New changeset 0aefba7f99f0fd9bcb3328a5919e07f9e03676b0 by Miss Islington (bot) in branch '3.8': bpo-37421: Fix test_distutils.test_build_ext() (GH-14564) https://github.com/python/cpython/commit/0aefba7f99f0fd9bcb3328a5919e07f9e03676b0 --

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > PEP 7 uses C99 since Python 3.6: > https://www.python.org/dev/peps/pep-0007/#c-dialect That's not what the PEP says: "Python versions greater than or equal to 3.6 use C89 with several select C99 features" "several select C99 features" is not the same of

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, > key) is called twice. Actually, it's not a problem: sizeof() is special, it only looks at the type of its argument, it doesn't execute the code. --

[issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta

2019-07-03 Thread myungsekyo
Change by myungsekyo : -- nosy: +myungsekyo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37421] Some tests leak temporary files

2019-07-03 Thread miss-islington
miss-islington added the comment: New changeset 79665c698fb8f97475e03c4231067db1ae47addb by Miss Islington (bot) in branch '3.8': bpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563) https://github.com/python/cpython/commit/79665c698fb8f97475e03c4231067db1ae47addb

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, > key) is called twice. That's pretty bad and in my opinion a good reason to reject this idea. > If two or more arguments are not common, I prefer _PyObject_CallOneArg to >

[issue37421] Some tests leak temporary files

2019-07-03 Thread miss-islington
miss-islington added the comment: New changeset a2a807f75dc162dfb45fb297aee4961de8008f84 by Miss Islington (bot) in branch '3.8': bpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562) https://github.com/python/cpython/commit/a2a807f75dc162dfb45fb297aee4961de8008f84

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Inada Naoki
Inada Naoki added the comment: AFAIK, gcc, clang, and MSVC support it. Another cons is, general pitfall of macro: _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, key) is called twice. If two or more arguments are not common, I prefer _PyObject_CallOneArg to

[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-07-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -14383 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread STINNER Victor
STINNER Victor added the comment: > Variadic macros are not part of C89, so that would require changing PEP 7. PEP 7 uses C99 since Python 3.6: https://www.python.org/dev/peps/pep-0007/#c-dialect > What do you think about macro like this? Macros cannot be used in all C extensions. For the

[issue37483] Add PyObject_CallOneArg()

2019-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Cons: readability... It's a single relatively short macro. I'm not worried about that. I'm more about compiler support for such macros. I'll make a PR with this idea and see what CI says. -- ___ Python tracker

[issue37490] poor documentation for .startswith, .endswith

2019-07-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: Perhaps it would help if we spelled out the behaviour more explicitly? str.startswith(prefix[, start=0[, end=len(string)]]) Return True if the slice of string between start (defaults to the beginning of the string) and end (defaults to the end of the

[issue37421] Some tests leak temporary files

2019-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +14389 pull_request: https://github.com/python/cpython/pull/14571 ___ Python tracker ___

[issue37490] poor documentation for .startswith, .endswith

2019-07-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: Here are links to the relevant docs: https://docs.python.org/3/library/stdtypes.html#str.startswith https://docs.python.org/3/library/stdtypes.html#str.endswith Both say: "With optional *start*, test string beginning at that position. With optional *end*,

[issue37421] Some tests leak temporary files

2019-07-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 74c9dd57771f4f061ee83b069c8e7b37de41246b by Victor Stinner in branch 'master': bpo-37421: Fix test_distutils.test_build_ext() (GH-14564) https://github.com/python/cpython/commit/74c9dd57771f4f061ee83b069c8e7b37de41246b --

[issue37421] Some tests leak temporary files

2019-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +14388 pull_request: https://github.com/python/cpython/pull/14570 ___ Python tracker ___

[issue37421] Some tests leak temporary files

2019-07-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 684cb47fffb7af3ac50cb077f6d2a095c9ce20b4 by Victor Stinner in branch 'master': bpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563) https://github.com/python/cpython/commit/684cb47fffb7af3ac50cb077f6d2a095c9ce20b4

[issue37421] Some tests leak temporary files

2019-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +14387 pull_request: https://github.com/python/cpython/pull/14569 ___ Python tracker ___

[issue37421] Some tests leak temporary files

2019-07-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset b71d8d67959f3b5efbdfe00066589ac0d8f98aad by Victor Stinner in branch 'master': bpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562) https://github.com/python/cpython/commit/b71d8d67959f3b5efbdfe00066589ac0d8f98aad --

[issue37491] IndexError in get_bare_quoted_string

2019-07-03 Thread Abhilash Raj
New submission from Abhilash Raj : from email.parser import BytesParser, Parser from email.policy import default payload = 'Content-Type:x;\x1b*="\'G\'\\"' msg = Parser(policy=default).parsestr(payload) print(msg.get('content-type')) When trying to review PR for BPO 37461, I found

[issue37490] poor documentation for .startswith, .endswith

2019-07-03 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: correction: ... otherwise, text.startswith(prefix, start, end) gives the same result as text[start:end].startswith(prefix). -- ___ Python tracker

  1   2   >