[issue36346] Prepare for removing the legacy Unicode C API

2020-06-16 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20106 pull_request: https://github.com/python/cpython/pull/20927 ___ Python tracker ___

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: Why you always want to use "utf-8" encoded identifier as group name in `bytes` pattern. The direction is: a group name written in `bytes` pattern, and will convert to `str. Not this direction: `str` group name -(utf8)-> `bytes` pattern -> `str` group name

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2020-06-16 Thread miss-islington
miss-islington added the comment: New changeset 2c6d6c12c2d1a8f0c131d70ccf087555c52d4587 by Miss Islington (bot) in branch '3.9': bpo-19569: Add a macro to suppress deprecation warnings (GH-9004) https://github.com/python/cpython/commit/2c6d6c12c2d1a8f0c131d70ccf087555c52d4587 --

[issue40994] Very confusing documenation for abc.Collections

2020-06-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-16 Thread Eric Snow
Eric Snow added the comment: @Pablo, yeah, I'll try to take a look this week. Are these new failures? Keep in mind that these tests can sometimes expose existing bugs in our runtime (as we fix runtime issues elsewhere) rather than regressions, though that isn't necessarily the case here.

[issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler

2020-06-16 Thread Manuel Jacob
Manuel Jacob added the comment: I’ve created issue40996, which suggests that urllib should fsdecode percent-encoded parts of file URIs on Unix. Since the two tickets are very related and I’d prefer if the issue was solved more generally for the whole module, I close this as a duplicate.

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-06-16 Thread Guido van Rossum
Guido van Rossum added the comment: And here I had hoped that this was a Pull Request. :-) Note that the docs also still state that these are ABCs -- in fact they are Protocols. I'm not sure why the same info should be repeated for the `@runtime_checkable` decorator though. --

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: I just had an "aha moment": What re claims is that, rather than doing as I suggested: > ``` > # consider the following bytestring pattern > >>> p = b"(?P<\xc3\xba>)" > > # what character does the group name correspond to? > # maybe we can try to infer it by

[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-16 Thread Eric Snow
Eric Snow added the comment: New changeset 818f5b597ae93411cc44e404544247d436026a00 by Eric Snow in branch 'master': bpo-32604: Clean up test.support.interpreters. (gh-20926) https://github.com/python/cpython/commit/818f5b597ae93411cc44e404544247d436026a00 --

[issue40996] urllib should fsdecode percent-encoded parts of file URIs on Unix

2020-06-16 Thread Manuel Jacob
New submission from Manuel Jacob : On Unix, file names are bytes. Python mostly prefers to use unicode for file names. On the Python <-> system boundary, os.fsencode() / os.fsdecode() are used. In URIs, bytes can be percent-encoded. On Unix, most applications pass the percent-decoded bytes

[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-16 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +20105 pull_request: https://github.com/python/cpython/pull/20926 ___ Python tracker ___

[issue40995] reprlib.Repr.__init__ should accept arguments

2020-06-16 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +20104 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20925 ___ Python tracker ___

[issue40995] reprlib.Repr.__init__ should accept arguments

2020-06-16 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : reprlib.Repr does not accept arguments for the moment so setting its attributes must be done in multiple steps: import reprlib r = reprlib.Repr() r.maxstring = 10 r.maxset = 4 r.repr(...) It would be more user-friendly to be able to do: import reprlib r =

[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument

2020-06-16 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed nosy_count: 3.0 -> 4.0 pull_requests: +20102 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20924 ___ Python tracker

[issue40990] Make http.server support SSL

2020-06-16 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +20101 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20923 ___ Python tracker ___

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: File objects are an example of a square-bracket repr with string parameters in the repr, but no truncation is performed (see https://github.com/python/cpython/blob/master/Modules/_io/textio.c#L2912). Various truncations with the same (lack of?) clarity are

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: Oh ok, I was mislead by the example in your first message, where you did have both the quote and ellipsis. I don't have a strong opinion. - having the quote is a bit more "clean" - but not having it makes clear than the pattern is truncated (per se, three

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Seth Troisi
Seth Troisi added the comment: @matpi The current behavior is for the right quote to not appear I kept this behavior but happy to consider changing that. See the linked patch for examples -- ___ Python tracker

[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-16 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.10 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Seth Troisi
Change by Seth Troisi : -- keywords: +patch pull_requests: +20100 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20922 ___ Python tracker

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: You questioned my knowledge of encodings. Let's quote from one of the most famous introductory articles on the subject

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: The problem can also be played in reverse, maybe it is more telling: ``` # consider the following bytestring pattern >>> p = b"(?P<\xc3\xba>)" # what character does the group name correspond to? # maybe we can try to infer it by decoding the bytestring? #

[issue40979] typing module docs: keep text, add subsections

2020-06-16 Thread ramalho
ramalho added the comment: Sorry, there was an editing mistake above. Where I wrote: - AnyStr: should be listed right after TypeVar, NoReturn, NewType I meant to write: - AnyStr: should be listed right after TypeVar - NoReturn, NewType: both belong with "Special Constructs" as well -

[issue40979] typing module docs: keep text, add subsections

2020-06-16 Thread ramalho
ramalho added the comment: Thanks, I am happy to submit a PR. Before I do, I'd like to discuss the subsection titles, starting from the arrangement in typing.__all__: # Special typing constructs (source comment is: "Super-special typing primitives") Any Callable ClassVar Final ForwardRef

[issue13554] Tkinter doesn't use higher resolution app icon

2020-06-16 Thread E. Paine
E. Paine added the comment: This is a tk issue, as it can be reproduced using 'wish' (tcl 8.6.10): wm title . "APP title" wm iconname . APP image create photo .iconL -file icon256.png image create photo .iconS -file icon48.png wm iconphoto . -default .iconL .iconS Thank you th9 for reporting

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: And there's no need for a cryptic encoding like cp1250 for this problem to arise. Here is a simple example with Python's default encoding utf-8: ``` >>> a = "ú" >>> b = list(re.match(b"(?P<" + a.encode() + b">)", b"").groupdict())[0] >>> a.isidentifier() True

[issue40594] urljoin since 3.5 incorrectly filters out double slashes

2020-06-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: > How did you test them? https://about.google//products/ https://www.google.com///search?q=something Were redirecting, and collapsing multiple slashes to single. Now, when I try this on: > https://en.wikipedia.org/w//index.php?search=foobar+something was

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue40994] Very confusing documenation for abc.Collections

2020-06-16 Thread Sydney Pemberton
New submission from Sydney Pemberton : I was writing a Jupyter notebook at the time, which I think perfectly illustrated the blind alley this documentation bug led me down before beating me up and stealing my lunch money. I have come to this point in the documentation at least half a dozen

[issue1222585] C++ compilation support for distutils

2020-06-16 Thread Christian Heimes
Christian Heimes added the comment: Please report the issue with setuptools. distutils is no longer under development. We recommend that all users use setuptools. -- ___ Python tracker

[issue1222585] C++ compilation support for distutils

2020-06-16 Thread Ryan Schmidt
Ryan Schmidt added the comment: What needs to happen to get this 15 year old bug fixed? It prevents C++ Python modules from being compiled in situations where the user needs to supply CXXFLAGS. -- nosy: +ryandesign ___ Python tracker

[issue22167] iglob() has misleading documentation (does indeed store names internally)

2020-06-16 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds good. FWIW, and totally off-topic, I find it annoying that pathlib's .glob() method supports ** in patterns, but its cousing .match() does not: >>> p = pathlib.Path("Lib/test/support/os_helper.py") >>> p.match("Lib/**/*.py") False >>> --

[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7795ae8f05a5b1134a576a372f64699176cac5fb by Miss Islington (bot) in branch '3.9': bpo-40958: Avoid buffer overflow in the parser when indexing the current line (GH-20875) (GH-20919)

[issue40594] urljoin since 3.5 incorrectly filters out double slashes

2020-06-16 Thread Open Close
Open Close added the comment: To Senthil Kumaran: https://bugs.python.org/issue40594#msg371092 > As far as I know, the browsers remove them, combine them as a single URL. > (Tested on Chrome with some URLs to confirm on June 2020) How did you test them? -- nosy: +op368

[issue40893] tkinter: integrate TkDND support

2020-06-16 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Tkinter title: None -> tkinter: integrate TkDND support type: -> enhancement versions: +Python 3.10 ___ Python tracker ___

[issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization

2020-06-16 Thread Dong-hee Na
Dong-hee Na added the comment: > According to Dong-hee, importing dbm in a subinterpreter leaks references: GH-20920 fixed the leak :) -- ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-16 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset c4862e333ab405dd5789b4061222db1982147de4 by Dong-hee Na in branch 'master': bpo-1635741: Port _gdbm module to multiphase initialization (GH-20920) https://github.com/python/cpython/commit/c4862e333ab405dd5789b4061222db1982147de4 --

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread hai shi
hai shi added the comment: > Coverage jobs are still run with my changes. > https://codecov.io/gh/python/cpython is still updated. Copy that, thanks. -- ___ Python tracker

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: > > this limitation to the latin-1 subset is not compatible with the > > documentation, which says that valid Python identifiers are valid group > > names. > > Not all latin-1 characters are valid identifier, for example: > > >>> '\x94'.encode('latin1')

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: > coverage jobs can tell us how many features need add unit tests. Coverage jobs are still run with my changes. https://codecov.io/gh/python/cpython is still updated. My change only stops running coverage jobs on pull requests. --

[issue40987] Add tests to test_interpreters to import C extension modules converted to PEP 489 multiphase initialization

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: According to Dong-hee, importing dbm in a subinterpreter leaks references: https://github.com/python/cpython/pull/20920#issuecomment-644856401 -- ___ Python tracker

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-16 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +20099 pull_request: https://github.com/python/cpython/pull/20920 ___ Python tracker ___

[issue40893] None

2020-06-16 Thread Nam Tran
Change by Nam Tran : -- components: +Library (Lib) -Tkinter title: tkinter integrate TkDND support -> None type: enhancement -> versions: -Python 3.10 ___ Python tracker ___

[issue37857] Setting logger.level directly has no effect due to caching in 3.7+

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: Vinay: > That code in the wild that sets the level attribute directly is wrong and > should be changed, right? The documentation has always been clear that > setLevel() should be used. If we now take steps to support setting the level > via attribute, isn't

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread hai shi
hai shi added the comment: > Attached PR skips these jobs on pull requests. I am not familiar with travis ci. coverage jobs can tell us how many features need add unit tests. Can we use other CI services to do this job? MAYBE in checks gate or something other services like

[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: Please look at these: >>> orig_name = "Ř" >>> orig_ch = orig_name.encode("cp1250") # Because why not? >>> orig_ch b'\xd8' >>> name = list(re.match(b"(?P<" + orig_ch + b">)", b"").groupdict().keys())[0] >>> name 'Ø' # '\xd8' >>> name

[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20098 pull_request: https://github.com/python/cpython/pull/20919 ___ Python tracker

[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 51c5896b6205911d29ac07f167ec7f3cf1cb600d by Pablo Galindo in branch 'master': bpo-40958: Avoid buffer overflow in the parser when indexing the current line (GH-20875)

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread miss-islington
miss-islington added the comment: New changeset 071bed842eeff9673bc5c4f64e3916a151132d2a by Miss Islington (bot) in branch '3.8': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/071bed842eeff9673bc5c4f64e3916a151132d2a --

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread miss-islington
miss-islington added the comment: New changeset 3cf809475a93228a3cb310b4d10d38f3b9d44c1f by Miss Islington (bot) in branch '3.9': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/3cf809475a93228a3cb310b4d10d38f3b9d44c1f --

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: > this limitation to the latin-1 subset is not compatible with the > documentation, which says that valid Python identifiers are valid group names. Not all latin-1 characters are valid identifier, for example: >>> '\x94'.encode('latin1') b'\x94' >>>

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1 by Victor Stinner in branch 'master': bpo-40989: Make _PyTraceMalloc_NewReference() internal (GH-20915) https://github.com/python/cpython/commit/fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1 --

[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2020-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Lou, when you respond by email, please snip the already posted email you are responding to. The redundant noise makes *your* message harder to read. (Leaving an especially relevant line or two is OK.) E.Paine. Thank you for the confirmation. Learning

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +20097 pull_request: https://github.com/python/cpython/pull/20918 ___ Python tracker ___

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20096 pull_request: https://github.com/python/cpython/pull/20917 ___ Python tracker

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset fc710ee266e9461fdba9933ec6004318db588820 by Victor Stinner in branch 'master': bpo-40993: Don't run Travis CI coverage on PRs (GH-20916) https://github.com/python/cpython/commit/fc710ee266e9461fdba9933ec6004318db588820 --

[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2020-06-16 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40991] Can't open more than on .py file with IDLE

2020-06-16 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: terry.reedy -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40991] Can't open more than on .py file with IDLE

2020-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Almost certainly Catalina - tcl/tk issue. Fix difficult and unknown. Won't make 3.7. In the meanwhile, use IDLE's file=> open menu. See original issue 38946 for more. -- components: +macOS -IDLE nosy: +ned.deily, ronaldoussoren resolution: ->

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: Documentation about skipping jobs on pull requests: https://docs.travis-ci.com/user/pull-requests/#how-pull-requests-are-built I don't think that the following method works for the issue: "To only build on push events not on pull requests, disable Build on

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40237: "Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file". -- ___ Python tracker

[issue40971] Documentation still mentions 'u' string formatting option

2020-06-16 Thread Shubham Upreti
Shubham Upreti added the comment: Should i take this issue? -- nosy: +shubh07 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40237] Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40993: "Don't run Python and C coverage jobs of Travis CI on pull requests". -- ___ Python tracker ___

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: See also "Travis CI doesn't report its status or doesn't run on Python pull requests": https://github.com/python/core-workflow/issues/371 -- ___ Python tracker

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +20095 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20916 ___ Python tracker ___

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: Concrete issue: on my PR 20915, Travis CI mandatory jobs completed successfully but I wasn't able to merge the PR since GitHub says "travis-ci/pr Pending — The Travis CI build is in progress". I cancelled the last running coverage job... but I was still

[issue40993] Don't run Python and C coverage jobs of Travis CI on pull requests

2020-06-16 Thread STINNER Victor
New submission from STINNER Victor : Currently, Travis CI runs C coverage and Python coverage jobs on all pull requests. This is a waste of resources: we should only run these jobs on branches like master. Attached PR skips these jobs on pull requests. Not only it's a waste of resources,

[issue37369] Issue with pip in venv on Powershell in Windows

2020-06-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: I prove my point that the decoding to string is arbitrary: ``` >>> import re >>> orig_name = "Ř" >>> orig_ch = orig_name.encode("cp1250") # Because why not? >>> name = list(re.match(b"(?P<" + orig_ch + b">)", b"").groupdict().keys())[0] >>> name == orig_name

[issue40992] Wrong warning in asyncio debug mode

2020-06-16 Thread Alex Alex
New submission from Alex Alex : I run code in example and get message like: Executing () created at /usr/lib/python3.7/asyncio/futures.py:288> took 2.000 seconds It say that coroutine run for 2 second but it was run for 5 second. Also if I comment part in qwe function after await I won't get

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2020-06-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +20094 pull_request: https://github.com/python/cpython/pull/20915 ___ Python tracker ___

[issue40991] Can't open more than on .py file with IDLE

2020-06-16 Thread Brendan Steffens
New submission from Brendan Steffens : I am using Python 3.7.2, macOS Catalina 10.15.5. When I double click a .py script from the Finder, it opens it, along with IDLE shell. When I click a second .py script so I can view both at once, it won't open the second one. -- assignee:

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: > It seems you don't know some knowledge of encoding yet. I don't have to be ashamed of my knowledge of encoding. Yet you are right that I was missing a subtlety, which is that latin-1 is a strict subset of Unicode rather than a completely arbitrary

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: > In the CPython code base, _Py_NewReference() is used: > * to implement the free list optimization I found a similar code pattern outside CPython code base. Like Nuitka generic macros for free lists:

[issue37369] Issue with pip in venv on Powershell in Windows

2020-06-16 Thread miikama
miikama added the comment: Hi, First time reporting so feel free to direct me to a better place if this is not the correct place :) I am still facing the issue that started this thread with Python 3.8 and 3.9. Steps to reproduces 1. Clean install of Python 3.9.0b3 (quick install via .exe

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: See "Removal of _Py_ForgetReference from public header in 3.9 issue" discussion on capi-sig: https://mail.python.org/archives/list/capi-...@python.org/thread/4EOCN7P4HI56GQ74FY3TMIKDBIPGKL2G/ -- ___ Python tracker

[issue40984] re.compile's repr truncates patterns at 200 characters

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: I welcome any counter-example to the eval()'able property in the stdlib. I do believe in this rule as hard and fast, because it works for small patterns, only bitting you when you grow, probably programmatically (so exactly when you actually could need the

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: It seems you don't know some knowledge of encoding yet. Naturally, `bytes` cannot contain character which Unicode code point is greater than \u00ff. So you can only use "latin1" encoding, which map from character to byte (or reverse) directly. "utf-8", "utf-16"

[issue40680] thread_cputime isn't supported by AIX5

2020-06-16 Thread STINNER Victor
STINNER Victor added the comment: > There is still a lot of AIX 6.1 out there, and iirc, there may be "extended" > support available. This issue is about AIX5 support. I'm fine with providing best effort support for AIX 6.1. If supporting AIX 6 becomes too expensive, we can consider to drop

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: @eric.smith thanks, no problem. If I can give any advice on this present issue, I would suggest to have the ellipsis _inside_ the quote, to make clear that the pattern is being truncated, not the match. So instead of ``` <_sre.SRE_Match object; span=(0,

[issue40984] re.compile's repr truncates patterns at 200 characters

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Re-opening this because issue39949 is about match objects, not compiled re objects. Still, I don't think the repr "rule" about being eval-able is hard and fast. Although changing the repr to be in brackets wouldn't be unreasonable just to drive the point

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Ah, I see. I missed that this issue was only about match objects. I apologize for the confusion. That being the case, I'll re-open the other issue. -- ___ Python tracker

[issue40990] Make http.server support SSL

2020-06-16 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : It's a bit outside of its original scope but with more and more application requiring HTTPS it is sometime needed even when doing some simple tests or local development. It's quite easy to have an SSL certificate, either auto-signed or using Let's Encrypt

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: The issue with the second variant is that utf-8 is an arbitrary (although default) choice. But: re is doing that same arbitrary choice already in decoding the group names into a string, which is my original complaint! --

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: For a bit of background, the other issue is about the repr of compiled patterns, not match objects. Please see my argument there about the conformance to repr's doc - merely adding an ellipsis would _not_ solve this case. I have however nothing against the

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: Sorry, b"(?P<\xce\x94>)" -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: But Δ has no latin-1 representation. So Δ currently cannot be used as a group name in bytes regex, although it is a valid Python identifier. So that's a bug. I mean, if you insist of having group names as strings even for bytes regexes, then it is not

[issue40965] Segfault when importing unittest module via C API

2020-06-16 Thread Christian Heimes
Christian Heimes added the comment: It would be helpful if you could provide a C stacktrace. I use gdb to create a stacktrace. You may have to install additional debug symbols. -- nosy: +christian.heimes ___ Python tracker

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: There was a discussion in issue40984 that the repr must be eval-able. I don't feel very strongly about this, mainly because I don't think anyone ever does eval(repr(some_regex)). I'd be slightly sympathetic to wanting the eval to fail if the repr had to

[issue40984] re.compile's repr truncates patterns at 200 characters

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Any change to the repr should take place on the other issue. I don't feel very strongly that the repr must be eval-able, but in any event it should be raised on issue39949 if you feel strongly about it. I do think it's reasonable to say that if the repr is

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: In this case, you can only use 'latin1', which directly map one character (\u-\u00FF) to/from one byte. If use 'utf-8', it may map one character to multiple bytes, such as 'Δ' -> b'\xce\x94' '\x94' is an invalid identifier, it will raise an error: >>>

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: > So b'\xe9' is mapped to \u00e9, it is `é`. Yes but \xe9 is not strictly valid utf-8, or say not the canonical representation of "é". So there is no way to get \xe9 starting from é without leaving utf-8. So starting with é as group name, I cannot

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: `latin1` is the character set that Unicode code point from \u to \u00ff, and the characters are directly mapped from/to bytes. So b'\xe9' is mapped to \u00e9, it is `é`. Of course, characters with Unicode code point greater than 0xff are impossible to appear in

[issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available

2020-06-16 Thread E. Paine
E. Paine added the comment: I know I'm a bit late, but I believe the site is now being hosted on a Gtihub page: https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html I suspect this is another personal project just for historical reference and will not be updated, however I would

[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2020-06-16 Thread E. Paine
E. Paine added the comment: I tested the demo Python script and also had it stop at 1309. I wrote a small tcl script (a simplified version of the Python demo) to test in wish (see attached) which stopped at 1058. It is strange that tkinter stops later than wish, however I would still

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: Of course an inconvenience in my program is not per se the reason to change the language. I just wanted to motivate that the current situation gives unexpected results. "\xe9" doesn't look like proper utf-8 to me: ``` >>> "é".encode("latin-1") b'\xe9' >>>

[issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler

2020-06-16 Thread Manuel Jacob
Change by Manuel Jacob : -- title: Can’t configure encoding used by urllib.request.url2pathname() -> urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler ___ Python tracker

[issue40980] group names of bytes regexes are strings

2020-06-16 Thread Ma Lin
Ma Lin added the comment: > a non-ascii group name will raise an error in bytes, even if encoded Looks like this is a language limitation: >>> b'é' File "", line 1 SyntaxError: bytes can only contain ASCII literal characters. No problem if you use escaped character: >>>

  1   2   >