[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: Encoding and decoding, in the most general sense, can include unicode -> unicode and bytestring -> bytestring. I can't see any standard unicode->unicode encodings in Python 2.7 https://docs.python.org/2/library/codecs.html but we can create one: py> impor

[issue35529] A reference counting bug in ctypes

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Zackery. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no code that prevents unicode.encode() from returning the result of arbitrary type. Seems all standard codecs return str, but you can not be sure about custom codecs. -- nosy: +serhiy.storchaka ___ Pyth

[issue30455] Generate all tokens related code and docs from Grammar/Tokens

2018-12-20 Thread STINNER Victor
STINNER Victor added the comment: > If there are no objections I am going to merge PR 10370 in few days. LGTM. I guess that PR 9343 should be closed once PR 10370 is merged. -- ___ Python tracker __

[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue35537] use os.posix_spawn in subprocess

2018-12-20 Thread STINNER Victor
STINNER Victor added the comment: "posix_spawn() is faster" This assumption needs a benchmark! I ran a benchmark on Linux (Fedora 29, Linux kernel 4.19.9-300.fc29.x86_64, glibc 2.28) using attached subprocess_bench.py. I rebased the PR 11242 on master and run the benchmark in virtual enviro

[issue35537] use os.posix_spawn in subprocess

2018-12-20 Thread STINNER Victor
Change by STINNER Victor : -- assignee: -> vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue35544] unicode.encode docstring says return value can be unicode

2018-12-20 Thread radiocane
New submission from radiocane : In Python 2.7.15rc1 the docstring for unicode.encode starts with: "S.encode([encoding[,errors]]) -> string or unicode" But if this answer https://stackoverflow.com/a/449281/5397695 is correct, then unicode.encode will never return a unicode object. Am I right?

[issue35529] A reference counting bug in ctypes

2018-12-20 Thread miss-islington
miss-islington added the comment: New changeset 3752bc96c0ea1ecf28903cc34cdcd75c658e92ce by Miss Islington (bot) in branch '2.7': bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229) https://github.com/python/cpython/commit/3752bc96c0ea1ecf28903cc34cdcd75c658e92ce ---

[issue35529] A reference counting bug in ctypes

2018-12-20 Thread miss-islington
miss-islington added the comment: New changeset 4b6caaca41def86d80819f1f93c647918e98393f by Miss Islington (bot) in branch '3.7': bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229) https://github.com/python/cpython/commit/4b6caaca41def86d80819f1f93c647918e98393f ---

[issue35543] re.sub is only replacing max. of 2 string found by regexp.

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The third argument of re.sub() is the maximal number of replacements. re.I == 2. sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in string by the replace

[issue35529] A reference counting bug in ctypes

2018-12-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +10492 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35529] A reference counting bug in ctypes

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d77d97c9a1f593fe161afab97e2a3e2292ab88b9 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35529: Fix a reference counting bug in PyCFuncPtr_FromDll(). (GH-11229) https://github.com/python/cpython/commit/d77d97c9a1f593fe161afab97e2a3

[issue35529] A reference counting bug in ctypes

2018-12-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +10491 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35543] re.sub is only replacing max. of 2 string found by regexp.

2018-12-20 Thread Sagar
New submission from Sagar : Below are the logs: >>> dat = '"10GE" "4x" "AMPC" "B3" "BUILTIN" "DOWN" "LU" "SFP+" "ether" "xe" >>> "DOWN" "MPC" "BUILTIN"' >>> type = >>> re.subn(r'\"BUILTIN\"|\"B\d\"|\"I\d\"|\"LU\"|\"Trinity\"|\"Trio\"|\"DOWN\"|\"UNKNOWN\"|' ... r'^AND$|\"Q\"|\"MPC\"|\"EA\d

[issue35538] splitext does not seems to handle filepath ending in .

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not a bug. The current behavior is consistent and unsurprising. -- nosy: +serhiy.storchaka resolution: -> not a bug status: pending -> closed ___ Python tracker _

[issue18085] Verifying refcounts.dat

2018-12-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker __

[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2018-12-20 Thread Nathaniel Smith
Nathaniel Smith added the comment: It's confusing, but AFAICT what happened is that Mozilla started to disable it in release builds, but got a bunch of pushback from users and changed their minds and decided to keep it enabled. But then there was a snafu tracking the patch for that, so there

[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-12-20 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +10490 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

<    1   2