[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17093 pull_request: https://github.com/python/cpython/pull/17623 ___ Python tracker ___

[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-15 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17092 pull_request: https://github.com/python/cpython/pull/17622 ___ Python tracker ___

[issue38904] "signal only works in main thread" in main thread

2019-12-15 Thread Richard Warfield
Richard Warfield added the comment: Thanks for looking into this. Changing the behavior of the "threading" module to be consistent with the runtime and "signal" module would be sufficient, at least for my particular case. If the "if threading.current_thread() is threading.main_thread()"

[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters
Tim Peters added the comment: Sorry, but I'm not replying here any more: the issue tracker is not for asking questions or brainstorming ideas. Take this to python-ideas, please. If a concrete proposal that gains traction results, _then_ the issue tracker may be an appropriate place (but

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, I had an epiphany. NaN returns False for every comparison. So in teory any element of the iterable should result minor that NaN. So NaN should treated as the highest element, and should be at the end of the sorted result! Indeed this is the

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +17091 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17621 ___ Python tracker

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread Abhilash Raj
Abhilash Raj added the comment: Thanks for the pointer, David! I created a PR for the fix, would you be able to review it please? -- ___ Python tracker ___

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread Abhilash Raj
Change by Abhilash Raj : -- pull_requests: +17090 pull_request: https://github.com/python/cpython/pull/17620 ___ Python tracker ___

[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters
Tim Peters added the comment: Ah, so you're proposing a hack that would catch some, but not all, cases where a total ordering doesn't exist. Why? The issue tracker isn't a suitable place to discuss it regardless, so if you want to pursue it I'd suggest taking it to python-ideas. If you

[issue23041] csv needs more quoting rules

2019-12-15 Thread Yoong Hor Meng
Yoong Hor Meng added the comment: There is a real requirement for csv to handle an empty field vs a empty string . csv.QUOTE_NOTNULL could be useful. -- nosy: +yoonghm versions: +Python 3.8 -Python 3.6 ___ Python tracker

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread R. David Murray
R. David Murray added the comment: The example you want to look at is get_unstructured. That shows both lookback and modification of the parse tree to handle the whitespace between encoded words. -- ___ Python tracker

[issue39033] zipimport raises NameError: name '_boostrap_external' is not defined

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 79f02fee1a542c440fd906fd54154c73fc0f8235 by Nick Coghlan (Xtreak) in branch 'master': bpo-39033: Fix NameError in zipimport during hash validation (GH-17588) https://github.com/python/cpython/commit/79f02fee1a542c440fd906fd54154c73fc0f8235

[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread Abhilash Raj
Abhilash Raj added the comment: I tried to take a look at the code to see where the fix needs to be and I probably need some help. I looked at the parse tree for the header and it looks something like this: ContentDisposition([Token([ValueTerminal('attachment')]), ValueTerminal(';'),

[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2019-12-15 Thread Martin Panter
Martin Panter added the comment: Another workaround might be to set the new "block_on_close" flag (Issue 33540) to False on the server subclass or instance. Victor: Replying to "What do I think of also using a weakref?", I assume you mean

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: > No idea what "are minor that another object" could possibly mean. Oh my god... a < b? > I don't know what purpose would be served by checking ">=" too Well, it's very simple. Since the sorting algorithm checks if a < b, if this check fails, I propose to

[issue39058] argparse should preserve argument ordering in Namespace

2019-12-15 Thread Raymond Hettinger
New submission from Raymond Hettinger : Currently, Namespace() objects sort the attributes in the __repr__. This is annoying because argument order matters and because everywhere else in the module we preserve order (i.e. users see help in the order that arguments are added). Note, the

[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset d587272fe3b0fcad2f23a490e76f9f82ca7d64ef by Victor Stinner (Batuhan Taşkaya) in branch 'master': bpo-38316: Fix co_stacksize documentation (GH-16983) https://github.com/python/cpython/commit/d587272fe3b0fcad2f23a490e76f9f82ca7d64ef --

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset cb8b946ac10386e6cab1376945f64f683b5b16d3 by Victor Stinner (Batuhan Taşkaya) in branch 'master': bpo-38629: implement __floor__ and __ceil__ for float type (GH-16985)

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-12-15 Thread STINNER Victor
STINNER Victor added the comment: Thanks Batuhan Taşkaya for the implementation, and thanks Ran Benita for the feature request :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python

[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters
Tim Peters added the comment: Marco, your > I suppose the sorting function checks if the objects of > the iterable are minor that another object was incoherent to me. No idea what "are minor that another object" could possibly mean. As Mark explained, the mathematical meaning of

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Anyway, Java by default puts NaNs at the end of the iterable: https://onlinegdb.com/SJjuiXE0S -- ___ Python tracker ___

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: I probably unintentionally deleted some necessary files here on my machine. I closed the issue and marked 'not a bug'. Thanks -- ___ Python tracker

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Change by Rafael Dominiquini : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: I reinstall python here from scratch and now is working. But I need to delete the remaining files after the uninstall. When I tried to uninstall and reinstall holding the existing directories (\Lib\site-packages), the installer fail to copy the missing

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, but have you, Dickinson and Peters, read how I propose to check if the object is orderable or not? I explained it in a very detailed way, and this does not change the float comparison. And does not need to check first if the iterable it totally

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: 1) I tried to clear the value of the variable 'PYTHONPATH', and the error keeps happening! 2) In my installation directory, I don't have the file 'C:\Developing\Python\python38.zip', neither the directory 'C:\Developing\Python\python-3.8.0.amd64\'. I

[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters
Tim Peters added the comment: Closing as Mark suggested, but as "not a bug" rather than "won't fix". That floats aren't totally ordered is a consequence of IEEE 754 semantics, not Python's whim. As Mark said, if people want a total_ordering function for floats, that should be opened as a

[issue39057] Issues with urllib.request.proxy_bypass_environment

2019-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17089 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17619 ___ Python tracker

[issue39057] Issues with urllib.request.proxy_bypass_environment

2019-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are several issues with urllib.request.proxy_bypass_environment: 1. Leading dots are ignored in the proxy list, but not in the checked hostname. So ".localhost" does not matches ".localhost" in the proxy list. 2. A single trailing \n in the

[issue36095] Better NaN sorting.

2019-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: Tim, Raymond: I propose that we close this issue as "won't fix". The suggestion to add `math.total_ordering` could be broken out into a separate issue. -- ___ Python tracker

[issue36095] Better NaN sorting.

2019-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: > IMHO sorting functions should emit a warning if they contains an unorderable > objects How do you define "unorderable", and how do you propose to detect "unorderable objects" efficiently in practice within the sorting algorithm? What you propose isn't

[issue39056] Issues with handling the -W option

2019-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17618 ___ Python tracker

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: Excuse me, a little errata: > After the current object a is checked against the object b, if > `all_orderables` is true [...] must be change to > After the current object a is checked against the object b, ***if the check > returns false and*** if

[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla
Marco Sulla added the comment: I'm in favor of a `math.total_ordering` function, but IMHO sorting functions should emit a warning if they contains an unorderable objects. This can be done easily: I suppose the sorting function checks if the objects of the iterable are minor that another

[issue39056] Issues with handling the -W option

2019-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are some issues with handling the -W option: 1. A traceback is printed for some invalid category names. $ ./python -Wignore::0 'import warnings' failed; traceback: Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/warnings.py",

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2019-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17087 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17616 ___ Python tracker

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2019-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : If validate=True is passed to base64.b64decode(), it should raise a binascii.Error if the input contains any character not from the acceptable alphabet. But it does not raise if the input ends with a single \n. It raises if the input ends with a

[issue36595] IDLE: Add search to textview.ViewWindow

2019-12-15 Thread Zackery Spytz
Zackery Spytz added the comment: I have created a pull request for this issue. -- nosy: +ZackerySpytz ___ Python tracker ___ ___

[issue36595] IDLE: Add search to textview.ViewWindow

2019-12-15 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +17086 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17614 ___ Python tracker

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for your patience Michael! I made some cosmetic changes to the error handling logic that you may want to include in the PyPA patches. (I'd intended to make it so that a malformed build date resulted in the "Unknown" "9898" build date being used, rather

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 39afa2d3147e4b05a1161cc90dbf09b95072c2bb by Nick Coghlan (Michael Felt) in branch 'master': bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303) https://github.com/python/cpython/commit/39afa2d3147e4b05a1161cc90dbf09b95072c2bb

[issue39051] Python not working on Windows 10

2019-12-15 Thread Paul Moore
Paul Moore added the comment: Can you also confirm that the installation of Python was done with the standard Python installer from the python.org website, and is not another distribution (such as Anaconda)? -- ___ Python tracker

[issue39051] Python not working on Windows 10

2019-12-15 Thread Paul Moore
Paul Moore added the comment: > sys.path = [ >'C:\\Developing\\Python\\python38.zip', >'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\', >'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\lib-tk', >'C:\\Developing\\Python\\python-3.8.0.amd64\\DLLs\\', >

[issue34215] streams.py:IncompleteReadError is message is unclear when expected is None

2019-12-15 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +asvetlov, yselivanov stage: -> patch review versions: +Python 3.9 -Python 3.5 ___ Python tracker ___

[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Géry
Géry added the comment: Thanks @ncoghlan, it perfectly answered my question on Stack Overflow: https://stackoverflow.com/questions/59322585/what-is-the-exact-try-statement-equivalent-of-the-with-statement-in-python -- ___ Python tracker

[issue36589] Incorrect error handling in curses.update_lines_cols()

2019-12-15 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39051] Python not working on Windows 10

2019-12-15 Thread Eryk Sun
Eryk Sun added the comment: > * PYTHONPATH = 'C:\Developing\Python;C:\Developing\Python\Scripts; > C:\Developing\Python\Lib;C:\Developing\Python\Lib\site-packages; > C:\Developing\Python\DLLs;' FYI, none of this should set here. For a standard configuration, the installation directory should

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: In this folder ("C: \ Developing \ Python \ Lib") there are only the folders I have listed. No other files... -- ___ Python tracker ___

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: I don't tried clean install! I tried to use the option "Repair" from the installer. Later I will try to completely uninstall and install from scratch. -- ___ Python tracker

[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki
Inada Naoki added the comment: Many files and directories in the "C:\Developing\Python\Lib" are disappeared. I don't know why. But since you tried clean install, I suppose your antivirus killed Python. -- ___ Python tracker

[issue34000] Document when compile returns a code object v. AST

2019-12-15 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you for the bug report and thank you @BTaskaya for finding the other issue. I'm closing this as a duplicate of #27119. -- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> `compile`

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: There are other Python installations on my computer, embedded in other application installations (GIMP, etc ...), and these seem to be working normally. But they are all older versions of Python... I haven't tried reinstalling again since I didn't want

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: "C:\Developing\Python" is where I installed Python, selecting it in the installer. This directory is where the binary 'python.exe' is located! "C:\Developing\Python\Lib" have the folders: idlelib site-packages test tkinter turtledemo When I unset both

[issue38720] Logging failure with timestamp messages

2019-12-15 Thread Cheryl Sabella
Cheryl Sabella added the comment: I'm going to close this pending additional information from the OP. @xtobes, please reopen if you are able to provide a minimally reproducing example. Thank you! -- nosy: +cheryl.sabella resolution: -> works for me stage: -> test needed status:

[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: There's a reason multiprocessing in spawn mode jumps through the hoops that it does: it's the only way to get __main__ pickling to work when you're not forking the entire process. You also don't want to naively re-run __main__ in the subprocess for the same

[issue39054] Add an parameter to list.remove()

2019-12-15 Thread SilentGhost
SilentGhost added the comment: Again, please start proposal discussion at python-ideas. Also, it is not sufficient just to post there, you need to engage with the people asking question to justify whatever new feature you're advocating. -- components: +Interpreter Core nosy:

[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: Leaving the relationship between pickle and __name__ alone wasn't an oversight, as folks already rely on that to gracefully transition from single-file modules to multi-file packages without breaking pickle compatibility in either direction. The trick is to

[issue39054] Add an parameter to list.remove()

2019-12-15 Thread Lovi
New submission from Lovi <1668151...@qq.com>: I think the list can add a parameter to remove(): remove(value, appear_time=1, /) The parameter appear_time indicates the number of times the value appears in the list. I want this effect: >>> list1 = [1, 2, 3, 2, 1, 2, 1] >>> list1.remove(2,

[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan
Change by Batuhan : -- pull_requests: +17085 pull_request: https://github.com/python/cpython/pull/17613 ___ Python tracker ___ ___

[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: It's a matter of historical timing: PEP 343 was written before try/except/finally was allowed, when try/finally and try/except were still distinct statements. However, PEP 341 was *also* accepted and implemented for Python 2.5, allowing for the modern

[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki
Inada Naoki added the comment: Where did you install the portion? What is in the C:\Developing\Python and C:\Developing\Python\Lib? What happen when you unset both environment variables? Do you use any antivirus software? -- ___ Python tracker

[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini
Rafael Dominiquini added the comment: * PYTHONHOME = (not set) * PYTHONPATH = 'C:\Developing\Python;C:\Developing\Python\Scripts;C:\Developing\Python\Lib;C:\Developing\Python\Lib\site-packages;C:\Developing\Python\DLLs;' -- I try to set the variable 'PYTHONHOME=C:\Developing\Python', but the

[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Géry
Géry added the comment: @gvanrossum By the way, is there any particular reason why the ``try`` statement implementation equivalent to the ``with`` statement given in PEP 343 puts the finally clause in an outer ``try`` statement instead of in the inner ``try`` statement? (cf.

[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan
Change by Batuhan : -- pull_requests: +17084 pull_request: https://github.com/python/cpython/pull/17612 ___ Python tracker ___ ___

[issue39053] Hide manually raised exception formatting

2019-12-15 Thread SilentGhost
SilentGhost added the comment: This sounds like it needs at least some discussion on python-ideas. For example, just reading your description I can't imagine what is supposed to happen when an error occurs when producing argument to the exception. -- nosy: +SilentGhost resolution:

[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki
Inada Naoki added the comment: The most common cause of this error is the PYTHONPATH and PYTHONHOME environment variables. You can see what environment variables are set by the "set" command. -- nosy: +inada.naoki ___ Python tracker

[issue39053] Hide manually raised exception formatting

2019-12-15 Thread YoSTEALTH
New submission from YoSTEALTH : class Some_Class: def error(self): if not getattr(self, 'boo', None): raise Exception(f'`class {self.__class__.__name__}:` raised some error!') something = Some_Class() something.error() # This is how Error looks #