[issue11104] distutils sdist ignores MANIFEST

2011-02-02 Thread John Dennis
Changes by John Dennis : Added file: http://bugs.python.org/file20659/sdist_new ___ Python tracker <http://bugs.python.org/issue11104> ___ ___ Python-bugs-list mailin

[issue11104] distutils sdist ignores MANIFEST

2011-02-03 Thread John Dennis
John Dennis added the comment: $ tar xzf distutils_bug.tar.gz $ cd distutils_bug $ ./setup.py sdist $ ./setup.py sdist running sdist running check warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list) not writing to manually maintained man

[issue11104] distutils sdist ignores MANIFEST

2011-02-04 Thread John Dennis
John Dennis added the comment: No, I don't think I'm going to turn the tarball into a unit test, etc. I didn't break the code but I did report the problem, researched the history, provided a clear explanation, a reproducer and a patch to fix the problem. I think I'v

[issue11104] distutils sdist ignores MANIFEST

2011-02-07 Thread John Dennis
Changes by John Dennis : -- nosy: +dmalcolm ___ Python tracker <http://bugs.python.org/issue11104> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1011893] Problems importing packages in ZIP file

2008-01-07 Thread Dennis Chuah
Dennis Chuah added the comment: I had forgotten about this bug. I haven't been able to test this on 2.5 as I have not worked with Python for a while. I think if you are satisfied that the problem doesn't exist, then close it. If I find it again, I can certainly log the problem a

[issue1957] [patch] syslogmodule: Release GIL when calling syslog(3)

2008-01-28 Thread Dennis Jensen
New submission from Dennis Jensen: The glibc syslog(3) call will block in some cases; the attached patch releases the GIL around the syslog call. -- components: Extension Modules, Interpreter Core files: syslogmodule-patch.txt messages: 61781 nosy: rd2 severity: minor status: open title

[issue2519] Typing 'modules' in the interactive help system fails when imports fail

2008-03-31 Thread Dennis Kaarsemaker
New submission from Dennis Kaarsemaker <[EMAIL PROTECTED]>: If a certain module cannot be imported, this error is not caught and warned about by pydoc, but will cause 'modules' to fail. This could be considered a bug in the module but it would still be nice if 3rd party modu

[issue2519] Typing 'modules' in the interactive help system fails when imports fail

2008-03-31 Thread Dennis Kaarsemaker
Changes by Dennis Kaarsemaker <[EMAIL PROTECTED]>: -- versions: +Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2519> __ ___ Python-bugs

[issue2519] Typing 'modules' in the interactive help system fails when imports fail

2008-04-01 Thread Dennis Kaarsemaker
Dennis Kaarsemaker <[EMAIL PROTECTED]> added the comment: pydoc.py from head actually does work around it in some places, but not all. Will send a patch. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2022-03-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: Should this be backported to make the 3.8 Buildbots happy? -- ___ Python tracker <https://bugs.python.org/issue45806> ___ ___

[issue46952] pip progress bar display bug

2022-03-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: pip is maintained externally at https://github.com/pypa/pip , so that is likely a better place to open an issue about pip. -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/issue46

[issue46952] pip progress bar display bug

2022-03-07 Thread Dennis Sweeney
Change by Dennis Sweeney : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39829] __len__ called twice in the list() constructor

2022-03-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: Related to Matt's idea is https://bugs.python.org/issue43574 -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/is

[issue46896] add support for watching writes to selected dictionaries

2022-03-09 Thread Dennis Sweeney
Dennis Sweeney added the comment: A curiosity: have you considered watching dict keys rather than whole dicts? That way, changing global values would not have to de-optimize, only adding new global keys would. Indexing into dict values array wouldn't be as efficient as embedding d

[issue46979] Spam

2022-03-10 Thread Dennis Sweeney
Change by Dennis Sweeney : -- components: -Build resolution: -> not a bug stage: -> resolved status: open -> closed title: Master piece -> Spam type: security -> ___ Python tracker <https://bugs.pyt

[issue46961] Caching/interning of small ints sometimes fails

2022-03-12 Thread Dennis Sweeney
Dennis Sweeney added the comment: I believe the issue is the usage of the x_divrem function. x_divrem always returns fresh ints, never cached small ints. This behavior is relied upon in the long_true_divide function, as it mutates the returned quotient at the line """x->

[issue46961] Caching/interning of small ints sometimes fails

2022-03-13 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +29942 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31843 ___ Python tracker <https://bugs.python.org/issu

[issue47008] Add Lib/site-packages to .gitignore

2022-03-13 Thread Dennis Sweeney
New submission from Dennis Sweeney : It would be nice to add the following to .gitignore, so that I can `./python -m pip install [whatever]` without overwhelming the output of `git status`. Lib/site-packages/* !Lib/test/data/README.txt -- messages: 415114 nosy: Dennis Sweeney

[issue47008] Add Lib/site-packages to .gitignore

2022-03-13 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +29960 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31862 ___ Python tracker <https://bugs.python.org/issu

[issue47008] Add Lib/site-packages to .gitignore

2022-03-13 Thread Dennis Sweeney
Dennis Sweeney added the comment: I made a copy/paste error, it should be: Lib/site-packages/* !Lib/site-packages/README.txt -- ___ Python tracker <https://bugs.python.org/issue47

[issue47009] Streamline list.append for the common case

2022-03-13 Thread Dennis Sweeney
New submission from Dennis Sweeney : list_resize is a long function that probably won't get inlined. But for the vast majority of cases in list.append, we just need to check whether the list is big enough (not whether it's small enough, or whether it's null or the wrong typ

[issue47009] Streamline list.append for the common case

2022-03-13 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +29962 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31864 ___ Python tracker <https://bugs.python.org/issu

[issue47009] Streamline list.append for the common case

2022-03-14 Thread Dennis Sweeney
Dennis Sweeney added the comment: The attached _PyList_AppendTakeRef.diff has the ceval.c, but this implementation: int _PyList_AppendTakeRef(PyListObject *self, PyObject *newitem) { assert(self != NULL && newitem != NULL); assert(PyList_Check(self)); Py_ssi

[issue47008] Add Lib/site-packages to .gitignore

2022-03-14 Thread Dennis Sweeney
Change by Dennis Sweeney : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue47028] Incorrect behaviour when zipping a bunch of maps

2022-03-15 Thread Dennis Sweeney
Dennis Sweeney added the comment: This is because i is not captured by the function definition. `lambda x: x**i` always makes the "input to the ith power" function, never the "input to the 3rd power" function, even if i happens to be 3 right now. Consider replacing `

[issue47028] Incorrect behaviour when zipping a bunch of maps

2022-03-15 Thread Dennis Sweeney
Dennis Sweeney added the comment: There's an FAQ entry here: https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result -- ___ Python tracker <https://bugs.py

[issue47028] Incorrect behaviour when zipping a bunch of maps

2022-03-15 Thread Dennis Sweeney
Dennis Sweeney added the comment: https://bugs.python.org/issue45469 is similar. Thanks for the report, but I'll go ahead and close this. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python t

[issue47037] Build problems on Windows

2022-03-16 Thread Dennis Sweeney
Dennis Sweeney added the comment: indeed, bisected to 2cf7f865f099db11cc6903b334d9c376610313e8 is the first bad commit commit 2cf7f865f099db11cc6903b334d9c376610313e8 Author: Christian Heimes Date: Tue Mar 15 11:41:04 2022 +0200 bpo-46587: Skip tests if strftime does not support glibc

[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: Would there be substantial benefit of a new feature over using the existing feature and then calling str.replace()? >>> b = b'abracadabra' >>> "0x" + b.hex(":").replace(":", ", 0x"

[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: In particular, it's one ascii character: >>> b'abracadabra'.hex('😋') ValueError: sep must be ASCII. I wouldn't be completely opposed to allowing longer strings, but since there are easy enough ways to do it

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-17 Thread Dennis Sweeney
New submission from Dennis Sweeney : There was a discussion here: https://github.com/faster-cpython/ideas/discussions/269 Checking for whether the assignment target is the left-hand side, rather than just checking for the right refcount, is more stable and reduces the number of

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-17 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +30058 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31318 ___ Python tracker <https://bugs.python.org/issu

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-17 Thread Dennis Sweeney
Change by Dennis Sweeney : -- type: security -> performance ___ Python tracker <https://bugs.python.org/issue47053> ___ ___ Python-bugs-list mailing list Un

[issue47005] Improve performance of bytes_repeat

2022-03-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset ac8308d3eaf2526318c1bbf13d4a214fd24605d2 by Pieter Eendebak in branch 'main': bpo-47005: Improve performance of bytearray_repeat and bytearray_irepeat (GH-31856) https://github.com/python/cpython/commit/ac8308d3eaf2526318c1bbf13d4a21

[issue47005] Improve performance of bytes_repeat

2022-03-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: Thanks for the contribution -- that's a really nice speedup. -- ___ Python tracker <https://bugs.python.org/is

[issue47005] Improve performance of bytes_repeat

2022-03-17 Thread Dennis Sweeney
Change by Dennis Sweeney : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue47070] Improve performance of array_inplace_repeat

2022-03-19 Thread Dennis Sweeney
Dennis Sweeney added the comment: I'd bet we could add a couple of utility functions that could be used in multiple places, to keep the "trick" all in one place. Something like void _PyBytes_RepeatInPlace(char **buffer, size_t start_len, size_t end_len) { // Repeatedly dou

[issue47067] Add vectorcall for generica alias object

2022-03-20 Thread Dennis Sweeney
Dennis Sweeney added the comment: I profiled dict[str, int](a=1, b=2), and it looks like a decent chunk of time comes from PyUnicode_New as used by PyObject_SetAttrString. You could also try replacing PyObject_SetAttrString with PyObject_SetAttr and adding "__orig_class__" to

[issue46712] Share global string identifiers in deepfreeze

2022-03-20 Thread Dennis Sweeney
Dennis Sweeney added the comment: In bpo-47067, there was concern about the addition of the makefile target from PR 31637: regen-global-objects: regen-deepfreeze After a new `&_Py_ID(__orig_class__)` is added to Objects/genericaliasobject.c, running `make regen-global-objects` st

[issue47067] Add vectorcall for generica alias object

2022-03-21 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 1ea055bd53ccf976e88018983a3c13447c4502be by penguin_wwy in branch 'main': bpo-47067: Optimize calling GenericAlias objects (GH-31996) https://github.com/python/cpython/commit/1ea055bd53ccf976e88018983a3c13

[issue47094] index doesn't change while looping through same elements in a list

2022-03-22 Thread Dennis Sweeney
Dennis Sweeney added the comment: The help text says this: >>> help(list.index) Help on method_descriptor: index(self, value, start=0, stop=9223372036854775807, /) Return first index of value. Raises ValueError if the value is not present.

[issue47012] Speed up iteration of bytes and bytearray

2022-03-23 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset bd1cf6ecee76bcdce87b4f69567b95756ecf5a4c by Kumar Aditya in branch 'main': bpo-47012: speed up iteration of bytes and bytearray (GH-31867) https://github.com/python/cpython/commit/bd1cf6ecee76bcdce87b4f69567b95756ecf5a4c -

[issue47114] random.choice and random.choices have different distributions

2022-03-24 Thread Dennis Sweeney
Dennis Sweeney added the comment: Possible duplicate of https://bugs.python.org/issue44080 -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/issue47

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-26 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +30202 pull_request: https://github.com/python/cpython/pull/32122 ___ Python tracker <https://bugs.python.org/issue47

[issue47116] Use _PyLong_FromUnsignedChar in bytearrayobject.c

2022-03-26 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset c23ddf5ec229b7302437a1cf32d366df5cc5b837 by Pieter Eendebak in branch 'main': bpo-47116: use _PyLong_FromUnsignedChar instead of PyLong_FromLong (GH-32110) https://github.com/python/cpython/commit/c23ddf5ec229b7302437a1cf32d366

[issue47116] Use _PyLong_FromUnsignedChar in bytearrayobject.c

2022-03-26 Thread Dennis Sweeney
Dennis Sweeney added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue47132] Move tests from setobject.c to _testcapimodule

2022-03-26 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue47132> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47070] Improve performance of array_inplace_repeat

2022-03-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 850687df47b03e98c1433e6e70e71a8921eb4454 by Pieter Eendebak in branch 'main': bpo-47070: Add _PyBytes_Repeat() (GH-31999) https://github.com/python/cpython/commit/850687df47b03e98c1433e6e70e71a

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 788154919c2d843a0a995994bf2aed2d074761ec by Dennis Sweeney in branch 'main': bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122) https://github.com/python/cpython/commit/788154919c2d843a0a995994bf2aed

[issue47157] bijective invertible map

2022-03-29 Thread Dennis Sweeney
Dennis Sweeney added the comment: see also https://bugs.python.org/issue44931 -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/issue47

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-29 Thread Dennis Sweeney
Dennis Sweeney added the comment: Out of curiosity, what are the use cases for adding nodes after get_ready has already produced nodes? I was wondering about avoiding the need to call prepare() by having it automatically do the cycle-checking at the first get_ready() call and then raising

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-29 Thread Dennis Sweeney
Dennis Sweeney added the comment: > depends on an already-yielded node I mean "creates a new not-yet-yielded dependency for an already-yielded node". -- ___ Python tracker <https://bugs.pytho

[issue47009] Streamline list.append for the common case

2022-04-01 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +30310 pull_request: https://github.com/python/cpython/pull/32239 ___ Python tracker <https://bugs.python.org/issue47

[issue47214] builtin_function_or_method is also either a function or a method

2022-04-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: https://docs.python.org/3/library/inspect.html#inspect.isfunction says this: """ inspect.isfunction(object) Return True if the object is a Python function, which includes functions created by a lambda expression. """ Emphasis o

[issue47221] Bug or bad performance

2022-04-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I believe this is a duplicate of this issue: https://bugs.python.org/issue45542 -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/issue47

[issue47221] chained comparisons slower than using `and`

2022-04-04 Thread Dennis Sweeney
Change by Dennis Sweeney : -- title: Bug or bad performance -> chained comparisons slower than using `and` ___ Python tracker <https://bugs.python.org/issu

[issue47221] chained comparisons slower than using `and`

2022-04-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: Feel free to comment on that issue if you have any ideas about how to address the concerns there. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using multiple comparison operators can cause perfor

[issue45542] Using multiple comparison operators can cause performance issues

2022-04-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: https://bugs.python.org/issue47221 was opened as a duplicate of this. Unless there are any new ideas for getting around the concerns here, I think this can be closed. -- status: open -> pending ___ Python trac

[issue45542] Using multiple comparison operators can cause performance issues

2022-04-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: For reference, chaining is about 1.18x slower in this microbenchmark on GCC: ./python -m pyperf timeit -s "x = 100" "if 10 < x < 30: print('no')" --duplicate=10 . Mean +- std dev: 21.3 ns +- 0.2 ns .

[issue47226] if we write a line of code like i wrote keys = pygame.key.get_pressed() is showing error

2022-04-04 Thread Dennis Sweeney
New submission from Dennis Sweeney : What error message? -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/issue47226> ___ ___ Python-bug

[issue47009] Streamline list.append for the common case

2022-04-05 Thread Dennis Sweeney
Dennis Sweeney added the comment: Buildbots are passing, so I'm closing this. Thanks for the catch and fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue47248] Possible slowdown of regex searching in 3.11

2022-04-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: Possibly related to the new atomic grouping support from GH-31982? -- nosy: +Dennis Sweeney, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue47

[issue43010] @functools.wraps and abc.abstractmethod interoperability

2021-03-13 Thread Dennis Sweeney
Dennis Sweeney added the comment: I don't think changing @wraps is what you want. Even if you manually set `wrapper.__isabstractmethod__ = False`, you won't reach `print('f is called!')`, since f() is overridden by the child. And if you do that, the ABC wouldn't

[issue43010] @functools.wraps and abc.abstractmethod interoperability

2021-03-13 Thread Dennis Sweeney
Dennis Sweeney added the comment: > the ABC wouldn't have any abstract methods, I was wrong about this since the @abstractmethod decorator adds 'f' to the __abstractmethods__ set of the ABC, but the rest of my comment stands. --

[issue43585] perf_counter() returns computers uptime

2021-03-21 Thread Dennis Sweeney
Dennis Sweeney added the comment: Can you explain why you think this is the wrong behavior, and what operating system and version of Python you're using? from https://docs.python.org/3/library/time.html#time.perf_counter Return the value (in fractional seconds) of a performance co

[issue43010] @functools.wraps and abc.abstractmethod interoperability

2021-03-22 Thread Dennis Sweeney
Dennis Sweeney added the comment: Did you try adding updated=()? @functools.wraps(_internal_main_operation, updated=()) def external_main_operation(self, *args, **kwargs): -- ___ Python tracker <https://bugs.python.org/issue43

[issue43010] @functools.wraps and abc.abstractmethod interoperability

2021-03-22 Thread Dennis Sweeney
Dennis Sweeney added the comment: > other attributes will not be copied The signature of wraps() is wraps(wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',

[issue43685] __call__ not being called on metaclass

2021-03-31 Thread Dennis Sweeney
Dennis Sweeney added the comment: typing.cast doesn't actually do anything, it only exists as a hint for type-checkers. As William noted, using the 3-argument type(...) as you showed will only return a type, not a mcs. I think you may want super().__new__(mcs, name, bases, name

[issue43686] re.match appears to hang with certain combinations of pattern and string

2021-03-31 Thread Dennis Sweeney
Dennis Sweeney added the comment: It's well-known that regular expressions can take exponential time. You can try searching this bug tracker for "re exponential". Common suggestions are to try a third-party module, or to write better regexes where possible. Note that the im

[issue43719] Master build failure on Windows getting file system encoding

2021-04-03 Thread Dennis Sweeney
Dennis Sweeney added the comment: I ran into the same issue on Windows 10 and git bisected it to the same first bad commit, fcb55c0037baab6f98f91ee38ce84b6f874f034a The issue persists after rm .\Parser\__pycache__\* My .\Tools directory has no __pycache__. -- nosy: +Dennis Sweeney

[issue27129] Wordcode, part 2

2021-04-03 Thread Dennis Sweeney
Dennis Sweeney added the comment: I notice this in _bootstrap_external.py: the magic number did not get changed, only the comment: # Python 3.10a2 3433 (RERAISE restores f_lasti if oparg != 0) # Python 3.10a6 3434 (PEP 634: Structural Pattern Matching) # Python 3.10a7 3435 Use

[issue27129] Wordcode, part 2

2021-04-03 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +23913 pull_request: https://github.com/python/cpython/pull/25172 ___ Python tracker <https://bugs.python.org/issue27

[issue43719] Master build failure on Windows getting file system encoding

2021-04-03 Thread Dennis Sweeney
Dennis Sweeney added the comment: I could not successfully build even with deletion of __pycache__ in subfolders. I finally got the build to succeed after changing the magic number, so I opened GH-25069. -- ___ Python tracker <ht

[issue43719] Master build failure on Windows getting file system encoding

2021-04-03 Thread Dennis Sweeney
Dennis Sweeney added the comment: Correction: I opened GH-25172 -- ___ Python tracker <https://bugs.python.org/issue43719> ___ ___ Python-bugs-list mailin

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-04-06 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +Dennis Sweeney nosy_count: 1.0 -> 2.0 pull_requests: +23962 pull_request: https://github.com/python/cpython/pull/25225 ___ Python tracker <https://bugs.python.org/issu

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-04-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: Looks like we both opened PRs in the same minute. The MAGIC constant didn't get updated, but perhaps that can just be included in the Minor Corrections PR. I'd bet a CI check could be added to check that if the opcodes change th

[issue43751] await anext() returns None when default is given

2021-04-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: I can open a PR this evening, but I think this is close to the issue: PyIter_Next() already silences StopIteration, so checking for it afterward fails. diff --git a/Objects/iterobject.c b/Objects/iterobject.c index f0c6b79917..95f4659dc9 100644 --- a

[issue43751] await anext() returns None when default is given

2021-04-06 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +23976 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25238 ___ Python tracker <https://bugs.python.org/issu

[issue43751] await anext() returns None when default is given

2021-04-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: That change fixes that bug, but I think there may be another bug involving when a custom async iterator is passed rather than an async generator. This is at the limit of my knowledge, so any guidance would be appreciated. The test I wrote in the PR

[issue31861] add aiter() and anext() functions

2021-04-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: A bug was reported in anext(): https://bugs.python.org/issue43751 -- nosy: +Dennis Sweeney ___ Python tracker <https://bugs.python.org/issue31

[issue43751] await anext() returns None when default is given

2021-04-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: Okay, the PR should fix those problems now. I am still apprehensive about whether all of the corner cases are covered, so reviews are welcome, as are suggestions of more test cases. -- ___ Python tracker <ht

[issue43884] Cannot cleanly kill a subprocess using high-level asyncio APIs

2021-04-19 Thread Dennis Sweeney
Dennis Sweeney added the comment: Running kill_subprocess.py on Windows 10, I get these results: Python 3.7.2 (tags/v3.7.2:9a3ffc0492) - raises NotImplementedError in base_events.py, _make_subprocess_transport Python 3.8.2 (tags/v3.8.2:7b3ab59) - Success Python 3.9.0 (tags/v3.9.0

[issue38530] Offer suggestions on AttributeError and NameError

2021-04-24 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +Dennis Sweeney nosy_count: 8.0 -> 9.0 pull_requests: +24304 pull_request: https://github.com/python/cpython/pull/25584 ___ Python tracker <https://bugs.python.org/issu

[issue38530] Offer suggestions on AttributeError and NameError

2021-04-24 Thread Dennis Sweeney
Dennis Sweeney added the comment: I opened PR 25584 to fix this current behavior: >>> v Traceback (most recent call last): File "", line 1, in NameError: name 'v' is not defined. Did you mean: 'id'? >>> vv Traceback (most recent call last)

[issue38530] Offer suggestions on AttributeError and NameError

2021-04-30 Thread Dennis Sweeney
Dennis Sweeney added the comment: Some research of other projects: LLVM [1][2] --- - Compute Levenshtein - Using O(n) memory rather than O(n^2) - Uses UpperBound = (len(typo) + 2) // 3 GCC [3] --- - Uses Damerau-Levenshtein distance - Counts transpositions like "

[issue38530] Offer suggestions on AttributeError and NameError

2021-05-01 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +24466 pull_request: https://github.com/python/cpython/pull/25776 ___ Python tracker <https://bugs.python.org/issue38

[issue38530] Offer suggestions on AttributeError and NameError

2021-05-01 Thread Dennis Sweeney
Dennis Sweeney added the comment: PR 25776 is a work in progress for what it might look like to do a few things: - Make case-swaps half the cost of any other edit - Refactor Levenshtein code to not use memory allocator, and to bail early on no match. - Add comments to Levenshtein distance

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-03 Thread Dennis Sweeney
New submission from Dennis Sweeney : After bpo-38530, I get this in the python shell: Python 3.10.0b1 (tags/v3.10.0b1:ba42175, May 3 2021, 20:22:30) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more info

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-03 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue44026> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I'm not sure if this helps, but this is the relevant tree of callers: suggestions.c: _Py_Offer_Suggestions() (the expected behavior) is only referenced by pythonrun.c: print_exception(), which is only referenced by pythonrun.c: print_exception_recu

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: PyErr_Display() grabs the current sys.stderr and writes to that, but it looks like IDLE never gets to call PyErr_Display(). -- ___ Python tracker <https://bugs.python.org/issue44

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: It looks like Lib/idlelib/run.py : print_exception() re-implements the traceback, rather than relying on sys.excepthook -- ___ Python tracker <https://bugs.python.org/issue44

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: Indeed, this change enables the feature for IDLE, though I'm not sure what it breaks. diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 07e9a2bf9c..319b16f311 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -569,7 +569,7 @@ def ru

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: Another idea: do what test_exceptions() does: try: f() except NameError as exc: with support.captured_stderr() as err: sys.__excepthook__(*sys.exc_info()) self.assertNotIn("a1", er

[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I unfortunately don't have the time/internet access this week to do a PR. -- ___ Python tracker <https://bugs.python.org/is

[issue44071] Syntax error in Python3 documentation

2021-05-07 Thread Dennis Sweeney
Dennis Sweeney added the comment: I think the docs are correct. For example: >>> import subprocess >>> subprocess.run("ls", check=True, stdout=subprocess.PIPE).stdout >>> subprocess.check_output("ls") -- nosy: +Dennis Sweeney ___

[issue44080] Bias in random.choices(long_sequence)

2021-05-08 Thread Dennis Sweeney
New submission from Dennis Sweeney : Problem: Random.choices() never returns sequence entries at large odd indices. For example: >>> import random >>> [x % 2 for x in random.choices(range(2**53), k=20)] [0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1] &

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Dennis Sweeney
Dennis Sweeney added the comment: Your suspicion looks correct, random() is faster: .\python.bat -m pyperf timeit -s "from random import choices" "choices(range(100), k=10_000)" Before int_choices.diff: Mean +- std dev: 1.49 ms +- 0.09 ms After int_choices.diff: Mean

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Dennis Sweeney
Dennis Sweeney added the comment: I tried some debugging code: diff --git a/Python/ceval.c b/Python/ceval.c index f745067069..a8668dbac2 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4864,6 +4864,18 @@ get_exception_handler(PyCodeObject *code, int index) return res

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +24662 pull_request: https://github.com/python/cpython/pull/26012 ___ Python tracker <https://bugs.python.org/issue40

<    1   2   3   4   5   6   >