[issue47157] bijective invertible map

2022-03-29 Thread Jonathan Balloch
Jonathan Balloch added the comment: thank you!! On Tue, Mar 29, 2022 at 8:44 PM Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > This is indeed a duplicate. If needed just use one of implementations on > PyPI https://pypi.org/project/bidict/ > &

[issue47157] bijective invertible map

2022-03-29 Thread Jonathan Balloch
New submission from Jonathan Balloch : It would be powerful to have a native implementation of a bijective map (e.g. a dictionary that hashed only one-to-one, but as a result either the "key" or the "value" could do lookup in O(1) time with the only overhead being th

[issue46910] Expect IndentationError, get SyntaxError: 'break' outside loop

2022-03-07 Thread Jonathan Fine
Jonathan Fine added the comment: My main concern is that the door not be closed on improving the user experience relating to this behaviour of the compiler. This issue was raised as a bug for the compiler (which is C-coded). I'd be very happy for this issue to be closed as 'not

[issue46910] Expect IndentationError, get SyntaxError: 'break' outside loop

2022-03-04 Thread Jonathan Fine
Jonathan Fine added the comment: Many thanks Pablo for the clear explanation. I'd prefer that the issue remain open, as there's an important user experience issue here. I suspect there are other similar examples of how the compiler error messages could be improved. Here'

[issue46910] Expect IndentationError, get SyntaxError: 'break' outside loop

2022-03-03 Thread Jonathan Fine
New submission from Jonathan Fine : This arises from a request for help made by Nguyễn Ngọc Tiến to the visually impaired programmers lists, see https://www.freelists.org/post/program-l/python,48. Please keep this in mind. Nguyễn asked for help with the syntax error created by === count = 0

[issue46802] Wrong result unpacking binary data with ctypes bitfield.

2022-02-19 Thread Jonathan
Jonathan added the comment: True, have to admit, that I forgot to search first, that really looks like it is the same problem, especially when looking at https://bugs.python.org/msg289212. Would say this one can be closed. -- nosy: +helo9 stage: -> resolved status: open ->

[issue46802] Wrong result unpacking binary data with ctypes bitfield.

2022-02-19 Thread Jonathan
Change by Jonathan : -- nosy: -helo9 ___ Python tracker <https://bugs.python.org/issue46802> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46802] Wrong result unpacking binary data with ctypes bitfield.

2022-02-19 Thread Jonathan
New submission from Jonathan : I have issues unpacking binary data, produced by C++. The appended jupyter notebook shows the problem. It is also uploaded to github gist: https://gist.github.com/helo9/04125ae67b493e505d5dce4b254a2ccc -- components: ctypes files

[issue46667] SequenceMatcher & autojunk - false negative

2022-02-07 Thread Jonathan
Jonathan added the comment: I still don't get how UNIQUESTRING is the longest even with autojunk=True, but that's an implementation detail and I'll trust you that it's working as expected. Given this, I'd suggest the following then: * `Autojunk=False` should be t

[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Jonathan
Jonathan added the comment: Gah. I mean 0.008 in both directions. I'm just going to be quiet now. :-) -- ___ Python tracker <https://bugs.python.org/is

[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Jonathan
Jonathan added the comment: (Like the idiot I am, the example code is wrong. `autojunk` parameter should *not* be set for either of them to get the stated wrong results). In place of "UNIQUESTRING", any unique 3 character string triggers it (QQQ, EEE, ZQU...). And in those cases

[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Jonathan
New submission from Jonathan : The following two strings are identical other than the text "UNIQUESTRING". UNIQUESTRING is at the start of first and at the end of second. Running the below gives the following output: 0.99830220713073 0.99830220713073 0.02376910016977928

[issue46181] Destroying an expaned Combobox prevents Entry focus until Alt+Tab

2022-01-03 Thread Jonathan Lahav
Jonathan Lahav added the comment: Here's a discussion about the issue. I asked about it in comp.lang.tcl: https://groups.google.com/g/comp.lang.tcl/c/C-uQIH-wP5w Someone there explains what's happening. -- ___ Python track

[issue46181] Destroying an expaned Combobox prevents Entry focus until Alt+Tab

2021-12-26 Thread Jonathan Lahav
New submission from Jonathan Lahav : Happens on Windows. Observation: When an expanded Combobox is destroyerd, widgets in the window can't get focus until Alt+Tab forth and back. Buttons can still be clicked, but focus can't be obtained by widgets, entries fro example, not by click

[issue2628] ftplib Persistent data connection

2021-11-01 Thread Jonathan Bell
Jonathan Bell added the comment: I should rephrase: There doesn't seem to be a practical way to verify BLOCK transmission mode against actual servers in the wild. As the Wikipedia article that Giampaolo referenced points out, BLOCK mode is a rarity that was primarily supported on

[issue2628] ftplib Persistent data connection

2021-11-01 Thread Jonathan Bell
Jonathan Bell added the comment: No practical method exists to verify BLOCK transmission mode, which as mentioned earlier, was rarely implemented even when this issue was opened. Given that reality, I'm inclined to close this issue. -- ___ P

[issue2628] ftplib Persistent data connection

2021-10-31 Thread Jonathan Bell
Jonathan Bell added the comment: This issue is 13 years old. The original 2008 patch was used in a production environment against an OpenVMS server identifying itself as MadGoat. That use case involved downloading documents only, and no write permission was available. Therefore the patch

[issue2628] ftplib Persistent data connection

2021-10-30 Thread Jonathan Bell
Change by Jonathan Bell : -- pull_requests: +27604 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29337 ___ Python tracker <https://bugs.python.org/iss

[issue2628] ftplib Persistent data connection

2021-10-30 Thread Jonathan Bell
Jonathan Bell added the comment: The CLA is signed, and I'm again able to work on this. I was able to update this locally for Python 3 with a minimal test case. What specifically were you looking for? -- ___ Python tracker &

[issue45038] Bugs

2021-08-28 Thread Jonathan Isaac
New submission from Jonathan Isaac : Jonathan Isaac Sent with Aqua Mail for Android https://www.mobisystems.com/aqua-mail -- messages: 400479 nosy: bonesisaac1982 priority: normal severity: normal status: open title: Bugs ___ Python tracker <ht

[issue45037] theme-change.py for tkinter lib

2021-08-28 Thread Jonathan Isaac
Jonathan Isaac added the comment: Bugs -- components: +Parser nosy: +lys.nikolaou, pablogsal type: -> crash versions: +Python 3.11, Python 3.6 ___ Python tracker <https://bugs.python.org/issu

[issue45037] theme-change.py for tkinter lib

2021-08-28 Thread Jonathan Isaac
Jonathan Isaac added the comment: Get the code! -- nosy: +bonesisaac1982 ___ Python tracker <https://bugs.python.org/issue45037> ___ ___ Python-bugs-list mailin

[issue44623] help(open('/dev/zero').writelines) gives no help

2021-07-13 Thread Jonathan Fine
Jonathan Fine added the comment: I used my default Python, which is Python 3.6. However, with 3.7 and 3.8 I get the same as Paul. So I'm closing this as 'not a bug' (as there's not an already-fixed option for closing). -- resolution: works for me -> no

[issue44623] help(open('/dev/zero').writelines) gives no help

2021-07-13 Thread Jonathan Fine
New submission from Jonathan Fine : On Linux >>> help(open('/dev/zero').writelines) gives However https://docs.python.org/3/library/io.html#io.IOBase.writelines gives Write a list of lines to the stream. Line separators are not added, so it is usual for each of the lines

[issue34629] Python3 regression for urllib(2).urlopen(...).fp for chunked http responses

2021-07-01 Thread Jonathan Schweder
Jonathan Schweder added the comment: Hello @tkruse, I have made some research and found that when using the Chunked transfer encoding [1], each chunk is preceded by its size in bytes, something that really happen if you check the content of one downloaded file from the example you provided

[issue38193] http.client should be "runnable" like http.server

2021-06-17 Thread Jonathan Schweder
Change by Jonathan Schweder : -- keywords: +patch nosy: +jaswdr nosy_count: 1.0 -> 2.0 pull_requests: +25361 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26775 ___ Python tracker <https://bugs.python.org/i

[issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g)

2021-05-13 Thread Jonathan Schweder
Jonathan Schweder added the comment: Not exactly, in the RFC example they use a/b/c for the path, but when using http:g there is no nested path, so it should be http:///g, no? -- ___ Python tracker <https://bugs.python.org/issue40

[issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g)

2021-05-12 Thread Jonathan Schweder
Jonathan Schweder added the comment: @op368 I don't think that this is a bug, [1] literally uses this exact example and shows the expected behaviour. [1] https://datatracker.ietf.org/doc/html/rfc3986#section-5.4.2 -- nosy: +jaswdr ___ P

[issue43813] Denial of service on http.server module with large request method.

2021-05-12 Thread Jonathan Schweder
Jonathan Schweder added the comment: @demonia you are more than welcome to send a PR, sent it and add a reference to this issue, so it could be reviewed. -- nosy: +jaswdr ___ Python tracker <https://bugs.python.org/issue43

[issue44104] http.cookies.CookieError: Illegal key

2021-05-12 Thread Jonathan Schweder
Jonathan Schweder added the comment: Simple example to reproduce the issue: from http import cookies C = cookies.SimpleCookie() C["ys-api/mpegts/service"] = "blabla" print(C.output()) @ra1nb0w so far as I have found [1][2], the "/" not a valid character for the

[issue44107] HTTPServer can't close http client completely

2021-05-11 Thread Jonathan Schweder
Jonathan Schweder added the comment: @ueJone according to the (RFC)[https://datatracker.ietf.org/doc/html/rfc6455#section-1.4] the FIN/ACK is not normative, in other words is recommended but not required, I've checked the syscalls of the server, see it below: ``` ... 1561 15143 wr

[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-05-04 Thread Jonathan Schweder
Change by Jonathan Schweder : -- keywords: +patch pull_requests: +24563 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25889 ___ Python tracker <https://bugs.python.org/issu

[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-05-04 Thread Jonathan Schweder
Jonathan Schweder added the comment: @jcolo Awesome to hear that you were able to run the example, in fact I got in the same trap, thinking the same that the example should carry the server and client side, I guess we can improve the documentation to avoid it, I'll sent a PR to mak

[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-05-03 Thread Jonathan Schweder
Jonathan Schweder added the comment: I was able to execute the example in Debian 10 + Python 3.10+ Did you execute the server too? You need to create two files, one for the client code and one for the server code, the server as specified by the example should be something like the code

[issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly

2021-05-03 Thread Jonathan Schweder
Jonathan Schweder added the comment: @kormang this is an expected behaviour, this is a problem even for the OS level, just because it is impossible to know when the reader needs to stop waiting, the best option here is to implement some timeout mechanism. -- nosy: +jaswdr

[issue43991] asyncio lock does not get released after task is canceled

2021-05-03 Thread Jonathan Schweder
Jonathan Schweder added the comment: a.niederbuehl tasks are free of context, meaning that the task does not know what was done inside it, and by consequence is impossible to know when or not release a lock. This is by design and normally in these cases you need to be aware of the lock, by

[issue41570] Add DearPyGui to faq/gui.rst

2021-04-05 Thread Jonathan Hoffstadt
Jonathan Hoffstadt added the comment: I hoped someone else could complete it it. Sent from my iPhone > On Apr 4, 2021, at 10:03 AM, Irit Katriel wrote: > >  > New submission from Irit Katriel : > > Jonathan, I see you closed the PR. Did you intend to close

[issue38263] [Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE)

2021-04-05 Thread Jesvi Jonathan
Jesvi Jonathan added the comment: File "c:/Users/jesvi/Documents/GitHub/Jesvi-Bot-Telegram/scripts/main.py", line 144, in thread_test p.start() File "C:\Users\jesvi\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 121, in start self.

[issue43461] Tottime column for cprofile output does not add up

2021-03-10 Thread Jonathan Frawley
New submission from Jonathan Frawley : I am using cprofile and PStats to try and figure out where bottlenecks are in a program. When I sum up all of the times in the "tottime" column, it only comes to 57% of the total runtime. Is this due to rounding of times or some ot

[issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor

2021-02-17 Thread Jonathan Slenders
Jonathan Slenders added the comment: The following patch to inspect.py solves the issue that inspect.signature() returns the wrong signature on classes that inherit from Generic. Not 100% sure though if this implementation is the cleanest way possible. I've been looking into attach

[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread Jonathan Lahav
Jonathan Lahav added the comment: Thank you for checking it so quickly, and answering nicely. I indeed forgot to mention that it happened to me on Windows. Sorry for that. The issue seems similar to the one you linked. I will try and take this to the TCL community since it impacts our

[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread Jonathan Lahav
New submission from Jonathan Lahav : Observation: After creating around 1 widgets (verified with ttk.Label), no more widgets get created, and sometimes graphical artifacts appear outside the application window. No error message or exception is raised. Expected: Either the limit can be

[issue41570] Add DearPyGui to faq/gui.rst

2020-08-17 Thread Jonathan Hoffstadt
Change by Jonathan Hoffstadt : -- keywords: +patch pull_requests: +21026 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21911 ___ Python tracker <https://bugs.python.org/issu

[issue41570] Add DearPyGui to faq/gui.rst

2020-08-17 Thread Jonathan Hoffstadt
Change by Jonathan Hoffstadt : -- assignee: docs@python components: Documentation nosy: docs@python, jhoffstadt priority: normal severity: normal status: open title: Add DearPyGui to faq/gui.rst type: enhancement versions: Python 3.9 ___ Python

[issue40365] argparse: action "extend" with 1 parameter splits strings into characters

2020-06-09 Thread Jonathan Haigh
Jonathan Haigh added the comment: >> But I wonder, was this situation discussed in the original bug/issue? >Doesn't look like it: I was looking at the wrong PR link. This has more discussion: https://github.com/python/cpython/pull/13305. nargs is discussed but I'm not s

[issue40365] argparse: action "extend" with 1 parameter splits strings into characters

2020-06-07 Thread Jonathan Haigh
Jonathan Haigh added the comment: The situation for type=int and unspecified nargs or nargs="?" is also surprising: Python 3.8.3 (default, May 21 2020, 12:19:36) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license&quo

[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-06-06 Thread Jonathan Hsu
Change by Jonathan Hsu : -- nosy: +Jonathan Hsu ___ Python tracker <https://bugs.python.org/issue39243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40438] Python 3.9 eval on list comprehension sometimes returns coroutines

2020-04-29 Thread Jonathan Crall
Jonathan Crall added the comment: This can be closed, but for completeness, the test you ran didn't verify that the bug was fixed. This is because the hard coded compile flags I gave in my example seem to have changed in Python 3.9 (is this documented?). In python3.8 the compile fl

[issue40438] Python 3.9 eval on list comprehension sometimes returns coroutines

2020-04-29 Thread Jonathan Crall
Jonathan Crall added the comment: Ah, sorry. I neglected all the important information. I tested this using: Python 3.9.0a5 (default, Apr 23 2020, 14:11:34) [GCC 8.3.0] Specifically, I ran in a docker container: DOCKER_IMAGE=circleci/python:3.9-rc docker pull $DOCKER_IMAGE docker run

[issue40438] Python 3.9 eval on list comprehension sometimes returns coroutines

2020-04-29 Thread Jonathan Crall
New submission from Jonathan Crall : I first noticed this when testing xdoctest on Python 3.9, and then again when using IPython. I was finally able to generate a minimal working example in Python itself. The following code: python -c "print(eval(compile('[i for i in range(3)]&#x

[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Jonathan Hsu
Jonathan Hsu added the comment: This is caused when tarfile tries to write a symlink that already exists. Any exceptions to os.symlink() as handled as if the platform doesn't support symlinks, so it scans the entire tar to try and find the linked files. When it resumes extraction, it

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-03-24 Thread Jonathan Hsu
Jonathan Hsu added the comment: Thank you for the explanation. -- ___ Python tracker <https://bugs.python.org/issue40025> ___ ___ Python-bugs-list mailin

[issue20899] Nested namespace imports do not work inside zip archives

2020-03-24 Thread Jonathan Hsu
Jonathan Hsu added the comment: It appears this issue has been fixed, as I am unable to reproduce it on Windows 10/Python 3.7: Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credi

[issue36759] astimezone() fails on Windows for pre-epoch times

2020-03-23 Thread Jonathan Hsu
Jonathan Hsu added the comment: This exception is raised because astimezone() ends up calling time.localtime() to determine the appropriate time zone. If the datetime object has a pre-epoch value, it passes a negative timestamp to time.localtime(). On Windows, time.localtime() does not

[issue36759] astimezone() fails on Windows for pre-epoch times

2020-03-23 Thread Jonathan Hsu
Jonathan Hsu added the comment: I'd like to take on this issue if no one else is working on it. -- ___ Python tracker <https://bugs.python.org/is

[issue36759] astimezone() fails on Windows for pre-epoch times

2020-03-23 Thread Jonathan Hsu
Change by Jonathan Hsu : -- nosy: +Jonathan Hsu ___ Python tracker <https://bugs.python.org/issue36759> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38948] os.path.ismount() returns False for current working drive

2020-03-23 Thread Jonathan Hsu
Change by Jonathan Hsu : -- nosy: +Jonathan Hsu ___ Python tracker <https://bugs.python.org/issue38948> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto()

2020-03-21 Thread Jonathan Hsu
Jonathan Hsu added the comment: While the current behavior may be initially unexpected, it does match the way that python normally behaves when defining class variables. For example, the following class will throw an exception because the function number_two() is called before it is defined

[issue40028] Math module method to find prime factors for non-negative int n

2020-03-21 Thread Jonathan Fine
Jonathan Fine added the comment: A pre-computed table of primes might be better. Of course, how long should the table be. There's an infinity of primes. Consider >>> 2**32 4294967296 This number is approximately 4 * (10**9). According to https://en.wikipedia.org/wiki/Prime_

[issue31727] FTP_TLS errors when use certain subcommands

2020-03-12 Thread Jonathan Castro
Jonathan Castro added the comment: I had the same problem but when i was trying to upload the files using FTPS with explicit TLS 1.2 over an AWS Lambda function. Each time that i was trying upload a file, there was an lambda timeout on the storbinary called, and the function ended whit error

[issue22107] tempfile module misinterprets access denied error on Windows

2020-01-07 Thread Jonathan Mills
Change by Jonathan Mills : -- nosy: +Jonathan Mills ___ Python tracker <https://bugs.python.org/issue22107> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22107] tempfile module misinterprets access denied error on Windows

2020-01-07 Thread Jonathan Mills
Change by Jonathan Mills : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue22107> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39194] asyncio.open_connection returns a closed client when server fails to authenticate client certificate

2020-01-02 Thread Jonathan Martin
New submission from Jonathan Martin : I'm trying to use SSL to validate clients connecting a an asyncio socket server by specifying CERT_REQUIRED and giving a `cafile` containing the client certificate to allow. client and server code attached. Certificates are generated with: openss

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2019-12-10 Thread Jonathan Slenders
Jonathan Slenders added the comment: Even simpler, the following code will crash after so many iterations: ``` import asyncio loop = asyncio.get_event_loop() while True: loop.call_soon_threadsafe(loop.stop) loop.run_forever() ``` Adding a little sleep of 0.01s after `run_forever

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2019-12-10 Thread Jonathan Slenders
Jonathan Slenders added the comment: It looks like the following code will reproduce the issue: ``` import asyncio import threading loop = asyncio.get_event_loop() while True: def test(): loop.call_soon_threadsafe(loop.stop) threading.Thread(target=test).start

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2019-12-10 Thread Jonathan Slenders
Jonathan Slenders added the comment: Thanks Victor for the reply. It looks like it's the self-socket in the BaseProactorEventLoop that gets closed. It's exactly this FD for which the exception is raised. We don't close the event loop anywhere. I also don't see `_clo

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2019-12-09 Thread Jonathan Slenders
Jonathan Slenders added the comment: Suppressing `ConnectionResetError` in `BaseProactorEventLoop._loop_self_reading`, like we do with `CancelledError` seems to fix it. Although I'm not sure what it causing the error, and whether we need to handle it so

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2019-12-09 Thread Jonathan Slenders
New submission from Jonathan Slenders : We have a snippet of code that runs perfectly fine using the `SelectorEventLoop`, but crashes *sometimes* using the `ProactorEventLoop`. The traceback is the following. The exception cannot be caught within the asyncio application itself (e.g., it is

[issue38791] readline history file is hard-coded

2019-11-13 Thread Jonathan Conder
Jonathan Conder added the comment: I agree. Did a cursory search before posting but missed it somehow -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38791] readline history file is hard-coded

2019-11-13 Thread Jonathan Conder
Change by Jonathan Conder : -- keywords: +patch pull_requests: +16658 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17149 ___ Python tracker <https://bugs.python.org/issu

[issue38791] readline history file is hard-coded

2019-11-13 Thread Jonathan Conder
New submission from Jonathan Conder : Other tools such as bash and less allow their history file to be customised with an environment variable. Will add a patch for this in a bit. This could also be customised using PYTHONSTARTUP, but then the user has to duplicate a bunch of code which is

[issue38771] Bug in example of collections.ChainMap

2019-11-11 Thread Jonathan Scholbach
Change by Jonathan Scholbach : -- keywords: +patch pull_requests: +16614 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17108 ___ Python tracker <https://bugs.python.org/issu

[issue38771] Bug in example of collections.ChainMap

2019-11-11 Thread Jonathan Scholbach
New submission from Jonathan Scholbach : Below "Examples and Recipes", the Documentation of collections.ChainMap has an "Example of letting user specified command-line arguments take precedence over environment variables which in turn take precedence over default values

[issue38189] pip does not run in virtual environment in 3.8

2019-09-16 Thread Jonathan Gossage
New submission from Jonathan Gossage : Python 3.8 was installed from source on Ubuntu 19.04 desktop and a virtual environment was created with python3.8 -m venv venvrh. When attempting to use pip to install a package, the following error was encountered: (venvrh) jgossage@jgossage-XPS-8700

[issue38123] Unable to find Python3.8.0b4 on Ubuntu 19004 desktop

2019-09-12 Thread Jonathan Gossage
Jonathan Gossage added the comment: I now do not think that it is a Python problem. It only appears when Ubuntu 18.04 is upgraded to 19.04 by the upgrade process. The problem does not show up on a fresh install of Ubuntu 19.04 followed by a source install of Python 3.8.0b4 only if the install

[issue38123] Unable to find Python3.8.0b4 on Ubuntu 19004 desktop

2019-09-11 Thread Jonathan Gossage
New submission from Jonathan Gossage : I installed Python 3.8.0b4 manually on Ubuntu 19.04 desktop. After the installation that appeared to run OK, I was unable to find python3.8, even though it had been installed in /usr/local/bin and that directory was on the path. I got the result

[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Jonathan
Jonathan added the comment: >What fallacy? You appeared to be saying (to paraphrase) "no-one else has ever reported this, so it's never been a problem". That's a fallacy. > I was responding to "does anyone else have opinions on this?" I was asking if an

[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Jonathan
Jonathan added the comment: > I'm not sure your tone is particularly constructive here. Apologies, my bad. > Which code are you looking at? The documentation code: `class logging.StreamHandler(stream=None)`. Sorry, I don't know what you'd call that. I'm not re

[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Jonathan
Jonathan added the comment: > The devil is in the detail. If stream=sys.stderr is specified, that takes > effect at import time. If stream=None is specified and the implementation > chooses to treat that as sys.stderr, that takes effect at the time of the > call. The two are no

[issue37563] Documentation - default for StreamHandler

2019-07-11 Thread Jonathan
Change by Jonathan : -- status: -> open ___ Python tracker <https://bugs.python.org/issue37563> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37563] Documentation - default for StreamHandler

2019-07-11 Thread Jonathan
New submission from Jonathan : https://docs.python.org/2/library/logging.handlers.html https://docs.python.org/3/library/logging.handlers.html Both say: """class logging.StreamHandler(stream=None) Returns a new instance of the StreamHandler class. If stream is specified, the

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Jonathan
Jonathan added the comment: > Learning is not a waste of time. You're entitled to your opinion, but this is > not a bug in logging. We'll have to agree to disagree. I agree and value learning a great deal. However learning should happen on your own time, NOT when a program

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Jonathan
Jonathan added the comment: > I have no idea what you mean by this. I don't see how I can be clearer. What are the reasons for NOT implementing logging to file be unicode as a default? Logging to screen is unicode as a default. What are the reasons for not wanting consistency? &g

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-05-31 Thread Jonathan
Jonathan added the comment: > Did you look at the basicConfig documentation before raising this issue? This seems like an attempt at victim blaming. But yes, I did. In fact, this is now the third time I've looked at that page - once before raising this issue, once before my previo

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-05-31 Thread Jonathan
Jonathan added the comment: Thank you for your comments but this wasn't a question and I maintain this is a bug, or at least undesirable behaviour. I'd consider it a bug in my own software. Reasoning: * It's an inconsistent default with the logging to screen. This causes m

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-05-31 Thread Jonathan
Jonathan added the comment: It definitely claims to be "utf-8" in NotePad++. I've attached it if you want to double-check. (Windows 7) -- Added file: https://bugs.python.org/file48380/my_log.log ___ Python tracker <https

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-05-31 Thread Jonathan
New submission from Jonathan : Python is inconsistent in how it handles errors that have some unicode characters. It works to screen but fails to log This works: ``` >>> import logging >>> logging.error('จุด1') ERROR:root:จุด1 ``` The following bre

[issue36520] Email header folded incorrectly

2019-04-03 Thread Jonathan Horn
New submission from Jonathan Horn : I encountered a problem with replacing the 'Subject' header of an email. After serializing it again, the utf8 encoding was wrong. It seems to be occurring when folding the internal header objects. Example: >> email.policy.default.fold

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2019-03-11 Thread Jonathan Fine
Jonathan Fine added the comment: This is was closed and tagged as resolved in 2012. The status has not been changed since then. Using dict(a=1, ...) provides a workaround, but only when the keys are valid as variable names. The general workaround is something like helper([ (1

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2019-03-06 Thread Jonathan Fine
Jonathan Fine added the comment: I mention this issue, and related pages, in [Python-ideas] dict literal allows duplicate keys https://mail.python.org/pipermail/python-ideas/2019-March/055717.html It arises from a discussion of PEP 584 -- Add + and - operators to the built-in dict class

[issue26910] dictionary literal should not allow duplicate keys

2019-03-06 Thread Jonathan Fine
Jonathan Fine added the comment: I mention this issue, and related pages, in [Python-ideas] dict literal allows duplicate keys https://mail.python.org/pipermail/python-ideas/2019-March/055717.html It arises from a discussion of PEP 584 -- Add + and - operators to the built-in dict class

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Jonathan
Jonathan added the comment: The "ProcessPoolExecutor Example" on this page breaks for me: https://docs.python.org/3/library/concurrent.futures.html -- ___ Python tracker <https://bugs.python.o

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Jonathan
Jonathan added the comment: There's also this error too: Traceback (most recent call last): File "c:\_libs\Python37\lib\multiprocessing\process.py", line 297, in _bootstrap self.run() File "c:\_libs\Python37\lib\multiprocessing\process.py", line 99, in r

[issue36120] Regression - Concurrent Futures

2019-02-26 Thread Jonathan
New submission from Jonathan : I'm using Concurrent Futures to run some work in parallel (futures.ProcessPoolExecutor) on windows 7 x64. The code works fine in 3.6.3, and 3.5.x before that. I've just upgraded to 3.7.2 and it's giving me these errors: Process SpawnProcess-6:

[issue35857] Stacktrace shows lines from updated file on disk, not code actually running

2019-01-30 Thread Jonathan Fine
Jonathan Fine added the comment: For information - all taken from docs and Lib/*.py https://docs.python.org/3.7/library/traceback.html traceback -- Print or retrieve a stack traceback Source code: Lib/traceback.py === This module provides a standard interface to extract, format and print stack

[issue35857] Stacktrace shows lines from updated file on disk, not code actually running

2019-01-30 Thread Jonathan Fine
Jonathan Fine added the comment: The problem, as I understand it, is a mismatch between the code object being executed and the file on disk referred to by the code object. When a module is reloaded it is first recompiled, if the .py file is newer than the .pyc file. (I've tested this

[issue35698] [statistics] Division by 2 in statistics.median

2019-01-14 Thread Jonathan Fine
Jonathan Fine added the comment: I'm still thinking about this. I find Steve's closing of the issue premature, but I'm not going to reverse it. -- ___ Python tracker <https://bugs.pyt

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Jonathan Fine
Jonathan Fine added the comment: It might be better in my sample code to write isinstance(p, int) instead of type(p) == int This would fix Rémi's example. (I wanted to avoid thinking about (False // True).) For median([1, 1]), I am not claiming that 1.0 is wrong and 1 is right

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Jonathan Fine
Jonathan Fine added the comment: Here's the essence of a patch. Suppose the input is Python integers, and the output is a mathematical integer. In this case we can make the output a Python integer by using the helper function >>> def wibble(p, q): ... if type(p) == type(q

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Jonathan Fine
Jonathan Fine added the comment: I read PEP 450 as saying that statistics.py can be used by "any secondary school student". This is not true for most Python libraries. In this context, the difference between a float and an int is important. Consider statistics.median([2]

  1   2   3   4   >