[issue46142] python --help output is too long

2021-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the man page should contain all details related to the CLI (and may be even some examples). -- ___ Python tracker ___ ___

[issue44136] Remove pathlib flavours

2021-12-31 Thread Barney Gale
Change by Barney Gale : -- pull_requests: +28537 pull_request: https://github.com/python/cpython/pull/30321 ___ Python tracker ___ _

[issue44136] Remove pathlib flavours

2021-12-31 Thread Barney Gale
Change by Barney Gale : -- pull_requests: +28536 pull_request: https://github.com/python/cpython/pull/30320 ___ Python tracker ___ _

[issue46142] python --help output is too long

2021-12-31 Thread Éric Araujo
Éric Araujo added the comment: Do people think the man page should be shortened too? -- ___ Python tracker ___ ___ Python-bugs-list

[issue46218] Change long_pow() to sliding window algorithm

2021-12-31 Thread Tim Peters
Change by Tim Peters : -- keywords: +patch pull_requests: +28535 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30319 ___ Python tracker __

[issue40236] datetime.datetime.strptime get day error

2021-12-31 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +28534 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30318 ___ Python tracker __

[issue40236] datetime.datetime.strptime get day error

2021-12-31 Thread Andrei Kulakov
Andrei Kulakov added the comment: > I am open to discussion about trying to rationalize this behavior - it would > be a bit tricky but if we moved to our own implementation of the algorithm to > calculate %W we could detect this situation and throw an exception. Paul: I'm guessing here but

[issue46095] Improve SeqIter documentation

2021-12-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +28533 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30316 ___ Python tracker __

[issue46213] webbrowser.open doesn't work in Termux

2021-12-31 Thread Steven D'Aprano
Steven D'Aprano added the comment: I think the existence of sys.getandroidapilevel is evidence that Android is somewhat supported, even if it is not supported to the same degree that Linux and Windows are. https://docs.python.org/3/library/sys.html#sys.getandroidapilevel See also: https://

[issue46218] Change long_pow() to sliding window algorithm

2021-12-31 Thread Tim Peters
New submission from Tim Peters : As discussed on python-dev, it would be nice to break long_pow()'s reliance on that the number of bits in a CPython long "digit" is a multiple of 5. Moving to the sliding-window algorithm would do that (it has to be able to cross digit boundaries to fill the c

[issue24132] Direct sub-classing of pathlib.Path

2021-12-31 Thread Éric Araujo
Change by Éric Araujo : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46079] [doc] Broken URL in "Brief Tour of the Standard Library"

2021-12-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +28532 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30315 ___ Python tracker __

[issue46217] 3.11 build failure on Win10: new _freeze_module changes?

2021-12-31 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue46217] 3.11 build failure on Win10: new _freeze_module changes?

2021-12-31 Thread Terry J. Reedy
New submission from Terry J. Reedy : Installed 3.11.0a3 was built Dec 8 2021, 22:56:33. My corresponding repository build is a bit older than that. Rebuilding now I get fileutils.c ..\Python\fileutils.c(2132): error C2065: 'PATHCCH_FORCE_ENABLE_LONG_NAME_PROCE SS': undeclared identifier [f

[issue46197] ensurepip bootstrap breaks out of isolated environment

2021-12-31 Thread Marc Mueller
Change by Marc Mueller : -- nosy: +cdce8p ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue46198] Duplicated test name `test_get_unstructured_invalid_ew` in `test__header_value_parser.py`

2021-12-31 Thread Éric Araujo
Éric Araujo added the comment: Sometimes people fix small things in multiple modules, sometimes they create separate tickets to have one patch per module with reviews from different maintainers and so on. For this case, I check pyflakes and found a handful of true positives, so I would retit

[issue45670] New .mapping attribute is broken for some existing uses of dict views

2021-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: To the list of four options I suggested for bidict, you can add one more. Create a feature request for a C implementation of collections.abc.KeyView. ISTM that your core issue is that bidict won't use the intended and guaranteed solution because the Keys

[issue46216] spurious link to os.system() from os.times() documentation entry

2021-12-31 Thread Emery Berger
New submission from Emery Berger : This is a minor documentation nit. Under the entry for `os.times()`, there is a description of the various fields it returns (e.g., `user`, `system`). ```os.times() Returns the current global process times. The return value is an object with five attributes

[issue46206] Crash when editing emoji containing strings

2021-12-31 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Example: >>> ___😀 File "", line 1 ___😀 ^ SyntaxError: invalid character '😀' (U+1F600) >>> __😀 File "", line 1 __😀 ^ SyntaxError: invalid character '😀' (U+1F600) -- ___ Python tracker

[issue46206] Crash when editing emoji containing strings

2021-12-31 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue46206] Crash when editing emoji containing strings

2021-12-31 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This seems to be fixed on the main branch (at least I cannot reproduce it in the main branch). If so, this means that will be fixed in Python 3.10.2. 10maurycy10, could you please confirm that this is indeed the case? -- _

[issue46198] Duplicated test name `test_get_unstructured_invalid_ew` in `test__header_value_parser.py`

2021-12-31 Thread Nikita Sobolev
Nikita Sobolev added the comment: Eric, should I patch this as well in this issue? Or should I open a new one? Would be happy to fix it :) -- ___ Python tracker ___ _

[issue46213] webbrowser.open doesn't work in Termux

2021-12-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://termux.com/ "Termux is an Android terminal emulator [on Android] and Linux environment app" I don't believe that core devs (and b.p.o.) support running Python on Android. If so, this should be closed here and your question redirected to whoever sup

[issue46206] Crash when editing emoji containing strings

2021-12-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Win10 command prompt, 😀 is initially displayed as 2 boxes, subsequently as box-space. Besides this, editing works fine and when Entered, the string is echoed. -- nosy: +pablogsal, terry.reedy ___ Python tracker

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

2021-12-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Win10, Py 3.11: run combobug.py, click down arrow, click entry. 'changed' is printed to stdout (console or IDLE Shell). Cursor not visible and clicking on remaining entry box does nothing. Click on another window and back to entry box. Cursor is present in bo

[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2021-12-31 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +serhiy.storchaka stage: -> test needed type: crash -> behavior versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ _

[issue46177] can't install launcher for all users

2021-12-31 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg409173 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46177] can't install launcher for all users

2021-12-31 Thread Terry J. Reedy
Change by Terry J. Reedy : Removed file: https://bugs.python.org/file50521/Annotation 2021-12-25 165843.png ___ Python tracker ___ ___ Pytho

[issue25478] Consider adding a normalize() method to collections.Counter()

2021-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Withdrawing the suggestions for scaled_to() and scaled_by(). Am thinking that people are mostly better off with a dict comprehension where they can control the details of rounding and type conversions. -- resolution: -> rejected stage: patch rev

[issue46215] Wrong error line after using pdb

2021-12-31 Thread beda pišl
New submission from beda pišl : Consider simple script: ``` for i in range(1): import pdb pdb.set_trace() x = y + z ``` After running it and pressing 'c' to continue: ``` test$ python test.py > /Users/bedrich.pisl/test/test.py(1)() -> for i in range(1): (Pdb) c ``` I get error, but with

[issue46199] Calculation influenced by print

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: When you do: FINUB = np.empty(len(close)) FINLB = np.empty(len(close)) you're creating two *uninitialised* arrays of values. (See the NumPy documentation at https://numpy.org/doc/stable/reference/generated/numpy.empty.html.) When you then do

[issue46197] ensurepip bootstrap breaks out of isolated environment

2021-12-31 Thread Ned Deily
Change by Ned Deily : -- nosy: +dstufft, ncoghlan, pradyunsg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37295] Possible optimizations for math.comb()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 0b58bac3e7877d722bdbd3c38913dba2cb212f13 by Mark Dickinson in branch 'main': bpo-37295: More direct computation of power-of-two factor in math.comb (GH-30313) https://github.com/python/cpython/commit/0b58bac3e7877d722bdbd3c38913dba2cb212f13 -

[issue45670] New .mapping attribute is broken for some existing uses of dict views

2021-12-31 Thread Joshua Bronson
Joshua Bronson added the comment: Dear Raymond, Thanks so much for the detailed response! I wonder if you could explain how this case is different from the following: >>> c = collections.ChainMap({1: 1}, {1: 2}) >>> iter(c) >>> isinstance(c, dict) # it's fine, we <3 duck typing! False Now

[issue46198] Duplicated test name `test_get_unstructured_invalid_ew` in `test__header_value_parser.py`

2021-12-31 Thread Éric Araujo
Éric Araujo added the comment: Also fund a duplicate TestHelpers class in test_enum. A warning for duplicate method is a false positive, because the two methods are used on different python versions. But the first method uses `self.Grades.B` wrongly (should be `Grades.B`) so it will break wh

[issue46196] documentation for cmd library should include columnize() function

2021-12-31 Thread Éric Araujo
Éric Araujo added the comment: The method is called from one place only, but the fact that it is its own method and has dedicated tests seems to indicate that it was meant as standalone piece of functionality. We can’t be sure of original intent given that no method in the class uses the `_`

[issue46204] Graphlib documentation (general cleanup)

2021-12-31 Thread Éric Araujo
Éric Araujo added the comment: Could you say a little more about this? Precisely: what are the problems you identified? -- nosy: +eric.araujo ___ Python tracker ___ _

[issue46187] Optionally support rounding for math.isqrt()

2021-12-31 Thread Tim Peters
Tim Peters added the comment: The name "isqrtrem" works fine for me too, and, indeed, is even more reminiscent of mpz's workalike function. > the number of times I've needed rounded integer square root > is small compared with the number of times I've needed rounded > integer division Speaki

[issue46187] Optionally support rounding for math.isqrt()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: > Mark didn't mention his use case for rounded isqrt Mainly for emulation of floating-point sqrt. But the number of times I've needed rounded integer square root is small compared with the number of times I've needed rounded integer division. -- __

[issue46187] Optionally support rounding for math.isqrt()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: A new function isqrt_rem seems like a reasonably natural addition. (Though I'd call it "isqrtrem", partly by analogy with "divmod", and partly because the math module isn't very good at doing underscores.) -- ___

[issue46214] Remove unused opcode ROT_FOUR

2021-12-31 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +28531 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30314 ___ Python tracker ___ ___

[issue46214] Remove unused opcode ROT_FOUR

2021-12-31 Thread Irit Katriel
Change by Irit Katriel : -- assignee: iritkatriel components: Interpreter Core nosy: iritkatriel priority: normal severity: normal status: open title: Remove unused opcode ROT_FOUR versions: Python 3.11 ___ Python tracker

[issue46171] venv module produces spurious warning that location has moved

2021-12-31 Thread Eryk Sun
Eryk Sun added the comment: > My VHDX mounted in a directory is affected by this I created a VHDX and mounted it in a directory. It's just a regular volume mount point with a junction (IO_REPARSE_TAG_MOUNT_POINT). That won't cause any problems, so I guess your setup must be different in some

[issue46187] Optionally support rounding for math.isqrt()

2021-12-31 Thread Tim Peters
Tim Peters added the comment: Suppose we added isqrt_rem(n), returning the integer pair (i, rem) such that n == i**2 + rem 0 <= rem <= 2*i Then: - Want the floor of sqrt(n)? i. - The ceiling? i + (rem != 0). - Rounded? i + (rem > i). - Is n a perfect square? not rem. That's how mpz

[issue46213] webbrowser.open doesn't work in Termux

2021-12-31 Thread DonaldDuck313
New submission from DonaldDuck313 : In Termux, if I type the following code, I would expect it to open the URL in a browser, but it does nothing: import webbrowser webbrowser.open("http://example.com";) -- components: Library (Lib) messages: 409422 nosy: DonaldDuck1313 priority: norma

[issue46192] Optimize builtin functions min() and max()

2021-12-31 Thread Dennis Sweeney
Dennis Sweeney added the comment: Kind of like what's mentioned at https://github.com/faster-cpython/ideas/discussions/131 , it may be interesting to explore implementing min()/max() in Pure python, considering recent specializations to COMPARE_OP, and potential future specializations of FOR

[issue46171] venv module produces spurious warning that location has moved

2021-12-31 Thread Steve Dower
Steve Dower added the comment: My VHDX mounted in a directory is affected by this, and actually broke a couple of tools until I also mounted it as a drive. (Using a VHDX helps bypass a lot of filesystem related perf impacts on Windows, so it's worth the occasional broken tool.) I suspect (b

[issue46109] Separate resources docs from other importlib docs

2021-12-31 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2021-12-31 Thread Steve Dower
Steve Dower added the comment: Yep, it's a bug and should be fixed. I'm still not back coding yet, but I'll get to it once I am if nobody else gets there first. This is going to affect getpath.py in the native implementation, so it ought to be fixed there (and we need tests for this case, si

[issue46200] Discourage logging f-strings due to security considerations

2021-12-31 Thread Arie Bovenberg
Arie Bovenberg added the comment: Absolutely agree! In practice I find some people are not swayed by this argument -- and prefer the readability of f-strings. My expectation is that a clear recommendation in the official docs will convince more people. Especially if there are security conce

[issue37295] Possible optimizations for math.comb()

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd be happy to change the implementation to use the trailing zero counts as > suggested. Done in GH-30313 (though this will conflict with Serhiy's PR). -- ___ Python tracker

[issue46200] Discourage logging f-strings due to security considerations

2021-12-31 Thread Vinay Sajip
Vinay Sajip added the comment: Another (minor) point against using f-strings or .format is that formatting prematurely might be doing unnecessary work - by default, logging formats messages lazily, waiting until a message actually needs to be output. This could perhaps be more prominently em

[issue37295] Possible optimizations for math.comb()

2021-12-31 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +28529 pull_request: https://github.com/python/cpython/pull/30313 ___ Python tracker ___ __

[issue45569] Drop support for 15-bit PyLong digits?

2021-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: > I've created PR GH-30306 to find out. Results: we have two Gentoo/x86 buildbots, and a 32-bit Windows build in GitHub Actions: those machines use 15-bit digits, as a result of the logic in pyport.h that chooses 15-bit digits if SIZEOF_VOID_P < 8. Everythin

[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2021-12-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Note that _PyArg_UnpackKeywordsWithVararg is defined with PyAPI_FUNC. Changing its argument spec is strictly a backwards incompatible change, IIUC. -- nosy: +BTaskaya ___ Python tracker

[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2021-12-31 Thread colorfulappl
colorfulappl added the comment: I wrote some microbenchs. Patch: https://github.com/python/cpython/pull/30312/commits/b68176d081e19a3cedbaf2cdb31ecd7690421ec8 Environment: macOS 12.1 clang 13.0.0 configure with --enable-optimizations Result on microbench: ``` +-

[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2021-12-31 Thread colorfulappl
Change by colorfulappl : -- keywords: +patch pull_requests: +28527 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30312 ___ Python tracker ___ ___

[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2021-12-31 Thread colorfulappl
New submission from colorfulappl : When "Augument Clinic generated code" are parsing arguments, the args are packed to a tuple before passing to callee. This may be unnecessary. Pass a raw pointer which points to on-stack varargs, and a varargssize integer to indicate how many varargs are pas

[issue45321] Module xml.parsers.expat.errors misses error code constants of libexpat >=2.0

2021-12-31 Thread Stefan Behnel
Change by Stefan Behnel : -- components: +XML resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue45321] Module xml.parsers.expat.errors misses error code constants of libexpat >=2.0

2021-12-31 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e18d81569fa0564f3bc7bcfd2fce26ec91ba0a6e by Sebastian Pipping in branch 'main': bpo-45321: Add missing error codes to module `xml.parsers.expat.errors` (GH-30188) https://github.com/python/cpython/commit/e18d81569fa0564f3bc7bcfd2fce26ec91ba0a6e

[issue24301] gzip module failing to decompress valid compressed file

2021-12-31 Thread Ruben Vorderman
Ruben Vorderman added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue46079] [doc] Broken URL in "Brief Tour of the Standard Library"

2021-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a little closer to the current code. Also it has a simpler and more universal url. from urllib.request import urlopen url = 'http://worldtimeapi.org/api/timezone/etc/UTC.txt' with urlopen(url) as request: for line in request: line = l