New submission from Rémi Lapeyre :
As far as I can tell, it has never been documented. I'm not sure if it is
deprecated but it has a docstring so it seems to me, that it just needs
documentation in Doc/Library/threading.rst
PS: I don't know how to set the beginner fri
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue42722>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue44166>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
This is already proposed in issue 40990 for which I am working on a PR.
--
nosy: +remi.lapeyre
versions: +Python 3.11 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue44
Rémi Lapeyre added the comment:
The proposed path does not work for `python -m json.tool --json-lines test.json
test.json`. There is also https://github.com/python/cpython/pull/7865 that aims
to fix this bug but I did not have the time to get back to it.
--
nosy: +remi.lapeyre
Rémi Lapeyre added the comment:
>
>
> def __init__(self):
> vars(self).setdefault('default', self.set_default())
> vars(self).setdefault('default', self.set_default())
>
This code is equivalent to
def __init__(self):
x
Rémi Lapeyre added the comment:
The documentation is correct, in Python argument are computed before the
call to a function, not when they are used. You can try other functions
than dict.setdefault() and see that the behaviour is always the same.
Le dim. 8 déc. 2019 à 22:47, da-dada a écrit
New submission from Rémi Lapeyre :
The documentation states that "*key*, *default* and the result are str." at
https://github.com/python/cpython/blame/3.8/Doc/library/os.rst#L224 but either
I'm missing something or it's not actually true:
$ python -c 'import os;
Rémi Lapeyre added the comment:
I don't really have a preference regarding saying that `default` should be a
string or not but the phrase should still be reworded to be less confusing.
In typeshed it's documented with a generic type:
https://github.com/python/typeshed/blob/master/s
Rémi Lapeyre added the comment:
There is the _closed attribute thought that is mutated by some methods.
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue39
Rémi Lapeyre added the comment:
> Decorating __new__ with lru_cache would likely run into memory leakage
> problems?
I think the LRU cache would be for returning the same instance when called with
the same string. I don't think it would be needed to return the same instance
when
Rémi Lapeyre added the comment:
Hi Oscar, can you attach a small program that reproduce the error? It's
probable that the error is in your code and not in Python.
--
nosy: +remi.lapeyre -paul.moore, steve.dower, tim.golden, zach.ware
___
P
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue39828>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
Hi Alan, this is documented at
https://docs.python.org/3/reference/compound_stmts.html#the-try-statement:
> When an exception has been assigned using as target, it is cleared at the end
> of the except clause. This is as if
>
> except E as N:
>
New submission from Rémi Lapeyre :
Currently simplefilter() and filterwarnings() don't validate their arguments
when using -O and AssertionError is not the most appropriate exception to raise.
I will post a PR shortly.
--
components: Library (Lib)
messages: 363732
nosy: remi.la
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +18236
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18878
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
warnings.WarningMessage was added in https://bugs.python.org/issue26568 at the
same time than _showwarnmsg_impl() and _formatwarnmsg_impl().
The goal was to have public functions that took them instead of multiple
arguments so it could be easily extended in
Rémi Lapeyre added the comment:
This is not how timeit works, you just measured the time taken by an empty
loop, you can look at `python3 -m timeit -h` to get help how to call it. I
think a correct invocation would be:
(venv) ➜ ~ python3 -m timeit -s 'from os import scandir'
&qu
Change by Rémi Lapeyre :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35775>
___
___
Pyth
Rémi Lapeyre added the comment:
Hi merli, there is no bug here, you always append the same list to Liste so
when modifying it you override previous values. You could make a copy of it by
using `Liste.append(list(StringL))` instead of `Liste.append(StringL)` and you
would get the behaviour
Rémi Lapeyre added the comment:
Hi Chris, this is explicitly forbidden in the Terms of use of Pypi and the PEP
451 at https://www.python.org/dev/peps/pep-0541/#invalid-projects:
> Invalid projects
> A project published on the Package Index meeting ANY of the following is
> c
Rémi Lapeyre added the comment:
Hi Harish, it looks like you are having an issue related to Pandas and not
Python itself. This bug tracker is for issues related to Python, for issues
related to Pandas you will want to open a new issue at
https://github.com/pandas-dev/pandas
--
nosy
Rémi Lapeyre added the comment:
Hi Talha, you are using floating points division which convert its operands to
floats so it loose precision for large numbers. The syntax for integer division
in Python 3 is // and it will not change the type of its operands. Notice the
difference below
Rémi Lapeyre added the comment:
Hi ahmad, calculation with floating points in Python uses the IEE 754
(https://fr.wikipedia.org/wiki/IEEE_754) standard and will result in such
quirks.
If you want to not loose precision you can use the decimal module:
>>> from decimal impor
Rémi Lapeyre added the comment:
@Steven Yes that's true, I only meant that in the context of the issue where
only the multiplication is used. FWIW Fraction also would have issues with e.g.
trigonometric functions right?
@ahmad, that's because you did Decimal(4.6) which first pars
Rémi Lapeyre added the comment:
Hi brendon, can you write a complete minimal example that shows the issue, it
seems that you are heving an issue when consuming recursive generators and that
it's actually not related to max().
I'm confused about the details and have not been able t
Rémi Lapeyre added the comment:
I'm unable to run the example as it segfaults on my computer because of the
linear recursion but do you notice the same behavior with:
from time import time
from sys import setrecursionlimit
setrecursionlimit(1000)
def recurse(i):
if
Rémi Lapeyre added the comment:
Hi Serhiy, do you plan on writing a PR for this feature?
If not I would love to have a go at it.
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
I've been looking at this, I find the effect more visible when you don't do the
division in the last print().
After bisecting, it looks like ae3087c6382011c47db82fea4d05f8bbf514265d may
account for most of the performance gap between 3
Rémi Lapeyre added the comment:
Hi Gharg, this is expected, both because your program would not actually
receive `--boolean=''` but `--boolean=`:
➜ ~ cat test.py
import sys
print(sys.argv)
➜ ~ python test.py --boolean=''
['test.py', '--boolean=']
an
Rémi Lapeyre added the comment:
Hi Maks, when you report a bug please write a minimal example that show the bug
so we don't have to read the whole application
(https://stackoverflow.com/help/minimal-reproducible-example).
I think in this case that the issue is that you overrride mod
Rémi Lapeyre added the comment:
String hash randomization is a security feature so it may be better to not
disable it unless explicitly asked for. Maybe a note in random's documentation
could be added?
--
nosy: +remi.lapeyre
___
Python tr
Rémi Lapeyre added the comment:
>> We also have the real world app that is Instagram.
> I don't think Instagram is a single app. What is Python used for at Instagram?
According to their engineering blog
(https://instagram-engineering.com/static-analysis-at-scale-an-i
Rémi Lapeyre added the comment:
Hi Nino, the text for `python --help` is here :
https://github.com/python/cpython/blob/master/Python/initconfig.c#L28-L130
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
On one hand it's bad messages get lost, one the other retrying to send the
message would take a lot of time and make `SocketHandler` very slow.
Maybe we could had the record to a very short queue so we can retry to send it
with the next me
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40355>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
shlex.quote makes the string safe to pass a command, what if it's
rm 'var/log/syslog*'
instead?
You make sure that only the file given would be removed but then shlex.quote()
shoot you in the foot.
This would also cause issues for fi
Change by Rémi Lapeyre :
--
type: -> behavior
versions: +Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue40363>
___
___
Python-bugs-lis
Rémi Lapeyre added the comment:
This makes sense, should assertNoWarns() be added too?
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue39
Rémi Lapeyre added the comment:
In general examples in the documentation may lack some things like imports as
they are implicit but in this case it also lack do_work(), source() and
num_worker_threads.
You could use os.cpu_count() instead of your hard-coded value and the comment.
Can you
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre, tim.peters
versions: -Python 2.7, Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.org/issue40
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue31122>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
Hi Maxi, Python 3.5 now only accept security fixes. Can you reproduce this
issue with recent releases and post an example here?
--
nosy: +remi.lapeyre
type: crash -> behavior
___
Python tracker
<
Rémi Lapeyre added the comment:
A call to self._check_closed() is already present in Python 3.5
https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.py#L202-L206
It is possible for some issues to appear when mixing multiprocessing and
multithreading thought:
In [17
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19113
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19790
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
I don't understand the motivation, why would it be very useful when working
with titles of columns that are to be used in databases columns?
Databases can handle columns with spaces in their name:
postgres=# create temporary table foo ("column w
Rémi Lapeyre added the comment:
Bumping this issue as issue 37873 that wants to add a new -j argument to
unittest got some attention lately.
This PR makes the Test Cases aware of the command line arguments given to
unittest.main() and is needed to add the --pdb argument proposed in issue
Rémi Lapeyre added the comment:
Hi Alex, thanks for reporting this. A PR will be needed to fix those indeed.
Regarding argument clinic, the file you will need to change is
Python/bltinmodule.c and you can run `make regen-all` to regenerate the other
file. There is more information about this
Change by Rémi Lapeyre :
--
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue40471>
___
___
Python-bugs-list mailing list
Unsub
Rémi Lapeyre added the comment:
Hi, I can't reproduce the issue but the fact that you did not close the file is
suspicious. What does
with open('test_output','w') as f:
length = 195364
for i in range(length):
f.write(str(i)+'\r\n')
giv
New submission from Rémi Lapeyre :
The subprocess.check_output() raises TypeError when given the `check`
keyword-argument:
Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19208
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19897
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
I don't think this is a deadlock rather it is certainly related to the number
of '*' there is in your pattern, the regexp has to search an exponentially
growing number of patterns.
You could try a simple pattern to match your attribute and it s
Rémi Lapeyre added the comment:
> check_output() should not accept check=False.
I thought about raising ValueError instead but `subprocess.check_output([...],
check=False)` is actually a convenient shortcut over `subprocess.run([...],
stdout=subprocess.PIPE).stdout` and I can't think
Rémi Lapeyre added the comment:
> Now a reviewer has to check that a developer uses the validate_result()
> function *and* the developer is not passing validate=False into the function.
Fair enough, I updated the PR to raise ValueError i
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
nosy_count: 7.0 -> 8.0
pull_requests: +19232
pull_request: https://github.com/python/cpython/pull/19918
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
>> Regardless, how can we best move forward with this idea?
> Provide a pull request.
Hi, I looked into what scientific programs where doing. Most of them uses a
form of the Baillie–PSW primality test which is a probabilistic primality test
that'
Rémi Lapeyre added the comment:
I can't mark the issue as open thought, can someone do this?
--
___
Python tracker
<https://bugs.python.org/issue40028>
___
___
New submission from Rémi Lapeyre :
Building master with GCC 9.3.0 gives some warnings on posix and nis:
./Modules/posixmodule.c: In function 'os_chown_impl':
./Modules/posixmodule.c:3397:39: warning: the comparison will always evaluate
as 'false' for the address of 'l
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19240
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19925
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
Hi João, ideas like this can also be proposed first on the python-ideas mailing
list but as you said in your post there is already a method to do this and it
raises ValueError when it is not found which is a common idiom in Python. Other
objects don't
Rémi Lapeyre added the comment:
This is expected, while part of them are randomly generated, some bits are
always set: https://tools.ietf.org/html/rfc4122#section-4.1.3.
This let you know that the UUID you have is a version 4 just by looking at it,
it's not a bug.
--
compo
Rémi Lapeyre added the comment:
It's documented here: https://docs.python.org/3/library/functions.html#next
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/is
Rémi Lapeyre added the comment:
Hi Gleen, this looks like there already exists an issue for this problem,
please use it instead of opening a new one.
Can you please open a new Pull-Request for solving this issue?
--
nosy: +remi.lapeyre
___
Python
Rémi Lapeyre added the comment:
Hi Gleen, the best way forward is to propose an improvement to the current
documentation. It will get reviewed and merge if appropriate.
The source for this part is at
https://github.com/python/cpython/blob/master/Doc/using/mac.rst and you can
find the
Rémi Lapeyre added the comment:
I think slices were explicitly made not hashable to avoid issues to avoid
issues with dictionaries, see discussion at
https://mail.python.org/pipermail/python-list/2001-March/076101.html and issue
408326.
The commit that did this is
https://github.com/python
Rémi Lapeyre added the comment:
>> Perhaps you missed it because you're not in the CODEOWNERS so don't
>> automatically get notified by GitHub?
> That's quite possible. I can't fix that as Github considers everything
to do with my computer and browser too
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40624>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
Hi Glenn, this is probably not a bug in Python and more information about the
error and the context would be needed if it was. Bugs must be reproducible to
be looked at and fixed and your post does not contain enough information to do
so.
You should redirect
Rémi Lapeyre added the comment:
The error message you linked does not show an issue with the Python
installation but the permissions are wrong on the 'howdy.py' file, that's what
the error message says:
can't open file 'howdy.py': [Errno 1] Operation not pe
Rémi Lapeyre added the comment:
It's because application on recent versions of MacOS cannot access files in
some directories without being granted permission explicitly, a permission
model similar to what iOS and Android.
You can grant them additional permission using System Preferences
Rémi Lapeyre added the comment:
Is this different than what you would expect?
Supplying garbage to timeit will result in an error:
>>> from timeit import timeit
>>> timeit('weofinwofinwe')
Traceback (most recent call last):
File "", line 1, in
File
Rémi Lapeyre added the comment:
URLOpener has been deprecated since Python3.3
(https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L1703-L1705)
maybe it should just be removed from the codebase?
--
nosy: +remi.lapeyre
___
Python
Change by Rémi Lapeyre :
--
components: Library (Lib)
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Deprecate urllib.request.urlretrieve() and cleanup()
type: behavior
___
Python tracker
<https://bugs.python.org/issue40
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19497
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20197
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
This should target Python3.10, current behavior is:
Python 3.10.0a0 (heads/master:19e3e00264, May 19 2020, 14:40:31)
[Clang 11.0.3 (clang-1103.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license"
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
nosy_count: 2.0 -> 3.0
pull_requests: +19562
pull_request: https://github.com/python/cpython/pull/20288
___
Python tracker
<https://bugs.python.org/issu
Rémi Lapeyre added the comment:
PurePath subclasses cannot support kwargs as __new__() does not accept **kwargs:
>>> from pathlib import PurePath
>>> class MyPurePath(PurePath):
... def __init__(self, *args, **kargs): pass
...
>>> MyPurePath('foo', s
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19563
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20288
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
pull_requests: -19562
___
Python tracker
<https://bugs.python.org/issue39782>
___
___
Python-bugs-list mailing list
Unsubscribe:
Rémi Lapeyre added the comment:
I think this issue can be closed thanks to Zackery Spytz.
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19564
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20289
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
Here's the warning given by clang:
/Users/remi/src/cpython/Modules/_zoneinfo.c:1487:9: warning: variable
'dst_offset' is used uninitialized whenever 'if'
condition is true [-Wsometimes-uninitialized]
if (*p == '\0'
Rémi Lapeyre added the comment:
Hi Vitalii, can you give more context about why you are writing this code, what
you expect it to do and why is there a bug?
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
There is no official way, you can find both in the Python tree: all caps at
https://github.com/python/cpython/blob/master/Lib/ast.py#L615-L636 and snake
case at https://github.com/python/cpython/blob/master/Lib/uuid.py#L76-L79.
I think it's common to us
Rémi Lapeyre added the comment:
This was done in b7e9525f9c7ef02a1d2ad8253afdeb733b0951d4 for issue 36287, all
attribute should now be defined, even when they are not set. It looks like some
parts of the ast module where not updated.
If nobody works on this I will send a PR to update the
Rémi Lapeyre added the comment:
Hi Mark Dickinson, I was waiting for everyone to have a chance to comment on
this issue and read their reply before answering.
It seems to me that there some core developers are mildly in favor of a new
imath module and it's has been proposed on th
Rémi Lapeyre added the comment:
Hi Héctor, can you open a new PR with those changes?
--
nosy: +remi.lapeyre
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
Can you point to specific issues with the current build system?
It seems to me that for 1. it will only make it easier for projects that use
CMake, 2. the build system is not the only part needed to support a new OS and
for 3. I've not found Python
Rémi Lapeyre added the comment:
PurePath is not iterable but I would expect
len(Path('/home/remi/src/cpython')) == 4
The fact the the path is stored as a string is an implementation detail, it
seems leaky to get the length of the string here.
--
nosy: +re
Rémi Lapeyre added the comment:
> Remi: Your use case is taken care of by `len(path.parts)`.
Yes, and your use case is taken care of by `len(str(path))` which works as well.
The reason in the PR is to simplify:
sorted(paths, key=lambda path: len(str(path)), reverse=True)
to
sorted(pa
Rémi Lapeyre added the comment:
> As an example, if I write character "A" as a byte, i.e b'A' in a csv file
But you can't write b'A' in a csv file, what you can't do is write
`b'a'.decode()` or `b'a'.decode('latin1'
New submission from Rémi Lapeyre :
Hi Mansi, this is not an issue in the Python interpreter but with a third party
module. This bug tracker is only for reporting issues with the CPython
interpreter.
If you read the error message you attached, there is some steps given to fix
your issue, you
Rémi Lapeyre added the comment:
> in real-life that b-prefixed string is just not readable by another program
> in an easy way
If another program opens this CSV file, it will read the string "b'A'" which is
what this field actually contains. Everything that is not
Rémi Lapeyre added the comment:
I don't think this would be accepted but I think you could try to propose that
on the python-ideas mailing list to get some feedback on your proposal.
--
nosy: +skip.montanaro
___
Python tracker
&
Rémi Lapeyre added the comment:
Hi Lucas, this is probably not an issue with unittest but a bug in the test
themselves. Can you attach an example to reproduce the issue?
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue40
New submission from Rémi Lapeyre :
The threading.Semaphore class does not have this method, it is undocumented and
useless on some system (at least MacOS):
>>> s.get_value()
Traceback (most recent call last):
File "", line 1, in
File
"/Library/Frameworks/Python.fr
Rémi Lapeyre added the comment:
I checked and FunctionTestCase seems to completely break the loader. The tests
for FunctionTestCase in the standard library instantiate the class from inside
the method of a TestCase so the loader never see them but even the simple test
file I attached
New submission from Rémi Lapeyre :
The new deprecated-removed extension in the documentation always produces text
like this:
Deprecated since version 3.4, will be removed in version 3.8: MD5 as
implicit default digest
This message should be used in the documentation of 3.4 to 3.7 and then
Rémi Lapeyre added the comment:
See for example
https://mail.python.org/archives/list/python-id...@python.org/thread/4HE2GFL27LGBSHGWOBDOOBPEULC52U4D/#RC3QWQUX6VP56K2WXSMRZ5IGNAUBXKRI
--
nosy: +remi.lapeyre
___
Python tracker
<ht
1 - 100 of 506 matches
Mail list logo