[issue2521] ABC caches should use weak refs

2011-05-13 Thread H.
H. added the comment: ImportError: No module named _weakrefset Here are some references while i was trying to install Pinax framework. http://paste.pound-python.org/show/6536/ And i saw that the _weakrefset.py is not included in the package. So I have copied from Python's source with ve

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-10 Thread Andreas H.
New submission from Andreas H. : The __eq__ method of ForwardRef does not take into account the module parameter. However, ForwardRefs with dissimilar module parameters are referring to different types even if they have different name. Thus also the ForwardRef's with same nam

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-10 Thread Andreas H.
Andreas H. added the comment: I will give it a try. -- ___ Python tracker <https://bugs.python.org/issue46333> ___ ___ Python-bugs-list mailing list Unsub

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-12 Thread Andreas H.
Andreas H. added the comment: Yeah, sure. The use-case is (de)serialization. Right now I use the library cattr, but there are many others. If you are interested there is related discussion in the cattr board [1]. The original problem is how to define the types for serialization. 1. If

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-12 Thread Andreas H.
Andreas H. added the comment: Ah, let me add one point: PEP563 (-> `from __future__ import annotations`) is also not helping. Even with PEP563 enabled, the JSON example Json = Union[ List['Json'], Dict[str, 'Json'], int, float, bool, None ] needs to be writte

[issue46369] get_type_hints does not evaluate ForwardRefs inside NewType

2022-01-13 Thread Andreas H.
New submission from Andreas H. : Consider the following: NewT = typing.NewType("NewT", typing.List[typing.Optional['Z']] ) class Z: pass Now get_type_hints() does not resolve the ForwardRef within NewType (but it does so for TypedDict, dataclasses, Na

[issue46371] A better way to resolve ForwardRefs in type aliases across modules

2022-01-13 Thread Andreas H.
New submission from Andreas H. : (De)Serialization of in-memory data structures is an important application. However there is a rather unpleasant issue with ForwardRefs. One cannot export type aliases when they contain ForwardRefs (and expect things to work). Consider the example

[issue46373] TypedDict and NamedTuple do not evaluate cross-module ForwardRef in all cases

2022-01-14 Thread Andreas H.
New submission from Andreas H. : TypedDict does not resolve cross-module ForwardRefs when the ForwardRef is not a direct one. In other words the fix GH-27017 (issue 41249) for TypedDict seems incomplete. The same issue seem to exist for NamedTuple. Example: #module.py TD

[issue46369] get_type_hints does not evaluate ForwardRefs inside NewType

2022-01-14 Thread Andreas H.
Andreas H. added the comment: Allright. B) sounds good to me. I dont think I have time today, so please feel to tackle the issue. If not I can look at it the next week. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-02-11 Thread Andreas H.
Change by Andreas H. : -- pull_requests: +29443 pull_request: https://github.com/python/cpython/pull/31283 ___ Python tracker <https://bugs.python.org/issue46

[issue45184] Add `pop` function to remove context manager from (Async)ExitStack

2022-02-23 Thread Andreas H.
Andreas H. added the comment: Inside the discussion an ExitPool class is sketched (https://mail.python.org/archives/list/python-id...@python.org/message/66W55FRCYMYF73TVMDMWDLVIZK4ZDHPD/), which provides this removal of context managers. What I learned is that this would have different

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-28 Thread Jonas H.
Jonas H. added the comment: Does that look good to you? If it does, I'll go on using the script (http://paste.pocoo.org/show/396661/) on the 3.x docs. -- keywords: +patch Added file: http://bugs.python.org/file22164/p1.patch ___ Python tr

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-29 Thread Jonas H.
Jonas H. added the comment: Linking a class using a function directive is counter-intuitive. That's why we need to make use of class directives rather than function directives here. -- ___ Python tracker <http://bugs.python.org/is

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-30 Thread Jonas H.
Jonas H. added the comment: I'm not. My patch doesn't address the problem of unlinkable methods but wrong type declarations (read, wrong usage of ".. function::" directives) for builtins like int, float, bool, list etc. Because the directives change, the roles used to

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-30 Thread Jonas H.
Jonas H. added the comment: > Could you make an effort to accept our word that using :class: instead of > :func: would bring zero value to the indexing system nor to human readers? I'm already doing; but I don't see anyone having made a good point against my preference of

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-30 Thread Jonas H.
Jonas H. added the comment: What's wrong with the changes I propose with the patch, then? Sorry, I really don't get it, no matter how hard I try. -- ___ Python tracker <http://bugs.python.o

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-30 Thread Jonas H.
Jonas H. added the comment: > when you mark up something with a mod, func, class or meth role, Sphinx will > find the target without paying attention to its type. So changing :func: to > :class: does not bring anything. >From a quick test this seems to hold true for links within

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-30 Thread Jonas H.
Jonas H. added the comment: > So the intersphinx behavior is the "correct" one, but we can't change the > other now because of compatibility. Could you be convinced to use that legacy behaviour for intersphinx, too? :-) -- _

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-06-01 Thread Jonas H.
Jonas H. added the comment: > Jonas, I owe you an apology [...] Thanks Éric, I got a bit worried about getting on your nerves... Based on Ezio's idea: What happens if we have both a ".. function:: foo" and ".. class:: foo" -- where do :func:`foo` and :class:`f

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-06-07 Thread Jonas H.
Jonas H. added the comment: Having one page with two objects of the same name, e.g. .. function:: foo .. class:: foo renders to two entries with the same anchor name (#foo). The first entry gets a link-to-this-paragraph marker, the second one doesn't. Internal references (from w

[issue12284] argparse.ArgumentParser: usage example option

2011-06-08 Thread Jonas H.
New submission from Jonas H. : I'd like to see an `examples` option added to argparse.ArgumentParser as found in many man pages. This could also be done using the `epilog` option, but that misses the "%(proc)s" replacement which makes usage examples like this Example usage:

[issue12284] argparse.ArgumentParser: usage example option

2011-06-09 Thread Jonas H.
Jonas H. added the comment: Nope. I want an "examples" section, for example from `man git log`: EXAMPLES git log --no-merges Show the whole commit history, but skip any merges git log v2.6.12.. include/scsi drivers/scsi Show all commits sin

[issue12877] Popen(...).stdout.seek(...) throws "Illegal seek"

2011-09-01 Thread Jonas H.
New submission from Jonas H. : from subprocess import Popen, PIPE p = Popen(['ls'], stdout=PIPE) p.wait() p.stdout.seek(0) Traceback (most recent call last): File "t.py", line 5, in p.stdout.seek(0) IOError: [Errno 29] Illegal seek Python 2.7.2, Arch Linu

[issue12877] Popen(...).stdout.seek(...) throws "Illegal seek"

2011-09-01 Thread Jonas H.
Jonas H. added the comment: Why does it have a 'seek' method then? -- ___ Python tracker <http://bugs.python.org/issue12877> ___ ___ Python-bugs-l

[issue1731717] race condition in subprocess module

2010-09-06 Thread Jonas H.
Changes by Jonas H. : -- nosy: +jonash ___ Python tracker <http://bugs.python.org/issue1731717> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-24 Thread Jonas H.
Changes by Jonas H. : Added file: http://bugs.python.org/file20874/faster-find-library1-py3k-with-escaped-name.diff ___ Python tracker <http://bugs.python.org/issue11

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-24 Thread Jonas H.
Jonas H. added the comment: As far as I can tell, it doesn't matter. We're looking for the part after the => in any case - ignoring the ABI/architecture information - so the regex would chose the first of those entries. -- ___ P

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-27 Thread Jonas H.
Jonas H. added the comment: Humm. Would be great to have the `ldconfig -p` output of such a machine... I can't get ldconfig to recognize 64-bit libraries on my 32-bit machines, so I have no output to test against... -- ___ Python tracker

[issue11345] Fix a link in library/json docs

2011-02-27 Thread Jonas H.
New submission from Jonas H. : I guess this should be a link. -- assignee: docs@python components: Documentation files: fix-json-link.diff keywords: patch messages: 129629 nosy: docs@python, jonash priority: normal severity: normal status: open title: Fix a link in library/json docs

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-27 Thread Jonas H.
Jonas H. added the comment: > the orig impl matches the abi_type at the beginning of the parentheses, > yours simply ignores the abi_type (that should have caught my eye, but that > regex looked so much like magic that I didn't try to make sense of it :-)) Same here. :) The vers

[issue4600] __class__ assignment: new-style? heap? == confusing

2011-02-27 Thread Jonas H.
Jonas H. added the comment: Here comes a patch, changing the behaviour to: ./python -q >>> class C: ... pass ... >>> (1).__class__ = 1 Traceback (most recent call last): File "", line 1, in TypeError: __class__ must be set to a class defined by a class stateme

[issue11484] `with_traceback` in 2.7 docs but not implemented

2011-03-13 Thread Jonas H.
New submission from Jonas H. : Either a `BaseException.with_traceback` implementation is missing or the docs are wrong. http://docs.python.org/library/exceptions.html?highlight=with_traceback#exceptions.BaseException.with_traceback python3 -c 'print("with_traceback" in di

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-04-19 Thread Jonas H.
Jonas H. added the comment: *push* Any way to get this into the codebase? -- ___ Python tracker <http://bugs.python.org/issue11258> ___ ___ Python-bugs-list m

[issue11975] Fix intersphinx-ing of built-in types (list, int, ...)

2011-05-01 Thread Jonas H.
New submission from Jonas H. : Intersphinx-ing of int, list, float, ... should work with ":class:`int`" (list, float, ...). Also, intersphinx-ing list methods, e.g. ":meth:`list.insert`", should work. -- assignee: docs@python components: Documentation message

[issue11976] Provide proper documentation for list data type

2011-05-01 Thread Jonas H.
New submission from Jonas H. : Provide a proper `list` method reference (like the one for `dict`, http://docs.python.org/library/stdtypes.html#dict). Right now, documentation about lists is spread over multiple topics (.rst files) and methods are documented in footnotes. Also, intersphinx

[issue11977] Document int.conjugate, .denominator, ...

2011-05-01 Thread Jonas H.
New submission from Jonas H. : Various `int` attributes and methods seem undocumented (at least it does not work to intersphinx them): * .conjugate * .denominator * .imag * .numerator * .real -- assignee: docs@python components: Documentation messages: 134926 nosy: docs@python, jonash

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-02 Thread Jonas H.
Jonas H. added the comment: Actually I need to be able to intersphinx (because my documentation work is not the Python docs :-) but I guess it boils down to the same problem of incomplete Sphinx module/class indices. -- ___ Python tracker <h

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-02 Thread Jonas H.
Jonas H. added the comment: Indeed they do; but documentation writers need to know that `int()` and `float()` are functions, which is counterintuitive. (and a CPython implementation detail) -- ___ Python tracker <http://bugs.python.org/issue11

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-06 Thread Jonas H.
Jonas H. added the comment: > Is this a problem in our markup or a bug in intersphinx? It's a markup problem -- those types are documented as functions, using the :func: role/`.. func::` directive. It's not only a markup mismatch but, strictly speaking, it's *wrong* docum

[issue11977] Document int.conjugate, .denominator, ...

2011-05-06 Thread Jonas H.
Jonas H. added the comment: It doesn't. Sphinx still can't make any links, which btw also means that it's impossible to reference those methods within the Python documentation. Also I want to point out that I find the information very hard to find as a human. The fact that int

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-06 Thread Jonas H.
Jonas H. added the comment: Shouldn't have used "decent" here, sorry. What I was trying to say is that there's no "reference-like" documentation for the list datatype (as for dict). There's more than enough quality documentation about lists but I think the

[issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc

2011-02-03 Thread H Xu
New submission from H Xu : Build python 2.6.6 and python 2.7.1 on a NetBSD-5.1-sparc machine. 1. Run './configure'; 2. Run 'make'; 3. Run 'make install'. There will be a problem after run 'make install'. The last few lines of error messages are like

[issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc

2011-02-03 Thread H Xu
H Xu added the comment: The result of 'make install SHELL="bash -x"' seems nothing different with the "make install". Could there be any other way to debug? -- ___ Python tracker <

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Jonas H.
New submission from Jonas H. : (This applies to all versions of Python I investigated, although the attached patch is for Python 2.7) I wondered why `import uuid` took so long, so I did some profiling. It turns out that `find_library` wastes at lot of time because of this crazy regular

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Jonas H.
Changes by Jonas H. : Added file: http://bugs.python.org/file20809/faster-find-library2.diff ___ Python tracker <http://bugs.python.org/issue11258> ___ ___ Python-bug

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Jonas H.
Jonas H. added the comment: (might also be related to http://bugs.python.org/issue11063) -- ___ Python tracker <http://bugs.python.org/issue11258> ___ ___ Pytho

[issue8415] namedtuple vs tuple

2010-04-15 Thread H Krishnan
New submission from H Krishnan : Named tuples and tuples have different creation behavior. Changing a tuple to a namedtuple will involve changing the usage as well. For example: >>> ntuple = collections.namedtuple("ntuple", "a,b") >>> ntuple(1,2) ntuple(a=

[issue8415] namedtuple vs tuple

2010-04-18 Thread H Krishnan
H Krishnan added the comment: Sorry, I didn't know about "python-ideas". Actually, there is a way to do this without breaking any existing code. namedtuple could support an optional additional argument, say, useIterableCtr, which is by default False, and the class te

[issue46657] Add mimalloc memory allocator

2022-03-23 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue46657> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Shmuel H.
New submission from Shmuel H. : Currently, `dataclasses.dataclass` will generate `__init__` only where the user has not defined one. However, sometimes, with frozen classes or dataclasses with a lot of members, redefinition of this function is not trivial, especially if the only purpose is

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Shmuel H.
Shmuel H. added the comment: I think it was designed to. However, it is not very usable in production for a number of reasons: 1. It won't work with frozen instances (you'll have to call `object.__setattr__` directly). 2. It gets very messy with more than one or two `InitVar`s whic

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Shmuel H.
Shmuel H. added the comment: The only other solution I could think about was to change setattr's behaviour dynamically so that it would be valid to call it from frozen instance's `__init__`, but I think it is somehow even worst. However, thanks for your help, I think we can clos

[issue43819] ExtensionFileLoader Does Not Implement invalidate_caches

2021-04-12 Thread Ian H
New submission from Ian H : Currently there's no easy way to get at the internal cache of module spec objects for compiled extension modules. See https://github.com/python/cpython/blob/20ac34772aa9805ccbf082e700f2b033291ff5d2/Python/import.c#L401-L415. For example, these module spec ob

[issue43870] C API Functions Bypass __import__ Override

2021-04-16 Thread Ian H
New submission from Ian H : Some of the import-related C API functions are documented as bypassing an override to builtins.__import__. This appears to be the case, but the documentation is incomplete in this regard. For example, PyImport_ImportModule is implemented by calling PyImport_Import

[issue43895] Unnecessary Cache of Shared Object Handles

2021-04-20 Thread Ian H
New submission from Ian H : While working on another project I noticed that there's a cache of shared object handles kept inside _PyImport_FindSharedFuncptr. See https://github.com/python/cpython/blob/b2b6cd00c6329426fc3b34700f2e22155b44168c/Python/dynload_shlib.c#L51-L55. It appears

[issue43895] Unnecessary Cache of Shared Object Handles

2021-04-20 Thread Ian H
Ian H added the comment: Proposed patch is in https://github.com/python/cpython/pull/25487. -- ___ Python tracker <https://bugs.python.org/issue43895> ___ ___

[issue43895] Unnecessary Cache of Shared Object Handles

2021-04-23 Thread Ian H
Change by Ian H : -- keywords: +patch pull_requests: +24282 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25487 ___ Python tracker <https://bugs.python.org/issu

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2021-06-29 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue1635741> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-06-29 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue40077> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2021-06-29 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue39511> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40601] [C API] Hide static types from the limited C API

2021-06-29 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue40601> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters

2021-06-29 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue15751> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2021-06-29 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue40522> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44795] asyncio.run does not allow for graceful shutdown of main task

2021-07-31 Thread Andreas H.
New submission from Andreas H. : The issue is that the main task (which was supplied to asyncio.run) has no chance to clean up its "own" sub-tasks and handle possible exceptions that occur during the sub-task clean up. It prevents a graceful shutdown. There is no way to prevent t

[issue45184] Add `pop` function to remove context manager from (Async)ExitStack

2021-09-13 Thread Andreas H.
New submission from Andreas H. : Currently it is not possible to remove context managers from an ExitStack (or AsyncExitStack). Workarounds are difficult and generally do accesses implementation details of (Async)ExitStack. See e.g. https://stackoverflow.com/a/37607405. It could be done as

[issue45184] Add `pop` function to remove context manager from (Async)ExitStack

2021-09-13 Thread Andreas H.
Andreas H. added the comment: I see your point. But even with `pop` or `remove` it is still a stack or stack-like. In the normal case the context managers are still released in reverse order as they were added. Order cannot be changed arbitrarily. There is just the additional function of

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-13 Thread Jonas H.
New submission from Jonas H. : re.match(p, ...) with a pre-compiled pattern p = re.compile(...) can be much slower than calling p.match(...). Probably mostly in cases with "easy" patterns and/or short strings. The culprit is that re.match -> re._compile can spend a lot of time

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-13 Thread Jonas H.
Change by Jonas H. : -- keywords: +patch pull_requests: +27224 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28936 ___ Python tracker <https://bugs.python.org/issu

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-15 Thread Jonas H.
Jonas H. added the comment: I agree with your statement in principle. Here are numbers for the slowdown that's introduced: Without the change: ./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i in range(512)]'\n'pat

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-15 Thread Jonas H.
Jonas H. added the comment: pat.match() has 110 nsec. Feel free to close the issue and PR if you think this isn't worth changing. -- ___ Python tracker <https://bugs.python.org/is

[issue44556] ctypes unittest crashes with libffi 3.4.2

2021-11-19 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue44556> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38779] Simple typo in strings module documentation

2019-11-12 Thread Michael H
New submission from Michael H : https://docs.python.org/3/tutorial/introduction.html#strings In the strings part of the basic tutorial, there is an output error regarding the escaping of the single quote >>> '"Isn\'t," they said.' '"Isn\'t,&qu

[issue38779] Simple typo in strings module documentation

2019-11-12 Thread Michael H
Michael H added the comment: Sorry, its my bad, it is correct as it is, I hadn't read further on about the print statement being needed. As I am working through the tutorial in pycharm, I am had already used print statement. T

[issue38779] Simple typo in strings module documentation

2019-11-12 Thread Michael H
Michael H added the comment: Many thanks! -- ___ Python tracker <https://bugs.python.org/issue38779> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42380] Build windows binaries with MS VS2019 16.8+ / MSVC 19.28+

2021-01-29 Thread h-vetinari
h-vetinari added the comment: Hey Terry I had asked about this on discuss (https://discuss.python.org/t/toolchain-upgrade-on-windows/6377/2), and Steve provided some very valuable input. In particular, building with the newer VS (that supports C11) should stay ABI-compatible with

[issue42380] Build windows binaries with MS VS2019 16.8+ / MSVC 19.28+

2021-01-29 Thread h-vetinari
h-vetinari added the comment: PS. > Judging from the link you posted to version numbering https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering the first line should have 'MSVC 14.28' the middle column title should be 'MS Visual Studio&#x

[issue42380] Build windows binaries with MS VS2019 16.8+ / MSVC 19.28+

2021-01-29 Thread h-vetinari
h-vetinari added the comment: PPS. Also, the compiler implementation reference uses 19.x for MSVC: https://en.cppreference.com/w/cpp/compiler_support, which was the link I was trying to make, now that I'm looking at it. -- ___ Python tr

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2021-02-10 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker <https://bugs.python.org/issue43112> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien H
Change by Julien H : -- components: +Library (Lib) -Demos and Tools versions: -Python 3.9 ___ Python tracker <https://bugs.python.org/issue41030> ___ ___ Pytho

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien H
Change by Julien H : -- title: Provide toList() method on iterators (`list()` is a flow killer in REPL) -> Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) ___ Python tracker <https://bugs.python.org/issu

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien H
Julien H added the comment: Hello Ammar Askar, I agree `_` avoids the "up arrow" problem I mentioned in the REPL. I actually primarily use jupyter notebooks in my work. Point 1. in my first message is the primary issue. Having to edit the line in two places to perform one

[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Natsumi H.
New submission from Natsumi H. : I suggest adding a function which behaves like map but without returning anything to iterate over a generator. This is useful in cases where you need to run a function on every element in a list without unnecessarily creating a generator object like map would

[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Natsumi H.
Natsumi H. added the comment: Exactly that was the plan! -- ___ Python tracker <https://bugs.python.org/issue41107> ___ ___ Python-bugs-list mailing list Unsub

[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Natsumi H.
Natsumi H. added the comment: If it won't be added do you reckon creating a library to solve this issue would be appropriate? -- ___ Python tracker <https://bugs.python.org/is

[issue42356] Dict inline manipulations

2020-11-14 Thread Tomek H
New submission from Tomek H : With Python3.9 there is a great feature for merging `dict`s: {1: 'a'} | {2: 'b'} => {1: 'a', 2: 'b'} It would be very handy to filter out a dict with a similar fashion (for example & operator with a list/tuple/froz

[issue42380] Build windows binaries with MS VS2019 16.8+ / MSVC 19.28+

2020-11-16 Thread h-vetinari
New submission from h-vetinari : While Visual Studio 16.8 (<-> MSVC 19.28) has _just_ been released, I think it would be worthwhile to consider upgrading the compiler toolchain that's used to build the CPython windows binaries, particularly before the release of 3.10. That

[issue14489] repr() function link on the built-in function documentation is incorrect

2012-04-03 Thread H Xu
New submission from H Xu : The `repr()` built-in function link in this page [ http://docs.python.org/library/functions.html ] should link to the built-in version of `repr()`. It should link to: http://docs.python.org/library/functions.html#repr However, it links to here: http

[issue1615158] POSIX capabilities support

2017-06-14 Thread Christian H
Changes by Christian H : -- nosy: +Christian H ___ Python tracker <http://bugs.python.org/issue1615158> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Christian H
Christian H added the comment: I was also bitten by this bug, and would like to see it merged. The patch 22536-subprocess-exception-filename-2.patch looks fine to me. -- nosy: +Christian H ___ Python tracker <http://bugs.python.org/issue22

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2017-05-26 Thread Marcel H
Marcel H added the comment: I want to see this fixed in python3.x as well, please :) the patch should be the same -- nosy: +Marcel H2 versions: +Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issue14

[issue32679] concurrent.futures should store full sys.exc_info()

2018-01-26 Thread Jonas H.
New submission from Jonas H. : Use case: Try to get a future's result using concurrent.futures.Future.result(), and log the full exception if there was any. Currently, only "excinst" (sys.exc_info()[1]) is provided with the Future.exception() method. Proposal: Add new

[issue32679] concurrent.futures should store full sys.exc_info()

2018-01-26 Thread Jonas H.
Jonas H. added the comment: See also https://stackoverflow.com/questions/19309514/getting-original-line-number-for-exception-in-concurrent-futures for other people having the same problem -- ___ Python tracker <https://bugs.python.org/issue32

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2017-11-08 Thread Jonas H.
Jonas H. added the comment: This affects me too. -- nosy: +jonash ___ Python tracker <https://bugs.python.org/issue31526> ___ ___ Python-bugs-list mailin

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-18 Thread Jonas H.
New submission from Jonas H. : I'd like to add test selection based on parts of the test class/method name to unittest. Similar to py.test's "-k" option: https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name Here&

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-18 Thread Jonas H.
Jonas H. added the comment: Just to be clear, the current implementation is limited to substring matches. It doesn't support py.test like "and/or" combinators. (Actually, py.test uses 'eval' to support arbitrary patterns.) So say we have test case SomeClass te

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Jonas H.
Jonas H. added the comment: Thanks Antoine. I will need some guidance as to what are the correct places to make these changes. I'm not quite sure about the abstractions here (runner, loader, suite, case, etc.) My PoC (see GitHub link in first post) uses a TestSuite subclass. (The sub

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Jonas H.
Jonas H. added the comment: > > 3) Is the approach of dynamically wrapping 'skip()' around to-be-skipped > > test cases OK? > I think this is the wrong approach. A test that isn't selected shouldn't be > skipped, it should not appear in the output at al

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-21 Thread Jonas H.
Jonas H. added the comment: Interesting, Victor. I've had a look at the code you mentioned, but I'm afraid it doesn't really make sense to re-use any of the code. Here's a new patch, implemented in the loader as suggested by Antoine, and with tests. I'm happy t

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Jonas H.
Jonas H. added the comment: Sure! -- ___ Python tracker <https://bugs.python.org/issue32071> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Jonas H.
Jonas H. added the comment: Ah, the problem isn't that it's running getattr() on test methods, but that it runs getattr() on all methods. Former code: attrname.startswith(prefix) and \ callable(getattr(testCaseClass, attrname)) New code: testFunc = getattr(tes

  1   2   >