[issue45544] Close 2to3 issues and list them here

2021-10-20 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- pull_requests: +27388 pull_request: https://github.com/python/cpython/pull/15249 ___ Python tracker <https://bugs.python.org/issue45

[issue45544] Close 2to3 issues and list them here

2021-10-20 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- pull_requests: +27386 pull_request: https://github.com/python/cpython/pull/14835 ___ Python tracker <https://bugs.python.org/issue45

[issue45544] Close 2to3 issues and list them here

2021-10-20 Thread Aldwin Pollefeyt
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/issu

[issue5664] 2to3 wont convert Cookie.Cookie properly

2019-08-14 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue5664> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5664] 2to3 wont convert Cookie.Cookie properly

2019-08-14 Thread Aldwin Pollefeyt
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/iss

[issue12611] 2to3 crashes when converting doctest using reduce()

2019-08-13 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue12611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12611] 2to3 crashes when converting doctest using reduce()

2019-08-13 Thread Aldwin Pollefeyt
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/issu

[issue37714] 2to3 tab Problems

2019-07-29 Thread Aldwin Pollefeyt
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

[issue37655] Set subset operator docs

2019-07-22 Thread Aldwin Pollefeyt
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 tr

[issue31689] random.choices does not work with negative weights

2019-07-18 Thread Aldwin Pollefeyt
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

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-18 Thread Aldwin Pollefeyt
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/issu

[issue37624] random.choices has unexpected behavior with negative weights

2019-07-18 Thread Aldwin Pollefeyt
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

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
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

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37610> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- pull_requests: +14641 pull_request: https://github.com/python/cpython/pull/14850 ___ Python tracker <https://bugs.python.org/issue37

[issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE

2019-07-18 Thread Aldwin Pollefeyt
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/issu

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2019-07-18 Thread Aldwin Pollefeyt
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 Py

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2019-07-18 Thread Aldwin Pollefeyt
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/issu

[issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path.

2019-07-12 Thread Aldwin Pollefeyt
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

[issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path.

2019-07-11 Thread Aldwin Pollefeyt
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: +al

[issue37566] Remove redudant code in socket.py

2019-07-11 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: seems it is/was used in socket._socketobject in 2.7 -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37

[issue37545] Argparse Tutorial - unreasonable operators

2019-07-11 Thread Aldwin Pollefeyt
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

[issue37545] Argparse Tutorial - unreasonable operators

2019-07-10 Thread Aldwin Pollefeyt
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 doe

[issue37545] Argparse Tutorial - unreasonable operators

2019-07-10 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37545> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37545] Argparse Tutorial - unreasonable operators

2019-07-10 Thread Aldwin Pollefeyt
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/issu

[issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128)

2019-07-10 Thread Aldwin Pollefeyt
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/issu

[issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128)

2019-07-10 Thread Aldwin Pollefeyt
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

[issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128)

2019-07-09 Thread Aldwin Pollefeyt
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

[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-04 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: FWIW: this is probably since PR14099 -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.org/issue37500> ___ ___

[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 -- ___ P

[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

[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 <https://bugs.python.org/issue37

[issue37490] poor documentation for .startswith, .endswith

2019-07-03 Thread Aldwin Pollefeyt
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 searche

[issue37490] poor documentation for .startswith, .endswith

2019-07-03 Thread Aldwin Pollefeyt
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'

[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-02 Thread Aldwin Pollefeyt
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/issu

[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-06-27 Thread Aldwin Pollefeyt
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

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

2019-06-27 Thread Aldwin Pollefeyt
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/is

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

2019-06-27 Thread Aldwin Pollefeyt
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 o

[issue37327] python re bug

2019-06-18 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: neither the banner contains "

[issue37327] python re bug

2019-06-18 Thread Aldwin Pollefeyt
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&#x

[issue24255] Replace debuglevel-related logic with logging

2019-06-17 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: PR waiting review, Stage should be 'patch review' -- nosy: +aldwinaldwin ___ Python tracker <https://bugs.python.o

[issue25567] shlex.quote doesn't work on bytestrings

2019-06-14 Thread Aldwin Pollefeyt
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

[issue37273] from pickle import rick

2019-06-13 Thread Aldwin Pollefeyt
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

[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames

2019-06-07 Thread Aldwin Pollefeyt
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/issue37

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
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 .

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
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 track

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
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/issu

[issue37147] f-string debugging f"{x=[}" adds [filename:lineno] as prefix

2019-06-04 Thread Aldwin Pollefeyt
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

[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames

2019-06-02 Thread Aldwin Pollefeyt
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 <

[issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s)

2019-05-29 Thread Aldwin Pollefeyt
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

[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames

2019-05-29 Thread Aldwin Pollefeyt
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

[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames

2019-05-24 Thread Aldwin Pollefeyt
Change by Aldwin Pollefeyt : -- keywords: +patch pull_requests: +13450 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue37030> ___ _

[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames

2019-05-24 Thread Aldwin Pollefeyt
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