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:
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
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue44166>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue42722>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 a
Rémi Lapeyre added the comment:
*This is a duplicate of issue 21041
--
___
Python tracker
<https://bugs.python.org/issue41511>
___
___
Python-bugs-list mailin
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
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 was gi
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
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue41485>
___
___
Python-bug
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
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
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
Rémi Lapeyre added the comment:
Hi Bernat, have you looked into reprlib.repr()? It's an alternative
implementation of repr() made for cases like this.
You may be interested in this PR too:
https://github.com/python/cpython/pull/20925
Alternatively, I think pprint.pformat() may be useful
Rémi Lapeyre added the comment:
On MacOS with Python 3.8.2 I get the correct results. Can you give more details
about the platform and send the result of:
>>> "\t".join(['arith_int_512-cuda.sfeat',
'__hipsyclkernel$wrapped_kernelname$MicroBenchArithmeticKernel_512_1
Rémi Lapeyre added the comment:
Hi Anand, this is very specific to one product and I don't think the core team
will take the burden to maintain to as it may be too specific. You could create
a package and publish it on Pypi so others can use it thought.
--
components: +Library (Lib
Rémi Lapeyre added the comment:
Hi Wansoo, welcome to Python!
Changes that are purely cosmetic but do not change the underlying meaning of
the code are usually refused as they create unwanted code churn. You will find
some info about this and all the other aspects of contributing to Python
Rémi Lapeyre added the comment:
Hi, using a file object is very common as it makes it possible to use something
that is not a file, like an HTTP request or something already in memory. It
makes the module serializing / de-serializing the data completely agnostic with
regard to the actual
Rémi Lapeyre added the comment:
Hi Tom Forbes, I don't think there is a way to be sure that's the function does
not take any argument. Are you worried about the lost memory when maxsize is
not set?
--
nosy: +remi.lapeyre
___
Python tracker
<ht
Rémi Lapeyre added the comment:
Hi, this is very specific and I don't think a way to seed the random generator
using a third uncontrolled party will get merged in Python. You should probably
try to package this as a third party library.
--
nosy: +remi.lapeyre
Rémi Lapeyre added the comment:
Hi Wansoo, using += instead of str.join() is less performant. Concatenating n
strings with + will create and allocate n new strings will str.join() will
carefully look ahead and allocate the correct amount of memory and do all
concatenation at one
Rémi Lapeyre added the comment:
This is because you used the floating point division operator `/` instead of
the integer division `//`:
def digitsum(num):
digsum = 0
tnum = num
while tnum > 0:
print("tnum = %d, digsum = %d" % (tnum,digsum))
di
Change by Rémi Lapeyre :
--
title: Digital India -> SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412
___
Python tracker
<https://bugs.python.org/issue41194>
___
_
Rémi Lapeyre added the comment:
Hi Volker Weißmann, this issue has been closed for 7 years, if you want to
propose a change, please open a new issue.
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue17
Rémi Lapeyre added the comment:
With beta 4 coming in 2 days it would perhaps good to choose now whether this
must be done for 3.9 or 3.10
--
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
This is probably related to issue 40928. Does the test succeed or fail when you
do this?
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue41
Rémi Lapeyre added the comment:
I don't think something so obvious can be added, if you want a one liner you
can write:
for e in iterable: f(e)
I think it would go in itertools if it were accepted.
--
nosy: +rhettinger
___
Python tracker
<ht
Change by Rémi Lapeyre :
--
components: +Library (Lib) -Interpreter Core
___
Python tracker
<https://bugs.python.org/issue41107>
___
___
Python-bugs-list mailin
Rémi Lapeyre added the comment:
If I'm understanding correctly you want:
def xmap(f, iterable):
for e in iterable:
f(e)
Is that correct?
--
nosy: +remi.lapeyre
___
Python tracker
<https://bugs.python.org/issue41
Rémi Lapeyre added the comment:
Hi Srinivas, as I said on the PR, cosmetic changes are usually not accepted.
You can have a look at the other opened bug reports to find issues you can work
on and at the Python Dev Guide (https://devguide.python.org/) for help to get
started hacking Python
Rémi Lapeyre added the comment:
I fell like it's a bit weird to have a new function just for ignoring case,
will a new function be required for every possible normalization like removing
accents. One possible make the API handle those use cases would be to have a
keyword-argument
Change by Rémi Lapeyre :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue39783>
___
___
Python-bugs-list mailing list
Unsub
Change by Rémi Lapeyre :
--
versions: +Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue35232>
___
___
Python-bugs-list mailin
Change by Rémi Lapeyre :
--
versions: +Python 3.10 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue35232>
___
___
Python-bugs-list mailing list
Unsub
Change by Rémi Lapeyre :
--
components: +Library (Lib)
versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue33
Rémi Lapeyre added the comment:
Can you give more information about your issue here. This part of the code was
written like this on purpose as the comment says:
# OS X can use below Unix support (but we prefer using the OS X
# specific stuff)
We have to be sure
Rémi Lapeyre added the comment:
It would not work, an iterator is just a thing that has __next__() and
__iter__():
class MyIterator:
def __iter__(self): return self
def __next__(self): return 1
Plenty of iterators would not have this method even if we added it to some of
them
Rémi Lapeyre added the comment:
Hi Laurence, Maildir predates pathlib so it's not surprising it hasn't been
updated yet. Could you open a PR to add this?
BTW, you should use os.fspath() instead of str() here.
--
nosy: +remi.lapeyre
versions: +Python 3.10
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +20104
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20925
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
reprlib.Repr does not accept arguments for the moment so setting its attributes
must be done in multiple steps:
import reprlib
r = reprlib.Repr()
r.maxstring = 10
r.maxset = 4
r.repr(...)
It would be more user-friendly to be able to do:
import reprlib
r
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +20101
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20923
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
It's a bit outside of its original scope but with more and more application
requiring HTTPS it is sometime needed even when doing some simple tests or
local development.
It's quite easy to have an SSL certificate, either auto-signed or using Let's
Encrypt
Change by Rémi Lapeyre :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +20062
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20874
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
The documentation says:
.. deprecated-removed:: 3.7 3.9
Do not call this as a task method. Use the :func:`asyncio.all_tasks`
function instead.
I don't know if it's still possible to merge this in 3.9 and if so, if it
should
Change by Rémi Lapeyre :
--
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue28557>
___
___
Python-bugs-list mailin
Change by Rémi Lapeyre :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue40937>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Rémi Lapeyre :
--
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue29847>
___
___
Python-bugs-list mailin
Change by Rémi Lapeyre :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue39385>
___
___
Python-bugs-list mailing list
Unsub
Rémi Lapeyre added the comment:
> But is it really an use case to log any memory allocation failure? Python is
> very likely to raise a MemoryError exception in this case. It's well defined,
> no?
Yes, we are not trying to log the allocation failure, we are just trying to
suppress
Rémi Lapeyre added the comment:
Ok, I will try to do this in the coming days. Is adding this kind of super
ugly, super specific code to pymain_init() ok?
--
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
> I have two observations:
>
> First, I think that the default DEBUG_WRITE_ALWAYS, which is the cause
> of this issue, is not C standard conforming -- The standard does not
> permit implementation defined diagnostics (global side effects!) on
Change by Rémi Lapeyre :
--
pull_requests: +19973
pull_request: https://github.com/python/cpython/pull/20775
___
Python tracker
<https://bugs.python.org/issue40
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19971
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20774
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
The following modules have functions marked for deprecation in Python 3.10:
- asyncio-queue
- asyncio-subprocess
- asyncio-sync
- asyncio-task
- collections
- builtins
- gettext
- the old parser
I already opened a PR to remove those in gettext
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19970
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20773
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
The codeset parameter and the following functions were marked for removal in
Python 3.10:
- bind_textdomain_codeset()
- lgettext()
- ldgettext()
- lngettext()
- ldngettext()
- output_charset()
- set_output_charset()
--
components: Library (Lib
Rémi Lapeyre added the comment:
Would it be possible to wrap malloc_print_configure()
(https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L59)
in a context manager that we put in test.support? or to override
https://github.com/PureDarwin
Change by Rémi Lapeyre :
--
nosy: +barry
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python
3.5
___
Python tracker
<https://bugs.python.org/issue18
Rémi Lapeyre added the comment:
I forgot to say that MallocLogFile=/dev/null did not work, that's why I tried
MallocDebugReport.
--
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
Thanks, I found "MallocDebugReport" in `man malloc` (I could have thought to
look into there...) that seem to do the trick:
$ MallocDebugReport=none ./python -m test test_decimal -m
test_maxcontext_exact_arith
0:00:00 load avg: 1.27 Run tests sequ
Rémi Lapeyre added the comment:
> The annoying "error" looks the same as #5614, which was closed as "won't fix".
Yes, it's a similar message, test_io does not display it on Catalina anymore
thought.
> Is this the only place in the test suite now?
As far as I k
New submission from Rémi Lapeyre :
Here's the result of "./python -m test test_decimal -m
test_maxcontext_exact_arith":
0:00:00 load avg: 1.33 Run tests sequentially
0:00:00 load avg: 1.33 [1/1] test_decimal
python(7835,0x11a218dc0) malloc: can't allocate region
:*** mach_v
Rémi Lapeyre added the comment:
The python-ideas is hosted at
https://mail.python.org/mailman3/lists/python-ideas.python.org/, you can create
an account and once it's validated you will be able to post a new message
either using the web UI or by sending a mail directly to the list
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19957
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20758
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
It looks like the warning registry does not get flushed properly:
./python -m test test___all__ test_binhex
0:00:00 load avg: 1.55 Run tests sequentially
0:00:00 load avg: 1.55 [1/2] test___all__
0:00:01 load avg: 1.55 [2/2] test_binhex
test test_binhex
Rémi Lapeyre added the comment:
This is a duplicate of issue 27015.
--
nosy: +remi.lapeyre
versions: +Python 3.10, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
Multiple steps happens at once here, first the list is extended, then the
result is written back to the tuple, at which point it raises TypeError because
you can't write to a tuple. When TypeError is raised, the list has already be
extended. The code
Rémi Lapeyre added the comment:
I think I stumbled on this too, I think the test that causes some issue is
testCmsgTrunc2Int:
./python -m test -R: test_socket -m testCmsgTrunc2Int
0:00:00 load avg: 1.66 Run tests sequentially
0:00:00 load avg: 1.66 [1/1] test_socket
beginning 9
Rémi Lapeyre added the comment:
property, partial, bound methods and ChinMap all do something complex with the
underlying object. Dict-views are quite simple by comparison, is there an
example where this would be helpful and better than just passing directly the
mapping object
Rémi Lapeyre added the comment:
In the case of time, it's a C module. Those usually don't have a link to their
implementation at the top. Others like wsgiref should have a link as having a
quick way to read the implementation is a nice way to check on the
implementation details and get
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre
nosy_count: 8.0 -> 9.0
pull_requests: +19904
pull_request: https://github.com/python/cpython/pull/20685
___
Python tracker
<https://bugs.python.org/issu
Change by Rémi Lapeyre :
--
versions: +Python 3.10, Python 3.9 -Python 2.7
___
Python tracker
<https://bugs.python.org/issue36267>
___
___
Python-bugs-list mailin
Rémi Lapeyre added the comment:
Issue 38952 is a duplicate of this.
--
message_count: 4.0 -> 5.0
nosy: +remi.lapeyre
nosy_count: 4.0 -> 5.0
pull_requests: +19896
versions: +Python 3.10, Python 3.9
pull_request: https://github.com/python/cpython/pull
Rémi Lapeyre added the comment:
New features will go in Python 3.10 indeed.
--
nosy: +remi.lapeyre, vinay.sajip
versions: -Python 3.9
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
argparse.BooleanOptionalAction was introduced in Python3.9 so there is no code
there should be no code that already rely on it.
--
___
Python tracker
<https://bugs.python.org/issue40
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19871
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20651
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
multiprocessing is supposed to be a drop-in replacement for the threading
module and multiprocessing.Lock() is advertised as a "a close analog of
threading.Lock." but it is missing the locked() method that returns whether the
current status o
Rémi Lapeyre added the comment:
Thanks for the feedback, I updated the PR accordingly.
--
___
Python tracker
<https://bugs.python.org/issue40836>
___
___
Pytho
Rémi Lapeyre added the comment:
This was fixed in e9b51c0ad81da1da11ae65840ac8b50a8521373c so it's fixed in
Python 3.8 and 3.9. Maybe it should have been backported to 3.7.
Python 3.6 only receives security fixes now.
See also bpo-26660 and bpo-35144.
--
components: +Library (Lib
Change by Rémi Lapeyre :
--
title: argparse.BooleanOptionalAction accept and silently its the const
argument -> argparse.BooleanOptionalAction accept and silently discard its the
const argument
___
Python tracker
<https://bugs.pyth
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19848
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20623
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
The action is used to store None, True or False when an argument like --foo or
--no-foo is given to the cli so it has no used for this action, but it is
accepted without warning:
Python 3.10.0a0 (heads/bpo-wip:6e23a9c82b, Jun 4 2020, 13:41:35)
[Clang
Rémi Lapeyre added the comment:
This is documented in
https://docs.python.org/3.8/library/stdtypes.html#set-types-set-frozenset:
Instances of set are compared to instances of frozenset based on their members.
For example, set('abc') == frozenset('abc') returns True and so does set('abc
Change by Rémi Lapeyre :
--
components: +Interpreter Core
nosy: +rhettinger
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue40
Rémi Lapeyre added the comment:
The set is converted to a frozenset before the comparison so
>>> {1,2} in {frozenset({1,2}), 3}
is equivalent to
>>> frozenset({1,2}) in {frozenset({1,2}), 3}
This was introduced on purpose 17 years ago in 19c2d778 so it's u
Rémi Lapeyre added the comment:
Hi, thanks for pointing this out.
I think "type" here is not about the type of the object but whether it is:
- positional-only
- positional or keyword
- variadic positional
- keyword-only
- variadic keyword
The wording could certainly b
Change by Rémi Lapeyre :
--
title: _Pickler_CommitFrame() always returns 0 but it's return code is checked
-> _Pickler_CommitFrame() always returns 0 and its return code is checked
needlessly
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
I'm currently investigating a SystemError one of our workers returned:
returned NULL without setting
an error
While doing so I came across the _Pickler_CommitFrame() function:
static int
_Pickler_CommitFrame(PicklerObject *self)
{
size_t frame_len
Rémi Lapeyre added the comment:
Yes, the patch by Terry Reedy fixes this issue while still breaking the loop
from `def f: pass`.
It will start the debugger once for `def f: pass` which may be weird as in this
case no user code has been executed and it will be in bdb which may confuse
users
Rémi Lapeyre added the comment:
This is related to issue 16180, it may be possible to improve the situation by
trying to determine whether the SyntaxError is in the file or came during its
execution by looking at the filename but it's probably very brittle:
# In most cases
Rémi Lapeyre added the comment:
I've looked into this, in Bdb both the part where the code is compiled and the
one where the code is run are in the run() method
(https://github.com/python/cpython/blob/master/Lib/bdb.py#L565-L585):
def run(self, cmd, globals=None, locals=None
Rémi Lapeyre added the comment:
Thanks, I was wondering about that. I didn't know what is the status of the
function exactly and found https://bugs.python.org/msg344080.
While they are not documented, you can find them in dir() and in the help,
maybe they should have a docstring
Change by Rémi Lapeyre :
--
keywords: +patch
pull_requests: +19804
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20563
___
Python tracker
<https://bugs.python.org/issu
New submission from Rémi Lapeyre :
Both are not documented and synonymous for critical() but don't raise a
DeprecationWarning.
--
components: Library (Lib)
messages: 370522
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: logging.fatal() and logging.Logger.fatal
Change by Rémi Lapeyre :
--
keywords: +patch
nosy: +remi.lapeyre
nosy_count: 1.0 -> 2.0
pull_requests: +19803
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20562
___
Python tracker
<https://bugs.python.org/i
Rémi Lapeyre added the comment:
Could it make sense to have this in the often proposed imath module?
It's integers per se but Both number theory and graph theory are part of
discrete mathematics so it may feel more at home there?
--
___
Python
Change by Rémi Lapeyre :
--
nosy: +remi.lapeyre, vstinner
___
Python tracker
<https://bugs.python.org/issue40826>
___
___
Python-bugs-list mailing list
Unsub
Rémi Lapeyre added the comment:
Hi Skip, I'm on a Mac so I tried Numbers, the spreadsheet tool that comes with
MacOS:
Opening and exporting to CSV again works:
➜ ~ cat -v ~/Documents/nul.csv
abc;def;1234.5;^@^M
a-c;d^@f;1234.5;^@^M
ABC;DEF;1.5;^@
When exporting to TSV, it makes
Rémi Lapeyre added the comment:
Writing to those files is obviously as easy, since like you said "because by
it's very nature it's non-printable" and you will probably not find it in your
data:
with open('file', 'w') as f:
f.write('\x00'.join(data))
It will break if there
1 - 100 of 506 matches
Mail list logo