[issue45544] Close 2to3 issues and list them here
Change by Aldwin Pollefeyt : -- pull_requests: +27388 pull_request: https://github.com/python/cpython/pull/15249 ___ Python tracker <https://bugs.python.org/issue45544> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45544] Close 2to3 issues and list them here
Change by Aldwin Pollefeyt : -- pull_requests: +27386 pull_request: https://github.com/python/cpython/pull/14835 ___ Python tracker <https://bugs.python.org/issue45544> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45544] Close 2to3 issues and list them here
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin nosy_count: 2.0 -> 3.0 pull_requests: +27382 pull_request: https://github.com/python/cpython/pull/15268 ___ Python tracker <https://bugs.python.org/issue45544> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5664] 2to3 wont convert Cookie.Cookie properly
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue5664> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5664] 2to3 wont convert Cookie.Cookie properly
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14990 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15268 ___ Python tracker <https://bugs.python.org/issue5664> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12611] 2to3 crashes when converting doctest using reduce()
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue12611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12611] 2to3 crashes when converting doctest using reduce()
Change by Aldwin Pollefeyt : -- pull_requests: +14970 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15249 ___ Python tracker <https://bugs.python.org/issue12611> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37714] 2to3 tab Problems
Aldwin Pollefeyt added the comment: There is a reindent.py tool to help you in this case. After running the 2to3 on the FrisPy, I tried the reindent tool, and the example worked fine afterwards. $ wget https://raw.githubusercontent.com/python/cpython/master/Tools/scripts/reindent.py $ python3 reindent.py -r . $ python3 example.py -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37714> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37655] Set subset operator docs
Aldwin Pollefeyt added the comment: For 'set < other' it says sub-set ... for 'set > other' is says super-set. Subset vs superset. So I think it's correct in the documentation. -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37655> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31689] random.choices does not work with negative weights
Aldwin Pollefeyt added the comment: issue37624: not adding an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit. -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue31689> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37624] random.choices has unexpected behavior with negative weights
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14644 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14854 ___ Python tracker <https://bugs.python.org/issue37624> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37624] random.choices has unexpected behavior with negative weights
Aldwin Pollefeyt added the comment: This is what happens with your weights: >>> list(itertools.accumulate(weights)) [1, 2, 1, 2, 3, 3, 4] using bisect.bisect certain amount of times, will distribute on this: a<1 <https://bugs.python.org/issue37624> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE
Aldwin Pollefeyt added the comment: just guessing ... in 2.7 unix.rst has '\ No newline at end of file' it's your enhancement/call, but indeed no need to put energy in 2.7 doc anymore. case closed -- ___ Python tracker <https://bugs.python.org/issue37610> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37610> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE
Change by Aldwin Pollefeyt : -- pull_requests: +14641 pull_request: https://github.com/python/cpython/pull/14850 ___ Python tracker <https://bugs.python.org/issue37610> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14640 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14849 ___ Python tracker <https://bugs.python.org/issue37610> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters
Aldwin Pollefeyt added the comment: * there were many small issues with the patch, improved as good as possible the FixString to catch ```import as```, ```from string import *``` and ```import string``` * did not include the FixStringImports as it's not a necessity to work in Python3 * indeed, some uses of the constant names that are user-defined will also rename, only when it's in a ```import string```. Added a ```Caution``` in the documentation. Still, when all are changed, it should not affect the Python3 version, will just work with the renamed variable name. -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue13272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters
Change by Aldwin Pollefeyt : -- pull_requests: +14626 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14835 ___ Python tracker <https://bugs.python.org/issue13272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path.
Aldwin Pollefeyt added the comment: FYI, PEP597 is created to avoid these issues (i think), target Python 3.9. https://www.python.org/dev/peps/pep-0597/ https://discuss.python.org/t/use-utf-8-as-default-text-file-encoding/1785 -- ___ Python tracker <https://bugs.python.org/issue37570> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path.
Aldwin Pollefeyt added the comment: All 'The byte compiling test seems succeeded.' when i tested your script on ubuntu 18.04 on latest 3.7.4rc2+, 3.8.0b1+ and 3.9.0a0. What are the exact python versions and the OS version you see the issue? -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37570> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37566] Remove redudant code in socket.py
Aldwin Pollefeyt added the comment: seems it is/was used in socket._socketobject in 2.7 -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37566> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37545] Argparse Tutorial - unreasonable operators
Aldwin Pollefeyt added the comment: @Zachary, you are right ... the last one should be >= 1. Now i see the difference with the previous examples. It changed the output drastically from "the square of {} equals {}" vs "{}^2 == {}" to suddenly printing the filename at -vv. I was focused more on the structural change to always print answer. ... I will adjust. -- ___ Python tracker <https://bugs.python.org/issue37545> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37545] Argparse Tutorial - unreasonable operators
Aldwin Pollefeyt added the comment: The >= is unnecessary in this exact example, as is correctly noted by Nathan. I understand using >= for future purposes, after you explained, what is also correct but confusing because you specifically describe why you change the >= 2, but it doesn't make sense for >= 1 then. For the last example, I might be completely wrong (please don't shoot me), IMHO it can be == 1 also? It is not 'explicitly showing how to emit additional messages at higher verbosity levels', but to 'uses verbosity level to display more text'. So, removing the 'else' statement to always print(answer), no matter which verbosity is shown. To avoid confusion, I recommend the change and please have another look at the last statement that makes no difference in using == or >=. -- ___ Python tracker <https://bugs.python.org/issue37545> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37545] Argparse Tutorial - unreasonable operators
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37545> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37545] Argparse Tutorial - unreasonable operators
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14697 ___ Python tracker <https://bugs.python.org/issue37545> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128)
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14496 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14696 ___ Python tracker <https://bugs.python.org/issue37532> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128)
Aldwin Pollefeyt added the comment: Changing everything to utf-8 breaks a lot of tests, so here a less invasive solution? diff --git a/Lib/email/header.py b/Lib/email/header.py index 4ab0032bc6..1e71eeae7f 100644 --- a/Lib/email/header.py +++ b/Lib/email/header.py @@ -136,7 +136,14 @@ def decode_header(header): last_word = last_charset = None for word, charset in decoded_words: if isinstance(word, str): -word = bytes(word, 'raw-unicode-escape') +word_tmp = bytes(word, 'raw-unicode-escape') +input_charset = charset or 'us-ascii' +try: +_ = word_tmp.decode(input_charset, errors='strict') +word = word_tmp +except UnicodeDecodeError: +word = str(word).encode('utf-8') +charset = 'utf-8' if last_word is None: last_word = word last_charset = charset -- ___ Python tracker <https://bugs.python.org/issue37532> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128)
Aldwin Pollefeyt added the comment: Maybe a solution, if no charset defined, then encode it as utf-8 in decode_header, because it's Python3's default encoding? diff --git a/Lib/email/header.py b/Lib/email/header.py index 4ab0032bc6..8dbfe58a57 100644 --- a/Lib/email/header.py +++ b/Lib/email/header.py @@ -135,7 +135,10 @@ def decode_header(header): collapsed = [] last_word = last_charset = None for word, charset in decoded_words: -if isinstance(word, str): +if not charset and isinstance(word, str): +word = word.encode('utf-8') +charset = 'utf-8' +elif isinstance(word, str): word = bytes(word, 'raw-unicode-escape') if last_word is None: last_word = word Python 3.9.0a0 (heads/master:110a47c4f4, Jul 10 2019, 11:32:53) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import email.header >>> header = "Your booking at Voyager Int'l >>> Hostel,=?UTF-8?B?IFBhbmFtw6EgQ2l0eQ==?=, Panamá- Casco Antiguo" >>> print(email.header.make_header(email.header.decode_header(header))) Your booking at Voyager Int'l Hostel, Panamá City, Panamá- Casco Antiguo >>> -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37532> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?
Aldwin Pollefeyt added the comment: FWIW: this is probably since PR14099 -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37495] socket.inet_aton parsing issue on some libc versions
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 <https://bugs.python.org/issue37495> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37495] socket.inet_aton parsing issue on some libc versions
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 metacharacters, can safely be passed to child processes. If the shell is invoked explicitly, via shell=True, it is the application’s responsibility to ensure that all whitespace and metacharacters are quoted appropriately to avoid shell injection vulnerabilities. When using shell=True, the shlex.quote() function can be used to properly escape whitespace and shell metacharacters in strings that are going to be used to construct shell commands. -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37495> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37490] poor documentation for .startswith, .endswith
Aldwin Pollefeyt added the comment: correction: ... otherwise, text.startswith(prefix, start, end) gives the same result as text[start:end].startswith(prefix). -- ___ Python tracker <https://bugs.python.org/issue37490> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37490] poor documentation for .startswith, .endswith
Aldwin Pollefeyt added the comment: Modified from re module Pattern.search: The optional second parameter 'start' gives an index in the string where the search is to start; it defaults to 0. The optional parameter 'end' limits how far the string will be searched; it will be as if the string is 'end' characters long, so only the characters from 'start' to 'end' - 1 will be searched for a match. If 'end' is less than 'start', no match will be found; otherwise, text.startswith(prefix, start, end) gives the same result as text[start:end](prefix). I don't think this is true like with re: This is not completely equivalent to slicing the string; the '^' pattern character matches at the real beginning of the string and at positions just after a newline, but not necessarily at the index where the search is to start. -- ___ Python tracker <https://bugs.python.org/issue37490> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37490] poor documentation for .startswith, .endswith
Aldwin Pollefeyt added the comment: * text.startswith(prefix, start, end) seems the same as text[start:end].startswith(prefix) * text[start:end] with end>len(text) seems no issue, so also not an issue for startswith * text[8:12] in ('day', 'month', 'year') is not the same at all, rather: For x in ('day', 'month', 'year'): if text[8:12].startswith(x): return True Else: return False Maybe indeed could add to the documentation that 'text.startswith(prefix, start, end)' is the same as 'text[start:end].startswith(prefix)'? Although seemed obvious for me. -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37490> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37459] importlib docs improperly reference get_resource_loader()
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +14386 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14568 ___ Python tracker <https://bugs.python.org/issue37459> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum
Aldwin Pollefeyt added the comment: Integers seems to be accepted, so not a TypeError? Maybe documentation needs some more information. Documentation os.path under os.path.exists(path): Changed in version 3.3: path can now be an integer: True is returned if it is an open file descriptor, False otherwise. in posixmodule.c: * path_converter also optionally accepts signed * integers (representing open file descriptors) instead * of path strings. although i dunno how to use then: $ echo "test" > 123 $ ls -i 123 8012691 123 $ ./python -c "import os.path; print(os.path.isfile(8012691))" False $ ./python -c "import os.path; print(os.path.isfile('123'))" True -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37436> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.
Aldwin Pollefeyt added the comment: Understood. Thank you for the extra info. I'll read up on all the suggestions. -- ___ Python tracker <https://bugs.python.org/issue37416> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread.
Aldwin Pollefeyt added the comment: The second import actually doesn't happen. You need to reload it. This can be tested by putting print('loading threading') in threading.py. Your first method-thread will still think it's main thread. So no idea if this is a bug or wrong use. 'import threading' should be one of the first lines in your main code/thread? import _thread import time import importlib barrier = 0 def method(): import threading # Will make threading the wrong thread. global barrier print(threading.main_thread()) print(threading.current_thread()) barrier = 1 _thread.start_new_thread(method, ()) while barrier != 1: time.sleep(.1) import threading importlib.reload(threading) print(threading.main_thread()) print(threading.current_thread()) -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37416> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37327] python re bug
Aldwin Pollefeyt added the comment: neither the banner contains "
[issue37327] python re bug
Aldwin Pollefeyt added the comment: When I run the regex on https://regex101.com/, after some small adjustments ("HTTP\/1\.0" and "\/head"), it mentions 'Catastrophic backtracking has been detected and the execution of your expression has been halted.' I don't know much about regex, but it seems there is some eternal loop or something. I'd suggest to try to make the regex work first on other regex compiler, before calling it a python bug. -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37327> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24255] Replace debuglevel-related logic with logging
Aldwin Pollefeyt added the comment: PR waiting review, Stage should be 'patch review' -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue24255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25567] shlex.quote doesn't work on bytestrings
Aldwin Pollefeyt added the comment: Python 3.9.0a0 [GCC 7.3.0] on linux >>> import re >>> find_unsafe_bytes = re.compile(b'[^\w@%+=:,./-]').search :1: SyntaxWarning: invalid escape sequence \w when removing \w, all the tests pass (my regex knowledge is close to None.) "\w stands for "word character". It always matches the ASCII characters [A-Za-z0-9_]" replace \w with A-Za-z0-9_ ?? (all the tests pass) -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue25567> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37273] from pickle import rick
Aldwin Pollefeyt added the comment: It is Pickle Rick from Rick and Morty. https://en.wikipedia.org/wiki/Pickle_Rick No need to be in python libraries. But you can make your own library on github with this kind of art. :) -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37273> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames
Aldwin Pollefeyt added the comment: Can there be a review of the PR to let me know if all changes are correct? -- ___ Python tracker <https://bugs.python.org/issue37030> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix
Aldwin Pollefeyt added the comment: Can use: import logging l = logging.Logger("") h = logging.StreamHandler() f = logging.Formatter(fmt="[{filename}:{lineno}] {msg}", style="{") h.setFormatter(f) l.addHandler(h) l.info("Hello") Output: >py .\t.py [t.py:8] Hello -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix
Aldwin Pollefeyt added the comment: Ok, didn't know about discuss.python.org. Searching on all PR and bpo's there was no reference to your hack. Will investigate this discuss.python.org. Ai ai ai, more info to read. -- ___ Python tracker <https://bugs.python.org/issue37147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +13684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13799 ___ Python tracker <https://bugs.python.org/issue37147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix
New submission from Aldwin Pollefeyt : >From this idea [0] by Karthikeyan Singaravelan and added to his code in hack >[1]. name = "karthikeyan" print(f"{name =[}") print(f"{name=[}") print(f"{age = [}") print(f"{age= [}") [prog.py:2] name ='karthikeyan' [prog.py:3] name='karthikeyan' [prog.py:4] name = 'karthikeyan' [prog.py:5] name= 'karthikeyan' [0] https://tirkarthi.github.io/programming/2019/05/08/f-string-debugging.html [1] https://github.com/tirkarthi/cpython/commit/d0fcbe67f6bb8ad60744b0a4973c4dc69fda65a9 -- messages: 344533 nosy: aldwinaldwin, xtreak priority: normal severity: normal status: open title: f-string debugging f"{x=[}" adds [filename:lineno] as prefix type: enhancement versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue37147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames
Aldwin Pollefeyt added the comment: How to add a label 'awaiting core review' to pull request? tirkarthi: "Left comment for doc and test. But in general would like to hear from a core dev on this." -- ___ Python tracker <https://bugs.python.org/issue37030> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s)
Aldwin Pollefeyt added the comment: The EOF mentioned in msg309788 is the first reason why I searched in the library code for a solution. Then saw it as an opportunity to create hidden functions in the shell. So I created issue37030 [0] and PR13536 [1]. Later got notified about this thread. [0] https://bugs.python.org/issue37030#msg343873 [1] https://github.com/python/cpython/pull/13536 -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue13214> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames
Aldwin Pollefeyt added the comment: The EOF mentioned in [0] is indeed the same and was the first reason why I searched in the library code for a solution. Then saw it as an opportunity to create hidden functions in the shell. [0] https://bugs.python.org/issue13214#msg309788 -- ___ Python tracker <https://bugs.python.org/issue37030> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +13450 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue37030> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames
New submission from Aldwin Pollefeyt : A flag, defaulting to false. If true, :meth:`do_help` and :meth:`completenames` won't include undocumented commands (that is, there are do_*() methods without corresponding help_*() methods). -- components: Library (Lib) messages: 343346 nosy: aldwinaldwin priority: normal severity: normal status: open title: Lib/cmd.py: Hide undocumented commands in help and completenames type: enhancement versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue37030> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com