Rémi Lapeyre <remi.lape...@henki.fr> added the comment:
Hi, I'm taking a look this issue, it look like a new type
`PyDictRevIterKey_Type` needs to be defined with its associated methods. I will
try to implement the modifications ; this is the first time i'm taking a dive
in Python's int
Rémi Lapeyre <remi.lape...@henki.fr> added the comment:
Hi Serhiy Storchaka, I will update the PR to implement this functionality in
the views too
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Rémi Lapeyre <remi.lape...@henki.fr> added the comment:
This change does add built-in types but I think it's a reasonable expectation
as a python user to be able to do reversed(dict(a=1, b=20) since the order is
know defined in the specifications. It seems inconsistent to have an
Rémi Lapeyre <remi.lape...@henki.fr> added the comment:
>> I think it's a reasonable expectation as a python user to be able to do
>> reversed(dict(a=1, b=20) since the order is know defined in the
>> specifications.
> I agree about "reasonable e
Rémi Lapeyre <remi.lape...@henki.fr> added the comment:
Since there seems to be a consensus about this change being too much, should we
go back to the first proposal to implement dict.__reversed__ only and not
reversed for the views, this would greatly reduce the bload or dump
Rémi Lapeyre <remi.lape...@henki.fr> added the comment:
I updated the pull request, now reversed work on the dict and dict views:
➜ cpython git:(master) ./python.exe
Python 3.8.0a0 (heads/master-dirty:128576b88c, May 23 2018, 16:33:46)
[Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type
Rémi Lapeyre added the comment:
Hi INADA thanks for the benchmark, I did both of them too and got the same
results (though I had to apply https://github.com/python/performance/pull/41 to
get the performance module working).
Should I apply your patch in PR 6827
Rémi Lapeyre added the comment:
Hi, I took a look at the code of OrderedDict it's using the double linked-list
to iterate through the items using _odictnode_PREV and _odictnode_NEXT.
Since ordereddict needs to support move_to_end that will change the iterating
order while dict does
Rémi Lapeyre added the comment:
Thanks INADA, I made the necessary changes to _collections_abc. Is there
anything that I should change?
--
___
Python tracker
<https://bugs.python.org/issue33
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +7623
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue28657>
___
___
Py
Rémi Lapeyre added the comment:
Hi Błażej Michalik, can you confirm the attached patch fixed the issue for you?
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue28
Rémi Lapeyre added the comment:
Hi Pablo, I added two tests to confirm that file descriptors do not link
anymore.
The tests are rather ugly but I'm not sure if it's possible to do better.
Is this patch ok for you?
--
___
Python tracker
<ht
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +7624
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34005>
___
___
Py
Change by Rémi Lapeyre :
--
components: +Library (Lib), XML
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue34005>
___
___
Python-bug
Rémi Lapeyre added the comment:
Indeed, it is the exact same patch. Sorry about the duplicate.
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Rémi Lapeyre :
xmlrpc still makes use of formatargspec which is deprecated since Python 3.5
and raises a deprecation warning:
DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use
`signature` and the `Signature` object directly
The proposed patch replace
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +7474
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33927>
___
___
Py
Rémi Lapeyre added the comment:
Hi, I proposed a path in https://github.com/python/cpython/pull/7865, I'm not
sure if I can apply the label `skip news` or if only a reviewer can.
--
___
Python tracker
<https://bugs.python.org/issue33
Rémi Lapeyre added the comment:
This seems like a difficult problem to tackle in all cases, if two dataclasses
reference each other the cycle could be complex to identify and introduce
complexity.
The way repr is defined is part of PEP 557 and actually force this behavior.
Should the `repr
Rémi Lapeyre added the comment:
Hi Michael, looking at the current code of json.tool, there is no reason for it
not to be able to do this, I will a patch to do this tonight.
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.
Rémi Lapeyre added the comment:
Hi, is everything good with attached PR or should I refactor it further?
--
___
Python tracker
<https://bugs.python.org/issue33
Rémi Lapeyre added the comment:
Hi Serhiy and Inada, is there a reason not to move forward with this patch?
--
___
Python tracker
<https://bugs.python.org/issue33
Rémi Lapeyre added the comment:
Hi Evegeny, I was able to reproduce the issue, if it's all right for you I
would like to post a PR to solve the issue and extend the test suite od this
module.
--
nosy: +remi.lapeyre
___
Python tracker
<ht
Rémi Lapeyre added the comment:
Hi Raymond, would updating the attached PR to change
https://github.com/remilapeyre/cpython/blob/7c78350f8903f162e5f70ee147c0e97cb1ed5181/Lib/cmd.py#L270
(and others) from `compfunc = getattr(self, 'complete_' + cmd)` to `compfunc =
getattr(self.__class__
Rémi Lapeyre added the comment:
Hi Pablo, while this patch should fix both problems, I'm not sure how to write
a regression test for this, `assert_python_ok` in
https://github.com/python/cpython/pull/7865/files#diff-7d4645839a05727ebdf39226fd56e29cR97
forks the interpreter so I'm not sure I
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue35120>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue23930>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue34950>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue34510>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue10486>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
This is not a valid cookie string and I think neither Django nor Nginx would
understand this cookie correctly.
On the other hand, per RFC 6265 the comma is a forbidden character in a cookie
value (https://tools.ietf.org/html/rfc6265#section-4.1.1
Rémi Lapeyre added the comment:
This is indeed an issue with formataddr, it expects the input to be ascii
encoded as RFC 2822 requires.
Email is much more complicated though and has been internationalized, a summary
of this work is available at
https://en.wikipedia.org/wiki/Email_address
Rémi Lapeyre added the comment:
Hi Glenn, I'm not aware of a document that defines CGI better than the RFC and
I don't know it enough to disgress from the published standard (even if it is
not what isdone today as I don't know the current practices enough).
Here is the variables defined
Rémi Lapeyre added the comment:
The reference given in
https://github.com/python/cpython/blob/b36b0a3765bcacb4dcdbf12060e9e99711855da8/Lib/http/server.py#L1074
is not accessible anymore.
I think we should replace it by https://tools.ietf.org/html/rfc3875#section-4.1
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +9752
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue23930>
___
___
Py
Rémi Lapeyre added the comment:
AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE, REMOTE_USER are present
REMOTE_IDENT is not but I'm not sure it's worth adding.
I can send a PR to add REMOTE_HOST and remove the condition for QUERY_STRING.
Otherwise, I don't think the other environment variables
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/issu
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?
--
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
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 '?' for help.
In [1]: import
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
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
Change by Rémi Lapeyre :
--
keywords: +patch, patch
pull_requests: +10682, 10683
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +10682
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35540>
___
___
Py
Change by Rémi Lapeyre :
--
keywords: +patch, patch, patch
pull_requests: +10682, 10683, 10684
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
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
Change by Rémi Lapeyre :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue35629>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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.pyth
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +11260
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue27015>
___
___
Py
Change by Rémi Lapeyre :
--
keywords: +patch, patch, patch
pull_requests: +11260, 11261, 11262
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
keywords: +patch, patch
pull_requests: +11260, 11261
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
I tried to fix the issue, the attached PR solves the issue of saving the kwargs
and unpickling the exception but I was not able to fix a regression I caused in
test_memory_error_in_PyErr_PrintEx.
--
versions: +Python 3.6, Python 3.7, Python 3.8
Rémi Lapeyre added the comment:
As the name been already discussed ?
I fear that topsort might only be clear to people already knowing what it does.
topoligical_sort would be more discoverable and explicit and one can always do
from functools import topological_sort as tsort
if he
Rémi Lapeyre added the comment:
Is this proposal still relevant? If so, I would like to work on its
implementation.
I think the third proposition to change the API to have a new `weights`
parameter is the best has it does not blindly suppose that a tuple is a pair
(value, weight) which
Change by Rémi Lapeyre :
--
versions: +Python 3.8 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue20479>
___
___
Python-bugs-list mailing list
Unsub
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue20399>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
I suggest we closed this issue in favor of #35775 to discuss adding a selection
function and the attached PR.
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue30
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +11337
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35775>
___
___
Py
Change by Rémi Lapeyre :
--
nosy: +rhettinger, steven.daprano
___
Python tracker
<https://bugs.python.org/issue35775>
___
___
Python-bugs-list mailing list
Unsub
Change by Rémi Lapeyre :
--
keywords: +patch, patch
pull_requests: +11337, 11338
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
Like discussed in #30999, the attached PR adds a general selection function to
the statistics module. This allows to simply get the element at a given
quantile of a collection.
https://www.cs.rochester.edu/~gildea/csc282/slides/C09-median.pdf
Rémi Lapeyre added the comment:
Wouldn't be the 5-th percentile be select(data, round(len(data)/20)?
--
___
Python tracker
<https://bugs.python.org/issue35
Rémi Lapeyre added the comment:
> 2) Topological sorting usually is well-defined on totally connected graphs,
> so I do not know what exactly it means to topologically sort two disjoint
> graphs. This was one of the main drawbacks of the tuple-based approach, but I
> think it m
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +11286
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35734>
___
___
Py
Rémi Lapeyre added the comment:
I opened https://github.com/python/cpython/pull/11591 to remove
_valid_mask_octets, _is_valid_netmask and _is_hostmask from ipaddress, the
patch proposed in issue27860 has a larger scope so it's probably better to
remove those unused methods in this issue
Change by Rémi Lapeyre :
--
keywords: +patch, patch
pull_requests: +11286, 11287
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
keywords: +patch, patch, patch
pull_requests: +11286, 11287, 11288
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue35761>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
I changed the subject of this issue as the scope of issue27860 is larger. I
will review them and open a new PR for them if appropriate once this one is
accepted.
--
title: ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask
like
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 `gettarinfo
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?
--
nosy
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
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 TarInfo
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue35227>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +9963
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35227>
___
___
Py
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 'Not supported
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
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
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. Especially
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__
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 vote to
Change by Rémi Lapeyre :
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/issue35707>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
See #33039 for the proposed change to __int__.
--
___
Python tracker
<https://bugs.python.org/issue35707>
___
___
Python-bug
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 making a
Change by Rémi Lapeyre :
--
keywords: +patch, patch, patch
pull_requests: +11098, 11099, 11100
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
pull_requests: +11101, 11102, 11103
___
Python tracker
<https://bugs.python.org/issue17467>
___
___
Python-bugs-list mailing list
Unsub
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue35717>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +11098
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31855>
___
___
Py
Change by Rémi Lapeyre :
--
keywords: +patch, patch
pull_requests: +11098, 11099
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue27015>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
pull_requests: +11101
___
Python tracker
<https://bugs.python.org/issue17467>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
pull_requests: +11101, 11102
___
Python tracker
<https://bugs.python.org/issue17467>
___
___
Python-bugs-list mailing list
Unsub
Rémi Lapeyre added the comment:
Hi, PR https://github.com/python/cpython/pull/11521 should fix the issue.
--
___
Python tracker
<https://bugs.python.org/issue35
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 fetching d
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +11107
stage: test needed -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
keywords: +patch, patch
pull_requests: +10710, 10711
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
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 determine
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
1 - 100 of 506 matches
Mail list logo