[issue42384] Inconsistent sys.path between python and pdb

2021-01-25 Thread Andrey Bienkowski
Change by Andrey Bienkowski : -- pull_requests: +23140 pull_request: https://github.com/python/cpython/pull/24321 ___ Python tracker ___ ___

[issue43021] Unpacking tuple argument in combination with inline if statement

2021-01-25 Thread Wietse Jacobs
New submission from Wietse Jacobs : I suspect that I found a bug. If I run the following script: ``` def f(t=None): t0, t1 = t if t is not None else [], [] return t0, t1 def g(t=None): if t is None: t = [], [] t0, t1 = t return t0, t1 def test(): res_f = f(t=

[issue42384] Inconsistent sys.path between python and pdb

2021-01-25 Thread Andrey Bienkowski
Change by Andrey Bienkowski : -- pull_requests: +23141 pull_request: https://github.com/python/cpython/pull/23412 ___ Python tracker ___ ___

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2021-01-25 Thread Andrey Bienkowski
Change by Andrey Bienkowski : -- pull_requests: +23142 pull_request: https://github.com/python/cpython/pull/24322 ___ Python tracker ___ ___

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2021-01-25 Thread Andrey Bienkowski
Change by Andrey Bienkowski : -- pull_requests: +23143 pull_request: https://github.com/python/cpython/pull/24323 ___ Python tracker ___ ___

[issue43021] Unpacking tuple argument in combination with inline if statement

2021-01-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is a operation precedence issue. The line: t0, t1 = t if t is not None else [], [] is parsed as: (t if t is not None else []), [] so you need brackets around the "else" operand to get the effect you want. t0, t1 = t if t is not None els

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-25 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23144 pull_request: https://github.com/python/cpython/pull/24325 ___ Python tracker _

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3d5434d5cbc945c58be663e3dbd5ef4875677b7a by Serhiy Storchaka in branch '3.9': [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) https://github.com/python/cpython/commit/3d5434d5cbc94

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: hai shi: "I have checked all capi instances have been allocated in the heap memory. So I think this bpo can be closed ;)" I also checks and I confirm that PyCapsule_New() is no longer used with a pointer pointing to static data. Well, there is one last case,

[issue27772] Refer to actual format string when creating “zero padding” error message

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cf19cc3b920ca5995e1c202d2c3dd7a59ac8eac8 by Serhiy Storchaka in branch 'master': bpo-27772: Make preceding width with 0 valid in string format. (GH-11270) https://github.com/python/cpython/commit/cf19cc3b920ca5995e1c202d2c3dd7a59ac8eac8

[issue27772] Refer to actual format string when creating “zero padding” error message

2021-01-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ _

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-25 Thread miss-islington
miss-islington added the comment: New changeset 96bcf6f4d4bed1cdf97883eb43e872ff1a92013d by Miss Islington (bot) in branch '3.8': [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) https://github.com/python/cpython/commit/96bcf6f4d4b

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: Ned Deily (Python 3.7 release manager): do you want an exception to backport a bugfix? Campbell: Python 3.7 no longer accept bug fixes, only security fixes. https://devguide.python.org/#status-of-python-branches As I wrote previously, I'm not comfortable to

[issue43020] str.lower method with "İ" character

2021-01-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, but an issue with the way the Unicode standard defines the lowercase of dotted I. See #34723 Fortunately, Unicode will (hopefully!) fix this in revision 14.0, which is scheduled to be included in Python 3.10. Until then, perhaps the simp

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: > Why not return -1 directly when PyCapsule_Import() fails? That would work. I opened an issue since there is a bug. -- ___ Python tracker

[issue43015] Add str.replaceall?

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: Hi, the bug tracker is not the right place to propose to add a new method to the builtin str type. I suggest to propose it on the python-ideas list. I'm quite sure that it was proposed at least once, so please search in the archives. --

[issue43015] Add str.replaceall?

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: https://mail.python.org/mailman3/lists/python-ideas.python.org/ -- ___ Python tracker ___ ___ Pyt

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +23145 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24326 ___ Python tracker ___ __

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +23146 pull_request: https://github.com/python/cpython/pull/24327 ___ Python tracker ___ __

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +23147 pull_request: https://github.com/python/cpython/pull/24328 ___ Python tracker ___ __

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 879986d8a932c4524cb6ff822afc9537de16e28d by Terry Jan Reedy in branch 'master': bpo-43013: Fix old tkinter module names in idlelib (GH-24326) https://github.com/python/cpython/commit/879986d8a932c4524cb6ff822afc9537de16e28d -- ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR for 3. For 2.x, tkinter comprised several modules that became tkinter submodules. For 3.0, 'import tkOld' was replaced by 'import tkinter.new as tkOld', where 'new' is lowercase version of 'Old'. Fix remaining instances of tkColorChooser, tkFileDialog, t

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread miss-islington
miss-islington added the comment: New changeset 7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 by Miss Islington (bot) in branch '3.8': bpo-43013: Fix old tkinter module names in idlelib (GH-24326) https://github.com/python/cpython/commit/7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 -- _

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
New submission from Paul Moore : I am writing a small application using the embedded distribution to run a script supplied by the user. The requirements are very simple, so all I need to do is set up argv and call Py_Main. I'm trying to load the Py_Main function dynamically (for flexibility -

[issue36086] Split IDLE into separate feature in Windows installer

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: turtledemo currently requires a couple of modules from idlelib. One to syntax color examples, another to display the help file. So turtledemo would have to be patched if IDLE were separate from tkinter. -- ___ P

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset db584bdad32d81e42b71871077a8008036f5c048 by Victor Stinner in branch 'master': bpo-42955: Add sys.modules_names (GH-24238) https://github.com/python/cpython/commit/db584bdad32d81e42b71871077a8008036f5c048 -- __

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Jeremy Kloth
Change by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: I merged my PR, thanks for the feedback and reviews. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23148 pull_request: https://github.com/python/cpython/pull/24329 ___ Python tracker ___ __

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 483359174e92489e13959977824806734f1a8cdd by Victor Stinner in branch 'master': bpo-42955: Fix sys.module_names doc (GH-24329) https://github.com/python/cpython/commit/483359174e92489e13959977824806734f1a8cdd -- ___

[issue43023] Remove a redundant check in _PyBytes_Resize()

2021-01-25 Thread Ma Lin
New submission from Ma Lin : Above code already cover this check: if (Py_SIZE(v) == newsize) { /* return early if newsize equals to v->ob_size */ return 0; } if (Py_SIZE(v) == 0) { - if (newsize == 0) { - return 0; - } *pv = _PyBytes_Fro

[issue43023] Remove a redundant check in _PyBytes_Resize()

2021-01-25 Thread Ma Lin
Change by Ma Lin : -- keywords: +patch pull_requests: +23149 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24330 ___ Python tracker ___ _

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 26af2fae189629d22a87aaf01b92d6f4de92b958 by Miss Islington (bot) in branch '3.9': bpo-43013: Fix old tkinter module names in idlelib (GH-24326) https://github.com/python/cpython/commit/26af2fae189629d22a87aaf01b92d6f4de92b958 -- _

[issue43023] Remove a redundant check in _PyBytes_Resize()

2021-01-25 Thread Ma Lin
Ma Lin added the comment: Found a new issue, can be combined with this issue. -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: There are about 40 open PRs with 'idle' or 'idlelib' in title. I only found 2 or 3 with merge conflicts related to this issue -- and they are easy to fix. There are more conflicts from other patches (some fixed). These are usually more difficult to fix as

[issue12669] test_curses skipped on buildbots

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was fixed in other way in issue42789. If __stdout__ is not a terminal, the code falls back to __stderr__, and it is not terminal either, it tries to open /dev/tty. If neither works, it uses a regular temporary file as terminal, but savetty()/resetty() a

[issue42843] What min_sphinx for Python 3.10

2021-01-25 Thread Julien Palard
Julien Palard added the comment: New changeset 5c1f15b4b1024cbf0acc85832f0c623d1a4605fd by Julien Palard in branch 'master': bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282) https://github.com/python/cpython/commit/5c1f15b4b1024cbf0acc85832f0c623d1a4605fd -- ___

[issue42843] What min_sphinx for Python 3.10

2021-01-25 Thread Julien Palard
Change by Julien Palard : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36675] Doctest directives and comments missing from code samples

2021-01-25 Thread Julien Palard
Julien Palard added the comment: Due to https://github.com/python/cpython/pull/24282 this is sadly un-fixed. Either we find another way to fix this, either we wait 3 releases and we re-commit https://github.com/python/cpython/pull/23620. -- resolution: fixed -> later stage: resolved

[issue42869] pydoc does not append .html to documentation

2021-01-25 Thread Julien Palard
Julien Palard added the comment: New changeset eb9983c59b0683270328b5c40a115bb028209511 by Julien Palard in branch 'master': bpo-42869: Avoid an HTTP redirection. (GH-24174) https://github.com/python/cpython/commit/eb9983c59b0683270328b5c40a115bb028209511 -- ___

[issue42869] pydoc does not append .html to documentation

2021-01-25 Thread Julien Palard
Change by Julien Palard : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
New submission from Irit Katriel : The "sentinel" default value don't render nicely in the signature: >>> help(traceback.print_exception) Help on function print_exception in module traceback: print_exception(exc, /, value=, tb=, limit=None, file=None, chain=True) -- components: Libra

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
Change by Irit Katriel : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +23150 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24331 ___ Python tracker ___ ___

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
Irit Katriel added the comment: The PR changes the output to: >>> help(traceback.print_exception) Help on function print_exception in module traceback: print_exception(exc, /, value=, tb=, limit=None, file=None, chain=True) -- ___ Python tracker

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg385635 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg385634 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
New submission from Irit Katriel : The "sentinel" default value don't render nicely in the signature: >>> import traceback >>> help(traceback.print_exception) Help on function print_exception in module traceback: print_exception(exc, /, value=, tb=, limit=None, file=None, chain=True)

[issue43024] improve signature (in help, etc) for functions taking sentinel defaults

2021-01-25 Thread Irit Katriel
Irit Katriel added the comment: The PR changes the output to: >>> help(traceback.print_exception) Help on function print_exception in module traceback: print_exception(exc, /, value=, tb=, limit=None, file=None, chain=True) -- ___ Python tracker

[issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary

2021-01-25 Thread Daniel Romberg
Daniel Romberg added the comment: I think this issue needs to be reopened. The problem has not been solved completely. We experience a lot fewer crashes in weakref than before this fix, however, there are recursive situations in which copy() is invoked while iterating the WeakValueDictionary

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-25 Thread Anthony Sottile
Anthony Sottile added the comment: > Anthony: removing 'set' from 'list(set(interable))' is wrong if 'set' were > added to remove duplicates. It's not removed, it's changed to a set comprehension (which was added in 2.7 and 3.0) pyupgrade is very battle tested, having been run on pip, pytes

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23151 pull_request: https://github.com/python/cpython/pull/24332 ___ Python tracker ___ __

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-25 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +23152 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24333 ___ Python tracker ___

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Eryk Sun
Eryk Sun added the comment: "python3.dll" doesn't directly depend on "python39.dll", so the loader waits to load it until first accessed via GetProcAddress(). It should remember the activation context of "python3.dll", such as whether it was loaded with a fully-qualified path and LOAD_LIBRAR

[issue43025] Use normal 'i

2021-01-25 Thread Bhuvanesh Bhatt
New submission from Bhuvanesh Bhatt : In Python, the letter 'j' denotes the imaginary unit. It would be great if we would follow mathematics in this regard and let the imaginary unit be denoted with an 'i'. -- messages: 385641 nosy: bhuvaneshbhatt priority: normal severity: normal sta

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Bhuvanesh Bhatt
Bhuvanesh Bhatt added the comment: Nobody these days uses j to represent the imaginary part of complex numbers. Regardless of what Guido wrote earlier, this issue should be fixed. -- title: Use normal 'i -> Use normal 'i' character to denote imaginary part of complex numbers type: -

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
Paul Moore added the comment: So I need to dynamically load *both* python3.dll and python39.dll, but if I do that I can get the functions from python3.dll? What's the point in doing that? Surely I might as well just load python39.dll and get the functions from there, in that case. I hoped t

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Christian Heimes
Christian Heimes added the comment: Your statement is not correct. A lot of people use "j" in fields of electrical engineering and signal processing to express the imaginary part. The letter "i" is commonly used for electric current in these fields. -- nosy: +christian.heimes __

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
Paul Moore added the comment: Thinking about what you said, "the loader waits to load it until first accessed via GetProcAddress()" did you mean by that, that the following code should work: h = LoadLibraryW(L"some/path/to/python3.dll") py_main = GetProcAddress(h, "Py_Main") (with so

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Eryk Sun
Eryk Sun added the comment: > So I need to dynamically load *both* python3.dll and python39.dll, > but if I do that I can get the functions from python3.dll? No, just load the fully-qualified name of "python3.dll", with the loader flags LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Eryk Sun
Eryk Sun added the comment: > h = LoadLibraryW(L"some/path/to/python3.dll") You should be using LoadLibraryExW(). It's a one-time call. You do not need to set the default flags via SetDefaultDllDirectories(). -- ___ Python tracker

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Eric V. Smith
Eric V. Smith added the comment: Even if we wanted to switch to "i" we'd have to continue to also support "j": there's a ton of existing code that uses it. Since "j" is used by some fields (including my own) for the imaginary part of complex numbers, and since I don't think we want to have t

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Emmanuel Arias
Emmanuel Arias added the comment: Personally, it's more natural use 'j' for complex number, but it's true that in many math book (or that I used) letter 'i' is used. Now, it's feasible change i for j on cpython? Asking from my ignorance on this case. -- nosy: +eamanu __

[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2021-01-25 Thread Ned Deily
Ned Deily added the comment: It is certainly not good that some of the vfx users are seeing a crash. On the other hand, at this stage of Python 3.7's life cycle only security-related fixes are accepted as a primary goal is to keep 3.7 as stable and unchanged as possible for those users still

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Emmanuel Arias
Emmanuel Arias added the comment: > Now, it's feasible change i for j on cpython? Asking from my ignorance on > this case. j for i, sorry -- ___ Python tracker ___ _

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-25 Thread Eric V. Smith
Eric V. Smith added the comment: As I said in msg385648, I don't think it's feasible. Maybe I'll write a PEP just to get it rejected so we can point to it when this discussion comes up, which it does a few times a year. -- ___ Python tracker

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Eryk Sun
Eryk Sun added the comment: I noted that the path to "python3.dll" must be fully qualified. But let me stress that point. You cannot use the relative path "path/to/python3.dll" with LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR. The loader will fail the call as an invalid parameter. Unlike POSIX, a Wind

[issue36086] Split IDLE into separate feature in Windows installer

2021-01-25 Thread Andre Roberge
Andre Roberge added the comment: I do not use IDLE (except for testing) and would not be affected by such a change. However, many tutorials and books intended for beginners instruct users to use IDLE, with the assumption that it is available out of the box. Removing IDLE would immediately m

[issue43017] Improve error message in the parser when using un-parenthesised tuples in comprehensions

2021-01-25 Thread Andre Roberge
Andre Roberge added the comment: Such a change would be very useful and appreciated by other users as reported on https://github.com/aroberge/friendly-traceback/issues/167 and asked about on StackOverflow https://stackoverflow.com/questions/60986850/why-does-creating-a-list-of-tuples-using-li

[issue42920] How to add end_lineno in pyclbr?

2021-01-25 Thread Aviral Srivastava
Aviral Srivastava added the comment: But how do I generate the endline no? Initially, I could do, stack[-1][0].end_lineno = start[0] - 1 but how do I this now? Best, Aviral Srivastava LinkedIn

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
Paul Moore added the comment: Thanks, I'll give that a try. It sounds like I'm just using the APIs incorrectly, which would be good (in the sense that I can do what I wanted, I just didn't know how ;-)) I wonder whether it would be worth having a section in the docs somewhere explaining how

[issue38307] Provide Class' end line in pyclbr module

2021-01-25 Thread Aviral Srivastava
Aviral Srivastava added the comment: How do I generate the endline no? Initially, I could do, stack[-1][0].end_lineno = start[0] - 1 but how do I this now given that the recent changes are operating on the AST instead of the token stream? -- nosy: +kebab-mai-haddi ___

[issue42973] argparse: mixing optional and positional arguments... not again

2021-01-25 Thread Tadek Kijkowski
Tadek Kijkowski added the comment: I added tests and docs to the PR. How does it look now? -- ___ Python tracker ___ ___ Python-bug

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Steve Dower
Steve Dower added the comment: > I wonder whether it would be worth having a section in the docs somewhere > explaining how to do this, or more generally what the "best practices" are > for embedding? Yes, it would be great. I think there are a few pieces in Doc/using/windows.rst already, a

[issue36675] Doctest directives and comments missing from code samples

2021-01-25 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: My goodness, things get complex sometimes. If we cannot make Sphinx preserve doctest directives and comments, perhaps we should go back to the historical bug discussion to look at workarounds which we considered earlier. For instance, maybe we should modify t

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
Paul Moore added the comment: Confirmed. The following code works as I want: Py_Main_t get_pymain(wchar_t *base_dir) { wchar_t *dll_path; HRESULT hr = PathAllocCombine( base_dir, L"python\\python3.dll", PATHCCH_ALLOW_LONG_PATHS, &dll_path ); if (hr != S_OK) {

[issue33129] Add kwarg-only option to dataclass

2021-01-25 Thread Paul Bryan
Change by Paul Bryan : -- nosy: +pbryan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue37319] Deprecate using random.randrange() with non-integers

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32 by Serhiy Storchaka in branch 'master': bpo-37319: Improve documentation, code and tests of randrange. (GH-19112) https://github.com/python/cpython/commit/f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32

[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2021-01-25 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +23153 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24334 ___ Python tracker ___

[issue37319] Deprecate using random.randrange() with non-integers

2021-01-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2021-01-25 Thread Irit Katriel
Irit Katriel added the comment: I'm reopening this to delete an obsolete comment left behind. -- nosy: +iritkatriel status: closed -> open ___ Python tracker ___ _

[issue42383] Pdb does not correclty restart the target if it changes the current directory

2021-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 501d4a51e32c7bbba255598adc307660b5af891a by Andrey Bienkowski in branch 'master': bpo-42383: pdb: do not fail to restart the target if the current directory changed (#23412) https://github.com/python/cpython/commit/501d4a51e32c7bbba255598adc3

[issue42384] Inconsistent sys.path between python and pdb

2021-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset f2df7958fb82cd927e17152b3a1bd2823a76dd3e by Andrey Bienkowski in branch '3.9': [3.9] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24321) https://github.com/python/cpython/commit/f2df7958fb82cd927e17152b3a1bd2823a76dd3e ---

[issue42384] Inconsistent sys.path between python and pdb

2021-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c10180ea1458aa0ffd7793cb75629ebffe8a257e by Andrey Bienkowski in branch '3.8': [3.8] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24320) https://github.com/python/cpython/commit/c10180ea1458aa0ffd7793cb75629ebffe8a257e ---

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
Paul Moore added the comment: > I think here you're in a very small minority who could get away with this, > and so I'd hesitate to make it sound like the recommended approach. Well, the evidence here is that maybe even I shouldn't be doing this :-) > What I'd actually recommend (on Windows)

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Eryk Sun
Eryk Sun added the comment: > uses a code snippet like this. PathAllocCombine() is Windows 8+, so sample code that uses it would only be for Python 3.9+. I'd prefer the function pointer to be returned as an out parameter, and return an HRESULT status as the result. If LoadLibraryExW() or Ge

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9852cb38112a4f8d11e26c3423643ea994d5a14f by Victor Stinner in branch 'master': bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332) https://github.com/python/cpython/commit/9852cb38112a4f8d11e26c3423643ea994d5a14f -- _

[issue42955] Add sys.stdlib_module_names: list of stdlib module names (Python and extension modules)

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: Update: attribute renamed to sys.stdlib_module_names. -- title: Add sys.module_names: list of stdlib module names (Python and extension modules) -> Add sys.stdlib_module_names: list of stdlib module names (Python and extension modules) _

[issue38250] enum.Flag should be more set-like

2021-01-25 Thread Ethan Furman
Ethan Furman added the comment: New changeset 7aaeb2a3d682ecba125c33511e4b4796021d2f82 by Ethan Furman in branch 'master': bpo-38250: [Enum] single-bit flags are canonical (GH-24215) https://github.com/python/cpython/commit/7aaeb2a3d682ecba125c33511e4b4796021d2f82 -- __

[issue43022] Unable to dynamically load functions from python3.dll

2021-01-25 Thread Paul Moore
Paul Moore added the comment: > PathAllocCombine() is Windows 8+, so sample code that uses it would only be > for Python 3.9+. Yeah, I'm probably going to remove that. I mainly used it because I'm *so* spoiled by Python, writing code in C where I have to actually implement stuff for myself

[issue2636] Adding a new regex module (compatible with re)

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: It's now a third party project: https://pypi.org/project/regex/ If someone wants to move it into the Python stdlib, I suggest to start on the python-ideas list first. I close the issue as REJECTED. -- nosy: +vstinner resolution: -> rejected stage:

[issue42973] argparse: mixing optional and positional arguments... not again

2021-01-25 Thread Glenn Linderman
Glenn Linderman added the comment: On 1/25/2021 12:43 PM, Tadek Kijkowski wrote: > Tadek Kijkowski added the comment: > > I added tests and docs to the PR. How does it look now? Could you send me the docs privately? I'm trying to understand what you are suggesting, without reading the code. I

[issue42986] pegen parser: Crash on SyntaxError with f-string on Windows

2021-01-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue42369] Reading ZipFile not thread-safe

2021-01-25 Thread Jen Garcia
Change by Jen Garcia : -- nosy: +cuibonobo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2021-01-25 Thread Mitchell Young
Mitchell Young added the comment: I am struggling with the same issue as Anthony. To provide a more direct response to Manjusaka's query: python -c "import os; print(os.environ.get(\"PATHEXT\", \"\").split(os.pathsep))" ['.COM', '.EXE', '.BAT', '.CMD', '.VBS', '.VBE', '.JS', '.JSE', '.WSF',

[issue38250] enum.Flag should be more set-like

2021-01-25 Thread Ethan Furman
Ethan Furman added the comment: Thank you to everyone involved. :-) To answer the first three points that started this issue: 1. iteration -> each single-bit flag in the entire flag, or a combinations of flags, is returned one at a time -- not the empty set, not other multi-bit values

[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2021-01-25 Thread Irit Katriel
Change by Irit Katriel : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

2021-01-25 Thread Ethan Furman
Ethan Furman added the comment: Fixed in 3.10 in issue38250. Also fixed in my 3rd-party library, aenum 3.0: (https://pypi.org/project/aenum/) -- resolution: -> wont fix stage: -> resolved status: open -> closed superseder: -> enum.Flag should be more set-like type: -> behavior

[issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__

2021-01-25 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

  1   2   >