[issue47185] code.replace(co_code=new_code) no longer catch exceptions on Python 3.11

2022-04-03 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +dom1310df ___ Python tracker <https://bugs.python.org/issue47185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47154] -arch detection in _osx_support generates false positives

2022-03-29 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +dom1310df ___ Python tracker <https://bugs.python.org/issue47154> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47152] Reorganize the re module sources

2022-03-29 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: Could the sre_parse and sre_constants modules be kept with public names (i.e. without the leading underscore) but within the re namespace? I use them to tokenize and then syntax highlight regular expressions. I did a quick search and found a few other

[issue40059] Provide a toml module in the standard library

2022-03-09 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +domdfcoding nosy_count: 18.0 -> 19.0 pull_requests: +29889 pull_request: https://github.com/python/cpython/pull/31784 ___ Python tracker <https://bugs.python.org/issu

[issue40059] Provide a toml module in the standard library

2022-03-09 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: When building Python from source (as of the latest GitHub commit) the tomllib directory doesn't actually get copied over to the install prefix. It looks like an entry's needed in Makefile.pre.in under LIBSUBDIRS, along the lines of https://github.com

[issue46736] Generate HTML 5 with SimpleHTTPRequestHandler.list_directory

2022-02-13 Thread Dominic Davis-Foster
New submission from Dominic Davis-Foster : Currently SimpleHTTPRequestHandler.list_directory (which is used with `python3 -m http.server` amongst other things) generates HTML with the doctype: http://www.w3.org/TR/html4/strict.dtd;> i.e. HTML 4.01. I propose making the generated p

[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-23 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +dom1310df ___ Python tracker <https://bugs.python.org/issue45391> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-23 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +domdfcoding ___ Python tracker <https://bugs.python.org/issue43838> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39846] Register .whl as a unpack format in shutil unpack

2021-06-30 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: I have run into this myself and was surprised unpack_archive didn't support wheels. I would like to see support added, and don't mind doing the work myself. That said, I can see there being an issue with the number of supported zip-based formats

[issue44353] PEP 604 NewType

2021-06-10 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: It is possible to implement NewType to return a class rather than a function as it does currently. However, the class version uses substantially more memory (1072 bytes vs 144 bytes with sys.getsizeof) and NewType is supposed to have almost no runtime

[issue44297] Frame with -1 line number

2021-06-06 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: Is this a re-regression of https://bugs.python.org/issue43933? -- nosy: +domdfcoding ___ Python tracker <https://bugs.python.org/issue44

[issue44277] cpython forks are spammed with dependabot PRs

2021-06-02 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: There's an open issue on GitHub, but it hasn't gone anywhere. https://github.com/dependabot/dependabot-core/issues/2804 -- nosy: +domdfcoding ___ Python tracker <https://bugs.python.org/issue44

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-28 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +domdfcoding ___ Python tracker <https://bugs.python.org/issue44246> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44084] Can't mark match, case, _ as keywords in docs

2021-05-09 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: I'm not sure this is a Pygments or Sphinx bug. The documentation for the :keyword: role[1] says: This creates a link to a reference label with that name, if it exists. Looking at the documentation source for "Compound statements"[2] ea

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2021-04-12 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: I have backported this to typing_extensions in https://github.com/python/typing/pull/778 On Python 3.9.2 and above typing.TypedDict is used, otherwise it's typing_extensions.TypedDict. -- nosy: +domdfcoding

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: ISO 8-1:2009 recommends groups of three digits either side of the decimal sign. -- nosy: +domdfcoding ___ Python tracker <https://bugs.python.org/issue43

[issue42855] pathlib.exists on Windows raises an exception on URL like/bad input

2021-01-07 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: Paul's example with the embedded null no longer works on Python 3.8 as Path.exists returns False on ValueError (added in gh-7695) Path.exists already ignores some Windows-specific errors, so I don't see why it shouldn't also ignore invalid paths which

[issue41907] Regression in IntFlag behaviour in f-string

2020-10-02 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: I believe the regression is due to GH-14545 which "fixed" bpo-37479. The news entry states: "When `Enum.__str__` is overridden in a derived class, the override will be used by `Enum.__format__` regardless of whether mixin clas

[issue41824] Docs for typing.ForwardRef don't state that is was added in 3.7

2020-09-21 Thread Dominic Davis-Foster
New submission from Dominic Davis-Foster : typing.ForwardRef was first documented in GH-14216 but there's no mention that the class was only added in Python 3.7. In Python 3.6 there's no typing.ForwardRef; there is a typing._ForwardRef which seems to be the same thing from before it was made

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-08-05 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: To me your examples seem like a misuse of functools.wraps. IIUC its purpose is to make a wrapper that accepts solely *args and **kwargs appear to be the wrapped function; it doesn't seem to be intended to be used when the wrapper takes arguments