[issue43511] Tk 8.6.11 slow on M1 Mac Mini MacOS Python 3.9.2 native ARM version

2021-03-16 Thread Thomas Wamm
New submission from Thomas Wamm : Comparing performance of a Tkinter graphics program with Python 3.9.2 on an M1 Mac Mini, I find it to be slower than earlier versions, and much slower than the same program running on other computers such as a Raspberry Pi 3B (Python 3.7.3). Initial

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 651fc30af7ac6138764106b87632cabca56a98bb by Serhiy Storchaka in branch '3.9': bpo-43499: Silence compiler warnings about using legacy C API on Windows (GH-24873)

[issue36213] subprocess.check_output() fails with OSError: [WinError 87] when current directory name is too long

2021-03-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread Christian Heimes
Christian Heimes added the comment: Pablo, in cc12888f9b4b69247f342fe1304984c3eb3d9647 you have regenerated configure with autoconf 2.71. The version is brand new and was released just 6 weeks ago. All my Linux machines have autoconf 2.69 from 2012 (!). Apparently 2.70 had some issues.

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Would you mind if I regenerate configure with 2.69 and we stick with stable > version for a little bit longer? Please, go ahead. I need to remember then to use a docker container or something like that for the release then. What's the problem that

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-16 Thread Mark Shannon
Mark Shannon added the comment: No. We should add it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43507] Variables in locals scope fails to be printed.

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: I think this is essentially a duplicate of #24800. (Short version, the behaviour is by design, and documented, but there may be scope for clarifying or improving the documentation.) -- nosy: +mark.dickinson ___

[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9

2021-03-16 Thread OndrejPtak
OndrejPtak added the comment: Reproducer: * create ServerProxy with UPI containing query part, e.g. http://example.com?foo=bar * communicate Old behavior: - send: b'POST /?foo=bar HTTP/1.1\r\nHost: example.com\r\nAccept-Encoding: gzip\r\nContent-Type: text/xml\r\nUser-Agent:

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread STINNER Victor
STINNER Victor added the comment: Should the rpath be set on OpenSSL, on the Python ssl module, or on the Python executable? > no (default): don't set an rpath If most users get it wrong, why not using "auto: auto-detect rpath from OPENSSL_LDFLAGS (--with-openssl or pkg-config)" by

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread STINNER Victor
STINNER Victor added the comment: > The default settings for --with-openssl-rpath=no (--without-openssl-rpath) is > backwards compatible with previous Python versions. The default behavor stays > the same. Ok. That makes sense. -- ___ Python

[issue35118] Add peek() or first() method in queue

2021-03-16 Thread Alexey Volkov
Alexey Volkov added the comment: >Why not just dismiss older queue entries during a normal get() operation? Or >just use a plain deque with access guarded by a lock. You do not know whether the item needs to be removed until you see it. And to see it you need to get it. And if you get it,

[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-16 Thread Christian Heimes
Christian Heimes added the comment: It's a compromise. The default settings for --with-openssl-rpath=no (--without-openssl-rpath) is backwards compatible with previous Python versions. The default behavor stays the same. I don't want to set an rpath *unless* the user specifies that they

[issue43497] SyntaxWarning for "assertion is always true, perhaps remove parentheses?" does not work with constants

2021-03-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset a8ef4572a6b28bcfc0b10b34fa4204954b9dd761 by tsukasa-au in branch 'master': bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. (GH-24867) https://github.com/python/cpython/commit/a8ef4572a6b28bcfc0b10b34fa4204954b9dd761

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-16 Thread Paul
New submission from Paul : The section "Subtyping relationships with other types" of PEP 544 states: "A concrete type X is a subtype of protocol P if and only if X implements all protocol members of P with compatible types. In other words, subtyping with respect to a protocol is always

[issue43511] Tk 8.6.11 slow on M1 Mac Mini MacOS Python 3.9.2 native ARM version

2021-03-16 Thread E. Paine
Change by E. Paine : -- components: +macOS nosy: +epaine, ned.deily, ronaldoussoren versions: +Python 3.10 ___ Python tracker ___

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-16 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23654 pull_request: https://github.com/python/cpython/pull/24892 ___ Python tracker ___

[issue43080] pprint for dataclass instances

2021-03-16 Thread Lewis Gaul
Lewis Gaul added the comment: > FWIW, we've not had a feature request for this ever, nor has there been a > request for pprint to support attrs, nor any other hand-rolled class that > implements methods similar to those generated by dataclasses. I wouldn't expect core Python to support a

[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9

2021-03-16 Thread Tomas Orsava
Change by Tomas Orsava : -- components: +XML ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9

2021-03-16 Thread Tomas Orsava
Change by Tomas Orsava : -- nosy: +eli.bendersky, scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43284] Inability to fetch build 20H2

2021-03-16 Thread Steve Dower
Steve Dower added the comment: Nothing has changed in platform, and all current releases return the same version number for me (which matches the original report). As I said, we need to find a versioned DLL that _always_ rebuilds to extract the version number from, because that's the most

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-16 Thread Ned Batchelder
Ned Batchelder added the comment: Is there a reason PEP 626 isn't yet mentioned in https://docs.python.org/3.10/whatsnew/3.10.html ? -- ___ Python tracker ___

[issue43511] Tk 8.6.11 slow on M1 Mac Mini MacOS Python 3.9.2 native ARM version

2021-03-16 Thread Thomas Wamm
Thomas Wamm added the comment: An easy demo of the performance problem is to compare the execution speed of the single command: >>> help('modules') in a python3 shell in a terminal window (it's real fast), vs. inside the IDLE3 shell (it's terribly slow). I understand that IDLE3 uses the

[issue43507] Variables in locals scope fails to be printed.

2021-03-16 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> exec docs should note that the no argument form in a local scope is really the two argument form ___ Python tracker

[issue32596] Lazy import concurrent.futures.process and thread

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think this was a good idea. Making some imports implicitly lazy introduces unpredictability in stdlib imports. Here is an example bug report: https://issues.apache.org/jira/browse/ARROW-11983 -- nosy: +pitrou

[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin

2021-03-16 Thread Christian Heimes
Christian Heimes added the comment: Could you please post the error message and either post a minimal example or give us a link to your code? -- nosy: +christian.heimes ___ Python tracker

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Under Include/, including subdirectories, there are 88 macros that reuse arguments. -- Added file: https://bugs.python.org/file49876/macros-that-reuse-args.txt ___ Python tracker

[issue18232] running a suite with no tests is not an error

2021-03-16 Thread Michał Górny
Change by Michał Górny : -- keywords: +patch pull_requests: +23655 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24893 ___ Python tracker ___

[issue43513] venv: recreate symlinks on --upgrade

2021-03-16 Thread ThiefMaster
New submission from ThiefMaster : When using `python -m venv --upgrade someenv`, it rewrites `pyvenv.cfg` with the current python version but leaves the python symlinks untouched (https://github.com/python/cpython/blob/a8ef4572a6b28bcfc0b10b34fa4204954b9dd761/Lib/venv/__init__.py#L248) This

[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin

2021-03-16 Thread Frank Ueberschar
New submission from Frank Ueberschar : Related to this issue https://bugs.python.org/issue34651, our Bareos libcloud plugin cannot be run with Python > 3.7. We are using subprocesses in a C-subinterpreter environment. Is there a way to circumvent rewriting our code completely? --

[issue41730] Show deprecation warnings for tkinter.tix

2021-03-16 Thread wyz23x2
wyz23x2 added the comment: Um, is this going on? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : Removed file: https://bugs.python.org/file49876/macros-that-reuse-args.txt ___ Python tracker ___ ___

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : Added file: https://bugs.python.org/file49877/macros-that-reuse-args.txt ___ Python tracker ___ ___

[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is a reproducer script: https://gist.github.com/pitrou/a73fa2cfce2557e0dd435353b9976972 With Python 3.6 it works fine. -- components: Library (Lib) messages: 388844 nosy: methane, pitrou priority: normal severity: normal stage: needs patch

[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +23658 pull_request: https://github.com/python/cpython/pull/20508 ___ Python tracker ___

[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : This seems to be caused by a logic error in the patch for issue35943. It has been causing multiple issues for multi-threaded and multi-process systems written in Python: * issue41567 * issue43515 * https://github.com/dask/distributed/issues/4168

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread Ammar Askar
Ammar Askar added the comment: Sure thing, I'll work on the backport. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43503] [subinterpreters] PyObject statics exposed in the limited API break isolation.

2021-03-16 Thread Eric Snow
Eric Snow added the comment: One simple solution is to explicitly state that the limited API does not support subinterpreters. This is already implied by the fact that the multi-phase init API (PEP 489) requires subinterpreter support but is not part of the limited API. If we establish

[issue41654] Segfault when raising MemoryError

2021-03-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23656 pull_request: https://github.com/python/cpython/pull/24894 ___ Python tracker

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 2.0 -> 3.0 pull_requests: +23659 pull_request: https://github.com/python/cpython/pull/22387 ___ Python tracker ___

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-16 Thread Ken Jin
Ken Jin added the comment: Apologies if I misunderstood something, but doesn't PEP 544 also state in its "Rationale", "Non-goals" subsection that """ At runtime, protocol classes will be simple ABCs. There is no intent to provide sophisticated runtime instance and class checks against

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix false positives in circular import detection with from-imports ___ Python tracker

[issue43518] textwrap.shorten does not always respect word boundaries

2021-03-16 Thread annesylvie
Change by annesylvie : -- components: Library (Lib) nosy: annesylvie priority: normal severity: normal status: open title: textwrap.shorten does not always respect word boundaries type: behavior versions: Python 3.8 ___ Python tracker

[issue43503] [subinterpreters] PyObject statics exposed in the limited API break isolation.

2021-03-16 Thread Eric Snow
Eric Snow added the comment: FYI, I posted to capi-sig about this: https://mail.python.org/archives/list/capi-...@python.org/thread/INLCGPMTYFLRTWQL7RB4MUQZ37JAFRAU/ -- ___ Python tracker

[issue18232] running a suite with no tests is not an error

2021-03-16 Thread Michał Górny
Change by Michał Górny : -- versions: +Python 3.10 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Bisecting actually points to issue35943. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +ammar2 nosy_count: 1.0 -> 2.0 pull_requests: +23657 pull_request: https://github.com/python/cpython/pull/20628 ___ Python tracker ___

[issue43516] python on raspberry pi

2021-03-16 Thread Yann Enoti
New submission from Yann Enoti : Any idea why this doesnt work ? import socket HOST = "192.168.2.114" PORT = 8000 #initiate port no above 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print('Socket created') #try: s.bind((HOST, PORT)) #bind host address and port together#

[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- assignee: pitrou components: Library (Lib) nosy: pitrou priority: deferred blocker severity: normal stage: needs patch status: open title: Fix false positives in circular import detection with from-imports type: behavior versions: Python 3.10, Python 3.9

[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +23660 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24895 ___ Python tracker

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ammar Askar, do you mind to backport PR 20628 to 3.9? It is the only warning left, and it seems there is a potential bug. -- ___ Python tracker

[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, nanjekyejoannah, ncoghlan, serhiy.storchaka ___ Python tracker ___

[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Fix false positives in circular import detection with from-imports ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Created a new issue + fix in issue43517. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue43499] Compiler warnings in building Python 3.9 on Windows

2021-03-16 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +23661 pull_request: https://github.com/python/cpython/pull/24896 ___ Python tracker ___

[issue43284] Inability to fetch build 20H2

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: Note that the following recommendation for getting the system version was removed in late 2019 [1][2]: To obtain the full version number for the operating system, call the GetFileVersionInfo function on one of the system DLLs, such as Kernel32.dll,

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Seems worth noting that Unicode fractions like ⅔ produce a FRACTION SLASH character when normalized: >>> unicodedata.normalize('NFKC', '⅔') '2⁄3' >>> list(map(unicodedata.name, unicodedata.normalize('NFKC', '⅔'))) ['DIGIT TWO', 'FRACTION SLASH', 'DIGIT

[issue43521] Allow `ast.unparse` to handle NaNs and empty sets

2021-03-16 Thread Kodiologist
Change by Kodiologist : -- keywords: +patch pull_requests: +23662 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24897 ___ Python tracker ___

[issue43521] Allow `ast.unparse` to handle NaNs and empty sets

2021-03-16 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Quentin Pradet
New submission from Quentin Pradet : urllib3 is preparing a v2 with various SSL improvements, such as leaning on the ssl module to match hostnames when possible and reject certificates without a SAN. See https://urllib3.readthedocs.io/en/latest/v2-roadmap.html#modern-security-by-default for

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Quentin Pradet
Change by Quentin Pradet : Added file: https://bugs.python.org/file49880/app.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Quentin Pradet
Change by Quentin Pradet : Added file: https://bugs.python.org/file49882/server.pem ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Quentin Pradet
Change by Quentin Pradet : Added file: https://bugs.python.org/file49881/client.pem ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin

2021-03-16 Thread Frank Ueberschar
Frank Ueberschar added the comment: Initialization of the Python interpreter in C-code is here: https://github.com/bareos/bareos/blob/fb76608092ba204ce43cd7c262619e01f9d6a2d6/core/src/plugins/filed/python/python-fd.cc#L189 The actual Python code that starts the child processes is here:

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Related: #6632 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43503] [subinterpreters] PyObject statics exposed in the limited API break isolation.

2021-03-16 Thread Petr Viktorin
Petr Viktorin added the comment: There seems to be much confusion here. Maybe on my side? PEP 489 is *very much* part of the limited API. -- nosy: +petr.viktorin ___ Python tracker

[issue43521] Allow `ast.unparse` to handle NaNs and empty sets

2021-03-16 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: The reason that we weren't support these cases was there were simply no way achieve them by parsing code so we simply ignored (empty sets etc). Though considering that you have a decent use case in hy, I'd agree that these small additions are viable.

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Quentin Pradet
Change by Quentin Pradet : Added file: https://bugs.python.org/file49883/server.key ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin

2021-03-16 Thread Frank Ueberschar
Frank Ueberschar added the comment: Here is part of the gdb backtrace: [franku@franku py3plug-fd-libcloud]$ sbin/bareos_fd-py3plug-fd-libcloud -f -c etc/bareos Fatal Python error: _PyInterpreterState_DeleteExceptMain: not main interpreter Python runtime state: initialized Current

[issue43502] [C-API] Convert obvious unsafe macros to static inline functions

2021-03-16 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: PyUnicode_WRITE, PyUnicode_READ, and PyUnicode_READ_CHAR all reuse their arguments, and there's a lot of occurrences (58 AFAICS) where they are called with the increment operator applied to the index argument. For example: Objects/unicodeobject.c:

[issue43521] Allow `ast.unparse` to handle NaNs and empty sets

2021-03-16 Thread Kodiologist
New submission from Kodiologist : `ast.unparse` throws an error on an empty set, and it produces `nan` for NaN, which isn't a legal Python literal. PR to follow shortly. -- messages: 388872 nosy: Kodiologist priority: normal severity: normal status: open title: Allow `ast.unparse` to

[issue43477] from x import * behavior inconsistent between module types.

2021-03-16 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the clarification! I think I understand what's going on now, and the logic is actually expected. When you do `from .test_submodule import *`, Python must first import `test_pkg.test_submodule` in order to get you the object for the `import *` part

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note the conjunction of this change + issue32596 produces import fragility: https://bugs.python.org/issue43515 -- ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, going through other open issues including on third-party projects, I think these changes should unfortunately be reverted. The regressions produced are far from trivial and most developers seem at a loss how to fix them. --

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: After analysis, it may not need reversal. There is a simple logic error it seems. Will check. -- ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker

[issue43481] PyEval_EvalCode() namespace issue not observed in Python 2.7.

2021-03-16 Thread Chris Morton
Chris Morton added the comment: Root cause appears to be indexing c with [] operator. Replacing len(c) with 4 produces the same error. -- ___ Python tracker ___

[issue43516] python on raspberry pi

2021-03-16 Thread Eric V. Smith
Eric V. Smith added the comment: You’ve not told us the behavior you see or the behavior you expect, so we can’t tell if this is a bug in python. But it’s in all likelihood not a bug. If you want to get help with your code, I suggest asking on the python-list mailing list or maybe

[issue43518] textwrap.shorten does not always respect word boundaries

2021-03-16 Thread annesylvie
New submission from annesylvie : The `shorten` function from the `textwrap` module does not always break strings at the correct location. `shorten("hello world!", width=7, placeholder="")` returns `'hello'` as expected, but `shorten("hello world!!", width=7, placeholder="")` returns

[issue15533] subprocess.Popen(cwd) documentation: Posix vs Windows

2021-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: For our subprocess docs, Eryk's text: """ For POSIX, ``executable`` should be stated as a "relative path without a slash in it" or a "relative path without a directory in it". An unqualified filename is a relative path that won't be resolved against

[issue43511] tkinter with Tk 8.6.11 is slow on macOS

2021-03-16 Thread Ned Deily
Ned Deily added the comment: Thanks for submitting a very interesting issue! tkinter/Tk performance is not something we normally pay a lot of attention to. I did not attempt to run your application but I was able to see significant performance differences with your simple "help('modules')

[issue38890] subprocess.Popen should not emit a ResourceWarning for a detached process

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: I wonder if this should be handled more productively by supporting a `daemon` parameter. In POSIX, use the double fork technique for creating a daemon process. In Windows, use DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP | CREATE_BREAKAWAY_FROM_JOB. For a daemon

[issue32553] Use the py launcher in venv Windows examples

2021-03-16 Thread Eryk Sun
Change by Eryk Sun : -- title: venv says to use python3 which does not exist in 3.6.4 -> Use the py launcher in venv Windows examples versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker

[issue43525] pathlib: Highlight operator behavior with anchored paths

2021-03-16 Thread diegoe
Change by diegoe : -- keywords: +patch pull_requests: +23664 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24900 ___ Python tracker ___

[issue43525] pathlib: Highlight operator behavior with anchored paths

2021-03-16 Thread diegoe
New submission from diegoe : In the '/' operator documentation for `pathlib`, the behavior for anchored paths is not described: https://docs.python.org/3/library/pathlib.html#operators The behavior (prefer the second/right-hand root/anchor) is only explained in the `PurePath` class:

[issue43525] pathlib: Highlight pathlib operator behavior with anchored paths

2021-03-16 Thread diegoe
Change by diegoe : -- title: pathlib: Highlight operator behavior with anchored paths -> pathlib: Highlight pathlib operator behavior with anchored paths ___ Python tracker

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-16 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, the runtime isinstance() checking is not required to give the right answer. Also, I believe one of the rules is "if you inherit from a protocol you are deemed to implement it". For methods, abstract methods can (but needn't) be used to indicate

[issue41654] Segfault when raising MemoryError

2021-03-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1f0cde678406749524d11e852a16bf243cef5c5f by Miss Islington (bot) in branch '3.9': bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) (GH-24894) https://github.com/python/cpython/commit/1f0cde678406749524d11e852a16bf243cef5c5f

[issue43519] access python private variable

2021-03-16 Thread David Elmakias
New submission from David Elmakias : It might be my lack of knowledge in python, however I find this behavior a bit strange. By declaring a private variable in a class, python creates an attribute with the name '___'. Both are located on a different location in memory. I found that by

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: There's a bigger issue here about what characters should be accepted in numeric literals. The Unicode minus sign (U+2212) "−" is also not currently accepted for Fractions or any other built-in numeric type. > but there are other similar slashes such as

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson
New submission from Carl Anderson : Fraction works with a regular slash: >>> from fractions import Fraction >>> Fraction("1/2") Fraction(1, 2) but there are other similar slashes such as (0x2044) in which it throws an error: >>> Fraction("0⁄2") Traceback (most recent call last): File "",

[issue43503] [subinterpreters] PyObject statics exposed in the limited API break isolation.

2021-03-16 Thread mattip
mattip added the comment: I am confused. How can widening the usable number of functions (i.e. using the whole C-API rather than the limited API) help c-extension modules be usable in subinterpreters? Aren't the same singletons, exception types, and other types exposed in the full C-API?

[issue43519] access python private variable

2021-03-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, it is working as intended. Python does not really support "private" attributes, except by convention. Names that begin with a single leading underscore are no different than any other name to the interpreter, but the reader is expected

[issue43478] Disallow Mock spec arguments from being Mocks

2021-03-16 Thread Matthew Suozzo
Matthew Suozzo added the comment: A few more things: Assertions on Mock-autospec'ed Mocks will silently pass since e.g. assert_called_once_with will now be mocked out. This may justify a more stringent stance on the pattern since it risks hiding real test failures. One complicating factor

[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin

2021-03-16 Thread Frank Ueberschar
Frank Ueberschar added the comment: These lines correspond (due to dirty working copy): File "/home/franku/git/bareos/master/core/src/plugins/filed/python/libcloud/BareosLibcloudApi.py", line 102 in __init__ The actual Python code that starts the child processes is here:

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Christian Heimes
Christian Heimes added the comment: Oh heck, this is a genuine bug. I'm not yet sure if it's an undocumented API quirk in OpenSSL, a design bug in OpenSSL, or a bug in my code. Python sets the host flags on the X509_VERIFY_PARAM of the *SSL_CTX. All flags get copied to *SSL struct and later

[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-03-16 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +23663 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24899 ___ Python tracker

[issue43523] Handling Ctrl+C when waiting on stdin on Windows via winrs

2021-03-16 Thread George Sovetov
New submission from George Sovetov : Ctrl+C alone has no effect, but Ctrl+Break works: ``` winrs -r:127.0.0.1:20465 -u:Administrator -p:qweasd123 python -c "import sys;sys.stdin.read(1)" ``` Although, if I press Ctrl+C, type zero or more symbols and then press Enter, KeyboardInterrupt is

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Carl Anderson
Carl Anderson added the comment: from https://en.wikipedia.org/wiki/Slash_(punctuation) there is U+002F / SOLIDUS U+2044 ⁄ FRACTION SLASH U+2215 ∕ DIVISION SLASH U+29F8 ⧸ BIG SOLIDUS U+FF0F / FULLWIDTH SOLIDUS (fullwidth version of solidus) U+1F67C  VERY HEAVY SOLIDUS In XML and HTML, the

  1   2   >