[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi wyz23x2, did you do that from a clean interpreter? _ is set to the last non-None result: https://github.com/python/cpython/blob/dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0/Python/sysmodule.c#L690-L696 So what you are seeing is that (None and True) is None, but

[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This behaviour is documented at https://docs.python.org/3/library/sys.html#sys.displayhook. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41478] Empty representation of AssertionError

2020-08-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, can you not use its repr: >>> try: raise ValueError ... except Exception as e: print(f"Following happened: {e!r}") ... Following happened: ValueError() ? -- nosy: +remi.lapeyre ___ Pyt

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue41485> ___ ___ Python-bug

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is a known issue and I have a PR that does this that I could post but it was rejected when it was previously discussed: https://bugs.python.org/issue23229#msg233963 -- ___ Python tracker <ht

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > That's a solution, except you must know ahead of time this issue exists. If we changed str(e) to make it the same as repr(e), there would be no way to get only the message. str(e) returns the message so if the message given was empty (or no message w

[issue41511] Pathlib parents doesn't support slicing with negative indexes

2020-08-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is a duplicate of 21041, it would be better to change the title of your PR so that it points to this bug report and to continue the discussion there. -- nosy: +remi.lapeyre versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

[issue41511] Pathlib parents doesn't support slicing with negative indexes

2020-08-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: *This is a duplicate of issue 21041 -- ___ Python tracker <https://bugs.python.org/issue41511> ___ ___ Python-bugs-list mailin

[issue41552] uuid.uuid1() on certain Macs does not generate unique IDs

2020-08-14 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > The question then is: is there any way for the uuid module to recognize and > ignore such interfaces other than by the hardcoded MAC address? Could uuid1 xor all mac addresses on MacOS? The result would be deterministic and unique as long as there

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-20 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13353 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36906> ___ ___ Py

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @steven.daprano, @gregory.p.smith. I added the first version of my PR for review. One issue with it is that in: def f(): return " foo".dedent() f will have both " foo" and "foo" in its constants even if the first is

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Serhiy's message crossed with mine. And mine crossed with yours, sorry. I will update my PR shortly. -- ___ Python tracker <https://bugs.python.org

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Perform the optimization at the AST level, not in the peepholer. Thanks, this makes more sense. -- ___ Python tracker <https://bugs.python.org/issu

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Thanks @serhiy.storchaka, it's far easier to do here. I pushed the patch to the attached PR. Is there a reason the other optimisations in the Peephole optimizer are not done in the AST? -- ___ Python tracker &

[issue36969] pdb: do_args: display/handle keyword-only arguments

2019-05-20 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13361 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36969> ___ ___ Py

[issue36969] pdb: do_args: display/handle keyword-only arguments

2019-05-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Rémi, could you do a PR addressing co_posonlyargcount? Of course, should I open a new PR or post a patch to be added to a current PR? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issu

[issue36975] csv: undocumented UnicodeDecodeError on malformed file

2019-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : Added file: https://bugs.python.org/file48343/file0.txt ___ Python tracker <https://bugs.python.org/issue36975> ___ ___ Python-bugs-list mailin

[issue36975] csv: undocumented UnicodeDecodeError on malformed file

2019-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : Added file: https://bugs.python.org/file48342/csv_parser.py ___ Python tracker <https://bugs.python.org/issue36975> ___ ___ Python-bugs-list m

[issue36975] csv: undocumented UnicodeDecodeError on malformed file

2019-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : Added file: https://bugs.python.org/file48344/file1.txt ___ Python tracker <https://bugs.python.org/issue36975> ___ ___ Python-bugs-list mailin

[issue36975] csv: undocumented UnicodeDecodeError on malformed file

2019-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't understand the issue here, csv can raise many errors when an issue happens: >>> import csv >>> csv.reader(None) Traceback (most recent call last): File "", line 1, in TypeError: argument 1 must be an iterator Wh

[issue36969] pdb: do_args: display/handle keyword-only arguments

2019-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- pull_requests: +13369 ___ Python tracker <https://bugs.python.org/issue36969> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36969] pdb.do_args: display keyword-only and positional only arguments

2019-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- title: pdb: do_args: display/handle keyword-only arguments -> pdb.do_args: display keyword-only and positional only arguments ___ Python tracker <https://bugs.python.org/issu

[issue36975] csv: undocumented UnicodeDecodeError on malformed file

2019-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't think all errors can be documented, csv iterate over the object but has no idea what it is. When writing for example, anything could happen, from a socket timing out, permissions errors, the underlying media being removed not properly, the media h

[issue36230] Please sort assertSetEqual's output

2019-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Jess, are you still working on this? -- ___ Python tracker <https://bugs.python.org/issue36230> ___ ___ Python-bugs-list mailin

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-22 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13413 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue37011> ___ ___ Py

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-22 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @blueyed, can you confirm PR 13497 solve your issue ? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue37

[issue37033] Dictionary defaults .get(), .pop(), .setdefault()

2019-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @vykouk, Python evaluates arguments before calling functions so >>> dicti.get(key, dflt(key)) is equivalent to: >>> arg = dflt(key) >>> dicti.get(key, arg) Notive how dflt() is called before .get() This is how all functions wo

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2019-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Daniel, this is indeed unexpected, I don't see how to have a better patch since the fact that _getval() raise an exception is used in do_source() and do_whatis(). Could you convert your patch as a PR and add a test? -- nosy: +remi.la

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2019-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This part of the code is already used in three places and your patch would add two occurrences of of it, I think it would be great to put the part that print the exception in a private method, to avoid duplicating it all over the place. Doing this seems small

[issue35775] Add a general selection function to statistics

2019-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Steven, thanks for taking the time to reviewing my patch. Regarding the relevance of add select(), I was looking for work to do in the bug tracker and found some references to it (https://bugs.python.org/issue21592#msg219934 for example). I knew that there

[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I think it could be done with `key=lambda item: -item` if the key argument is added. -- ___ Python tracker <https://bugs.python.org/issue4

[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Can you not use functools.cmp_to_key() for this? Here's an example: >>> import bisect, functools >>> l = [('f', 5), ('d', 3), ('c', 2), ('b', 1), ('a', 0)] >>> def

[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue4356> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37055] Numerous warnings with blake2 module

2019-05-26 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Issue 33164 (commit 51aa35e9e17eef60d04add9619fe2a7eb938358c) introduced numerous new warnings on MacOS: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:192:9: warning: 'blake2b_init' macro redefined [-Wmacro-redefined] #define bl

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > The proposed change is not backward compatible. Indeed, I missed that thanks. I think I could fix that. > A motivation for this change should be provided first Is getting accurate coverage reports not

[issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call

2019-05-27 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13593 ___ Python tracker <https://bugs.python.org/issu

[issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call

2019-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: With the attached PR, the error message is now: >>> def f(): pass ... >>> code = f.__code__ >>> code.replace(co_lnotab=4) Traceback (most recent call last): File "", line 1, in TypeError: replace() argument 'co_lnota

[issue37102] Automatically dedent docstring constants by default

2019-05-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, I'm working on a PR. It should be ready in a couple of days. It's more involved than what I thought as to avoid importing inspect during compilation I will probably need to port cleandoc() in C. -- nosy: +re

[issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames

2019-06-03 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: It will be done automatically after someone validated the PR. -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue37

[issue37102] Automatically dedent docstring constants by default

2019-06-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is the function I inlined and as far as I can tell, my approach as been similar to the one you linked. I'm still need to fix some issues as doctest was expecting to find the string before dedenting t

[issue35954] Incoherent type conversion in configparser

2019-06-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > IMO we should at most clarify in the docs. This makes sense, I will update my PR tomorrow. -- ___ Python tracker <https://bugs.python.org/issu

[issue32884] Adding the ability for getpass to print asterisks when passowrd is typed

2019-06-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue32884> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37728] 'is' behaving differently in script and interactive shel

2019-07-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi rathinavelu thiruvenkatam, cPython has some optimizations where some immutable constants will be folded in the same object to save memory so this is not a bug, it's just that those optimization are not run when typing directly in the shell. You should

[issue37739] list(filter) returns [] ???

2019-08-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Su Zhu, this is expected, as per the documentation, filter returns an iterable and not a list. The first `list(a)` consumes the iterable so it is empty when doing the second `list(a)`. You can see the same behavior when creating an iterable manually: >&

[issue33997] multiprocessing Pool hangs in terminate()

2019-08-04 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue33997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33997] multiprocessing Pool hangs in terminate()

2019-08-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, I got bit by this bug last week, I wrote an example that reproduce the basic idea of our program main loop and it hangs - around 20% of the time with a release build of Python 3.7.4 - around 6% of the time with a debug build of Python 3.7, 3.8 and 3.9

[issue33997] multiprocessing Pool hangs in terminate()

2019-08-05 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- components: +Library (Lib) -Windows ___ Python tracker <https://bugs.python.org/issue33997> ___ ___ Python-bugs-list mailing list Unsub

[issue33997] multiprocessing Pool hangs in terminate()

2019-08-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Removed Python 3.6 as it is in security fixes now. -- versions: +Python 3.8, Python 3.9 -Python 3.6 Added file: https://bugs.python.org/file48532/test_multiprocessing.py ___ Python tracker <https://bugs.python.

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue35227> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Adding this API would require to provide a way to set file status like mode, uid, gid, mtime, type, linkname, uname and gname. Adding a new argument to gettarinfo looks weird to me, adding a new method may be better. I will try to propose a working

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Yes, but in the same way that there is the add method to conveniently build the TarInfo object for the user, shouldn't we provide a new convenience method to TarFile to support this (in addition to modifying Ta

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-26 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +9963 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35227> ___ ___ Py

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @mgorny, the changeset in PR 10714 should do what you are looking for. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Did you notice that `skipped 'Not supported'` will be displayed once per skipped subtest so changing your `for i in range(1, 3):` by `for i in range(1, 5):` will show: python3 -m unittest -v test_something (test2.SomeTest) ... skipped 

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I think this is a nice output, taking a quick look at unittest source, all the information needed to display this is save in the TestResult object, showing skipped tests is done here: https://github.com/python/cpython/blob/master/Lib/unittest/runner.py#L85 It

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I came across this thread while working on the PR, creating tarinfo as Lars Gustäbel suggests does not work since you still need to get the size before reading. Do you think the API should be different

[issue35338] set union/intersection/difference could accept zero arguments

2018-11-29 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: The intersection of an empty set of sets is either the empty set or the universe sets so if set.union() is defined to support set.union(*sequence), wouldn't it be less surprising for set.intersection() to return the empty set too? --

[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-12-02 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Thanks, this looks interesting. How will the file writer know the whole file has been read? The override of the Tar header is done on `close`? Are `download_tarinfo` and `svgz_tarinfo` built by hand if we don't make changes in `getta

[issue35540] dataclasses.asdict breaks with defaultdict fields

2018-12-29 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +10682, 10683 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35540] dataclasses.asdict breaks with defaultdict fields

2018-12-29 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +10682 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35540> ___ ___ Py

[issue35540] dataclasses.asdict breaks with defaultdict fields

2018-12-29 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch, patch pull_requests: +10682, 10683, 10684 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35540] dataclasses.asdict breaks with defaultdict fields

2018-12-29 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @wrmsr, this happens because the constructor for `collections.defaultdict` differs from the one of `dict`. I think the argument that collections.defaultdict is in the stdlib and should be supported is right, the changes in PR #11361 should do what you want

[issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability

2018-12-30 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +10710 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35232> ___ ___ Py

[issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability

2018-12-30 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +10710, 10711 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability

2018-12-30 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @Anthony.Lee, the __module__ is wrong indeed. The new changeset in https://github.com/python/cpython/pull/11371 should implement what you need. If you don't specify the new `module` and `qualname` parameters, make_dataclass() will try to determin

[issue35606] Add prod() function to the math module

2018-12-30 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @serhiy.storchaka, it should be possible to make it far simpler if we make math_prod_impl more naive by removing the hypothesis made on `iterable` and the many fast-paths like builtin_sum_impl() does when SLOW_SUM is defined, right? A naive implementation

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

2018-12-30 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, I think this is indeed a bug, `copy()` is expected to succeed. I was able to reproduce the issue in an interpreter but did not succeed to write a test case that triggers the race-condition. I think the fix you suggested is the right solution

[issue35624] Shelve sync issues while using Gevent

2018-12-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, thanks for opening a bug report. Can you provide a script that reproduce the issue? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue35

[issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1

2018-12-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I just tried your script in "9a3ffc" (3.7.2final) and "260ec2c36a" (3.7.1final) and it worked on both without halting the main process. I'm on MacOS Sierra, can you give more details about your environment? -

[issue33039] int() and math.trunc don't accept objects that only define __index__

2018-12-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: >I think we should also consider changing the type creation behaviour in 3.8 @ncoghlan is this what's being done in PyTypeReady? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org

[issue35629] hang and/or leaked processes with multiprocessing.Pool(...).imap(...)

2018-12-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Weirdly enough, it works with iPython: $ ipython3 Python 3.7.1 (default, Nov 6 2018, 18:49:54) Type 'copyright', 'credits' or 'license' for more information IPython 6.4.0 -- An enhanced Interactive Python. Type &#x

[issue35527] Make fields selectively immutable in dataclasses

2019-01-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @rhettinger, this is similar to #33474. I started working on an implementation of this. With the implementation you propose, if a field has both init=True and frozen=True, it may be set after the creation of the instance: @dataclass class

[issue35577] side_effect mocked method lose reference to instance

2019-01-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Is there a problem with: from unittest import mock class SomeClass: def do_something(self, x): pass def some_function(x): obj = SomeClass() y = obj.do_something(x) return y def do_something_side_effect(self, x): print(self

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-02 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I prepared a patch to make the check when there is only one dict, it may be the less surprising change. BTW, I got lost when looking for the root cause of this change because grepping for the error message did not work as it has line breaks

[issue35629] hang and/or leaked processes with multiprocessing.Pool(...).imap(...)

2019-01-02 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I believe that this is similar to https://bugs.python.org/issue35378 on which @pablogsal is working. You were right, the issue steems from a refcount bug. Until the resolution you can avoid the issue by explictly keeping a reference on the pool: >>&g

[issue35629] hang and/or leaked processes with multiprocessing.Pool(...).imap(...)

2019-01-02 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue35629> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8538] Add FlagAction to argparse

2019-01-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > I also removed myself from the issue, I'm not interested to implement it. I would like to try and implement the change. I will open a PR shortly. -- nosy: +remi.lapeyre ___ Python tracker <https://bugs

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +10987 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/iss

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +10987, 10988 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/iss

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch, patch pull_requests: +10987, 10988, 10989 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/iss

[issue8538] Add FlagAction to argparse

2019-01-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I made a first proposal for this feature in PR 11478, I had to adapt argparse.Action to customize how the action is represented in the usage string by adding a format_usage() method that would default to the current behavior if not overridden. Other methods

[issue35698] Division by 2 in statistics.median

2019-01-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: What do you think median([1, 1.0]) should return? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue35

[issue35397] Undeprecate and document urllib.parse.unwrap

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +10996 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35397> ___ ___ Py

[issue35397] Undeprecate and document urllib.parse.unwrap

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +10996, 10997 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35397] Undeprecate and document urllib.parse.unwrap

2019-01-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch, patch pull_requests: +10996, 10997, 10998 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > As a secondary school student, knowing the definition of median, I might > expect the value to be 2, for any n > 0. The secondary school student would be wrong, wouldn't he? The median of a set is not expected to be a part of the set. Especi

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: time.sleep() is probably not the only function to have such a bug. Maybe __int__() should default to: def __int__(self): return int(self.__float__()) when __float__ is defined and not __int__. Nick Coghlan suggested something similar for __int__

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue35707> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: See #33039 for the proposed change to __int__. -- ___ Python tracker <https://bugs.python.org/issue35707> ___ ___ Python-bug

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This does not do what you want: >>> class MyInt(int): pass >>> wibble(MyInt(4), MyInt(2)) 2.0 and a patch is only needed if something is broken. I'm with vstinner of the opinion that nothing is broken and vo

[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-10 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : When creating a class, I sometimes wish to get this behavior: def MyClass: def __init__(self, param): self._param = param def __repr__(self): return f"MyClass(param={self._param})" Unless I'm mak

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-01-11 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: The off-by-one error in a test added for an unrelated issue (#17467) makes me think @michael.foord just made a mistake in the test. > mock_open docs mentions about using a customized mock for complex cases I think it's more for complex things like fetch

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +11098 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31855> ___ ___ Py

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch pull_requests: +11098, 11099 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch, patch, patch pull_requests: +11098, 11099, 11100 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue27015] subprocess.CalledProcessError's repr changes based on kwargs, and doesn't unpickle

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue27015> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35717] enum.Enum error on sys._getframe(2)

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue35717> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- pull_requests: +11101 ___ Python tracker <https://bugs.python.org/issue17467> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- pull_requests: +11101, 11102 ___ Python tracker <https://bugs.python.org/issue17467> ___ ___ Python-bugs-list mailing list Unsub

[issue17467] Enhancement: give mock_open readline() and readlines() methods

2019-01-11 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- pull_requests: +11101, 11102, 11103 ___ Python tracker <https://bugs.python.org/issue17467> ___ ___ Python-bugs-list mailing list Unsub

<    1   2   3   4   5   6   >