Change by Pablo Galindo Salgado :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue39102>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pablo Galindo Salgado added the comment:
I don't think this is a bug. Technically the 'from __future__ import
annotations' is a compiler option, not an AST one. Also, the flag says that
"annotations become strings at runtime" and at the point, we have an AST i
Change by Pablo Galindo Salgado :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue39117>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Pablo Galindo Salgado :
While I was re-reading The Garbage Collection Handbook [Moss, Hosking, Jones],
I have been doing some benchmarks of different aspects of our garbage
collection and taking statistics using the pyperformance suite as long as
several "produ
Pablo Galindo Salgado added the comment:
New changeset ef7eaafc9d2e370cf79b3674e56f643bbfe239e2 by Pablo Galindo
(Anthony Shaw) in branch 'master':
bpo-39144 Align ctags and etags behaviours in the makefile and include Python
stdlib files (GH-17721)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
New changeset 98f0f04b5016e63561d313a3446b7b58f2c12611 by Pablo Galindo
(Batuhan Taşkaya) in branch 'master':
bpo-38731: Fix function signature of quiet in docs (GH-17719)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
> What threshold is this?
This is the different thresholds for the generations that you can get using
gc.get_threshold(). They are in relationship to the number of objects in every
generation (there are slightly different rules for the lat
Change by Pablo Galindo Salgado :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
> I think we only need about 5 bits to store the age of each object , do we
> really need to increase the object back to two word per object ?
5 bit *per object* is a lot because it scales with the number of objects. It
will quickly oblitera
Pablo Galindo Salgado added the comment:
> How many semi-spaces do you think of having in this generation? Most systems
> have and recommend two.
I suppose we would need to experiment, but for what I have seen I think two or
three :) What do you think?
> If it is a worse tr
Pablo Galindo Salgado added the comment:
> For example, break the youngest generation into parts A & B. Newly tracked
> items are added to part A. When a collection occurs, only part B
> participates from the youngest generation. When the collection ends, part A
> is r
Pablo Galindo Salgado added the comment:
> Oh, I don't expect it to help appreciably - which is why I never did it ;-)
> It's aimed at something different, I think, than what you're after: reducing
> the burden of cyclic gc on objects that would otherw
Change by Pablo Galindo Salgado :
Added file: https://bugs.python.org/file48808/diff-vanilla-buffered.png
___
Python tracker
<https://bugs.python.org/issue39143>
___
___
Change by Pablo Galindo Salgado :
Added file: https://bugs.python.org/file48807/vanilla-vs-buffered.png
___
Python tracker
<https://bugs.python.org/issue39143>
___
___
Pablo Galindo Salgado added the comment:
I have attached two files to the issue. One of them (vanilla-vs-buffered) shows
the mean memory profile of running test_asyncio 1000 times with the buffered GC
and without the buffered GC. The other file shows the difference between both
curves
Pablo Galindo Salgado added the comment:
> I'm afraid nailing anything here is hard. For example, I don't know what you
> did to "measure memory", but if you're using stats reported by the OS, that's
> fraught with dangers too.
I am interposing a
New submission from Pablo Galindo Salgado :
I was recently checking the code of the assembler and when looking in detail at
the dfs() function I was surprised by this code:
static void
dfs(struct compiler *c, basicblock *b, struct assembler *a, int end)
{
while (j < end) {
Pablo Galindo Salgado added the comment:
> PyToken_OneChar in Parser/token.c is autogenerated. I suspect it may be
> faster and smaller if it were a lookup into a static table of ops rather than
> a switch statement. Check to see if it is.
I suspect that it will be marginal
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17178
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17733
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
> The code that orders blocks for output should not make assumptions about the
> shape of the CFG, IMO.
I very much agree with this but notice that technically this function is doing
it already if I am not mistaken. Following the b_next point
Pablo Galindo Salgado added the comment:
I am not convinced about this. One of the problems I dislike is that the gc
will take permanent ownership of the file descriptor (so is basically leaked).
Is also not clear how this will behave during the delicate stages of
finalization (the stream
Pablo Galindo Salgado added the comment:
I am going to close this for now as per my last comment (I think gc callbacks
are best suited for custom statistics and custom behaviour when emitting the
statistics - and more importantly, safer -) but feel free to re-open if you
still think we
Change by Pablo Galindo Salgado :
--
pull_requests: +17181
pull_request: https://github.com/python/cpython/pull/17738
___
Python tracker
<https://bugs.python.org/issue38
Pablo Galindo Salgado added the comment:
New changeset 23a226bf3ae7b462084e899d007d12d9fe398ac5 by Pablo Galindo in
branch 'master':
bpo-38870: Run always tests that heavily use grammar features in test_unparse
(GH-17738)
https://github.com/python/cpyt
Change by Pablo Galindo Salgado :
--
pull_requests: +17182
pull_request: https://github.com/python/cpython/pull/17739
___
Python tracker
<https://bugs.python.org/issue38
Change by Pablo Galindo Salgado :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue39156>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pablo Galindo Salgado added the comment:
I think is a good idea, being the only problem that I see that as the opcode
targets are limited we would be burning 3 more. I specially like the proposal
for JUMP_IF_NOT_EXC_MATCH as PyCmp_EXC_MATCH is only used in the code for the
try-except and is
New submission from Pablo Galindo Salgado :
==
FAIL: test_pidfd_send_signal (test.test_signal.PidfdSignalTest)
--
Traceback (most recent call last):
File
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17183
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17740
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
New changeset 8f0703ff92ed2d9ccd52d7e083c7bc26e732a428 by Pablo Galindo in
branch 'master':
bpo-39157: Skip test_pidfd_send_signal if the system does not have enough
privileges to use pidfd (GH-17740)
https://github.com/python/cpyt
Change by Pablo Galindo Salgado :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue39158>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pablo Galindo Salgado added the comment:
Closed as duplicate of issue32615.
--
nosy: +pablogsal
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
New changeset d9e561d23d994e3ed15f4fcbd7ee5c8fe50f190b by Pablo Galindo
(Zackery Spytz) in branch 'master':
bpo-38610: Fix possible crashes in several list methods (GH-17022)
https://github.com/python/cpyt
Change by Pablo Galindo Salgado :
--
pull_requests: +17195
pull_request: https://github.com/python/cpython/pull/17759
___
Python tracker
<https://bugs.python.org/issue38
Change by Pablo Galindo Salgado :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
New changeset 296d45ec10fb55532bc3fac2311a3f91299ecf59 by Pablo Galindo in
branch '3.7':
[3.7] bpo-38610: Fix possible crashes in several list methods (GH-17022)
(GH-17759)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
> The doc for exec says globals "must be a dictionary (and not a subclass of
> dictionary)"
I agree with Terry, the moment you pass a dict subclass to exec you are out of
contract. If any, we may need to sanitize the input to exec,
Pablo Galindo Salgado added the comment:
> exec() params are already checked, as a seconds param, only dict or dict
> subclasses are accepted. Seems like good enough contract.
As I said, the documentation is considered the public API contract and again,
the documentation says tha
Pablo Galindo Salgado added the comment:
New changeset 2d5bf568eaa5059402ccce9ba5a366986ba27c8a by Pablo Galindo
(Dong-hee Na) in branch 'master':
bpo-38588: Fix possible crashes in dict and list when calling
PyObject_RichCompareBool (GH-17734)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
> How about calling Py_INCREF and Py_DECREF in PyObject_RichCompare or
> do_richcompare?
Apologies, I had missed this suggestion before merging the PR :(
If we decide to add the check to PyObject_RichCompare or do_richcompare we
should also
Pablo Galindo Salgado added the comment:
> This makes list comparison 2x slower.
Would you like to revert PR 17734? Calling Py_INCREF and Py_DECREF in
PyObject_RichCompare or do_richcompare will take the same effect, no?
--
___
Python trac
Pablo Galindo Salgado added the comment:
> Moving INCREF and DECREF is a huge change. It is just a future idea to
> prevent same type of bugs. I think it can not be backported.
Now I am wondering how many other APIs are affected by the same pattern other
than PyObject_RichCompa
Pablo Galindo Salgado added the comment:
Sorry, I meant that I reviewed PR 17766.
--
___
Python tracker
<https://bugs.python.org/issue38588>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
New changeset 53f11ba7b1498133ce3ff8173d5ae2e0182a3603 by Pablo Galindo
(Dong-hee Na) in branch '3.7':
[3.7] bpo-38588: Fix possible crashes in dict and list when calling P…
(GH-17765)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
New changeset 2ee87913dde038436a25f1db13ee3fddd2bcc983 by Pablo Galindo
(Dong-hee Na) in branch '3.8':
[3.8] bpo-38588: Fix possible crashes in dict and list when calling P…
(GH-17764)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
Closing this for now, let's open another issue if we plan to discuss calling
Py_INCREF and Py_DECREF in PyObject_RichCompare or do_richcompare in the future.
Thanks to everyone involved!
--
resolution: -> fixed
stage: patc
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17205
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/17769
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
This PR1040 is failing in several 2.7 buildbots:
Tests result: FAILURE then FAILURE
test test_urllibnet failed -- Traceback (most recent call last):
File
"D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\test\test_urllibnet.py",
Pablo Galindo Salgado added the comment:
Can you check if this is fixed with the changes in:
https://github.com/python/cpython/pull/17769
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue39
Pablo Galindo Salgado added the comment:
New changeset 04ec7a1f7a5b92187a73cd02670958444c6f2220 by Pablo Galindo in
branch 'master':
bpo-39114: Fix tracing of except handlers with name binding (GH-17769)
https://github.com/python/cpython/commit/04ec7a1f7a5b92187a73cd02670958
Pablo Galindo Salgado added the comment:
New changeset 7b35bef9787cd80ed1e12124f759b4be03c849db by Pablo Galindo
(Batuhan Taşkaya) in branch 'master':
bpo-38870: Throw ValueError on invalid yield from usage (GH-17798)
https://github.com/python/cpyt
Pablo Galindo Salgado added the comment:
> I guess this resolved with PR 17738
Yup. Closing as per PR 17738.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
Pablo Galindo Salgado added the comment:
> I'm a little confused: there's a program in this issue to demonstrate the
> problem. Can I do something to make it easier for you to use?
Sorry for the confusion, I was asking because at the time of asking I didn't
have ac
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17237
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17800
___
Python tracker
<https://bugs.python.org/issu
New submission from Pablo Galindo Salgado :
The AST docs need some love as they can be a bit obscure to someone new to the
module. Improvements to be considered in this issue:
* Document all available nodes (as of 3.8 and not deprecated ones). This helps
to know what classes to consider when
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17239
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17812
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17240
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17813
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
I concur with Antoine, the interpreter does not have any contract around
crafting incorrect bytecode and evaluating it (and it will not since by
definition the bytecode created by the interpreter is (should) be correct and
any extra check in this
Change by Pablo Galindo Salgado :
--
title: Inaccurate TypeError message for `range` without argument -> Fix
inaccurate TypeError messages when calling with insufficient arguments
___
Python tracker
<https://bugs.python.org/issu
Change by Pablo Galindo Salgado :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue39201>
___
___
Python-bugs-list mailing list
Unsubscribe:
Pablo Galindo Salgado added the comment:
The function literal_eval is not safe anymore as the constructor can be
intercepted:
>>> import builtins
>>> def evil_code(*args):
... print("Something evil")
...
>>> builtins.set = evil_code
>>> ast.
Pablo Galindo Salgado added the comment:
The function literal_eval is not safe anymore as the constructor can be
intercepted:
>>> import builtins
>>> def evil_code(*args):
... print("Something evil")
...
>>> builtins.set = evil_code
>&
Change by Pablo Galindo Salgado :
--
Removed message: https://bugs.python.org/msg359250
___
Python tracker
<https://bugs.python.org/issue39158>
___
___
Python-bug
Pablo Galindo Salgado added the comment:
> The function literal_eval is not safe anymore as the constructor can be
> intercepted:
Well, actually it can also be done with any other builtin via the same trick,
so this is no different but is only slightly more obvious that it can be do
Pablo Galindo Salgado added the comment:
I am re-closing the issue as I don't think is worth complicating the docs for
this edge case and the security concern is non existent.
Apologies for the noise. If someone feels strongly about the documentation,
they can reopen the
Pablo Galindo Salgado added the comment:
> And if add support of non-literals, where should we stop? Should we support
> also frozenset() and bytearray()? inf and nan? infj and nanj? complex()?
> Ellipsis? __debug__?
Then the name of the function would be a bit misleading (for
Pablo Galindo Salgado added the comment:
Thanks, Anthony, for the quick fix and the investigation! :)
--
nosy: +pablogsal
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bug
Pablo Galindo Salgado added the comment:
Hi Anthony,
> not sure if this is intentional or not
Thanks for the catch! Is not intentional. Could you made a PR adding the line?
> Happy to make a patch which adds a line there if someone can help me with the
> test
We do not have expli
Pablo Galindo Salgado added the comment:
If you want to add a test, you could check the dis output for this example:
def make_func(x):
def f(x : not (x is x), /): ...
In this case the compiler emits:
3 0 LOAD_GLOBAL 0 (x)
2 LOAD_GLOBAL
Pablo Galindo Salgado added the comment:
Thanks again for the fix and the investigation!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
I am with Eric. Why would anyone write:
"abcde"[2:4]
Instead of just
cd
?
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.o
Pablo Galindo Salgado added the comment:
Specially because you need to do the mental calculation to know what the
indexes are for the letters you want, and at that point you better write that
string anyways, no?
--
___
Python tracker
<ht
Pablo Galindo Salgado added the comment:
New changeset 4b66fa6ce9c37e70b55af220d0e07368319de803 by Pablo Galindo in
branch 'master':
bpo-39200: Correct the error message for range() empty constructor (GH-17813)
https://github.com/python/cpython/commit/4b66fa6ce9c37e70b55af220d0e073
Pablo Galindo Salgado added the comment:
I was reading the pull request and I have to say that I find using a switch
instead of a very crowded "if" ward a bit more readable.
I would be +0 on this case.
--
___
Python track
Pablo Galindo Salgado added the comment:
The one in cpython/Tools/clinic/clinic.py:1185 is sort of an anti-pattern as it
should be using
'''\
Something something
'''
instead of skipping the newline.
--
Change by Pablo Galindo Salgado :
--
nosy: +lukasz.langa
___
Python tracker
<https://bugs.python.org/issue39220>
___
___
Python-bugs-list mailing list
Unsub
Pablo Galindo Salgado added the comment:
Łukasz, should we disable AST optimizations in annotations if "from __future__
import annotations" is used?
--
nosy: +pablogsal -BTaskaya
___
Python tracker
<https://bugs.python.o
Pablo Galindo Salgado added the comment:
Yo be honest, this would add a lot of complexity as "from __future__ import
annotations" is a compiler directive (CO_FUTURE_ANNOTATIONS) and bringing this
to the AST level would be somehow disrupting.
I would be -1 to disable AST optimi
Pablo Galindo Salgado added the comment:
> Even if there are cases, we need to prove that they are common enough
I don't think cases for an extended slicing are common enough. In addition to
stdlib, Django and flask (checked by Batuhan) I checked many popular 3rd party
packages and
Pablo Galindo Salgado added the comment:
I bisected this to this commit:
995d9b92979768125ced4da3a56f755bcdf80f6e is the first bad commit
commit 995d9b92979768125ced4da3a56f755bcdf80f6e
Author: Anthony Sottile
Date: Sat Jan 12 20:05:13 2019 -0800
bpo-16806: Fix `lineno` and
Change by Pablo Galindo Salgado :
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/issue39209>
___
___
Python-bugs-list mailing list
Unsub
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17279
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17860
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
Closing as this also does not happen anymore on master as well.
--
nosy: +pablogsal
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17283
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17866
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
>> I don't have a particularly deep opinion on what should be done, just a bit
>> of weirdness I hit upon while implementing the PEP in PyPy. fwiw, we
>> implement it as an AST transformer that the compiler runs before running th
Pablo Galindo Salgado added the comment:
New changeset 5ec91f78d59d9c39b984f284e00cd04b96ddb5db by Pablo Galindo in
branch 'master':
bpo-39209: Manage correctly multi-line tokens in interactive mode (GH-17860)
https://github.com/python/cpython/commit/5ec91f78d59d9c39b984f284e00cd0
Change by Pablo Galindo Salgado :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Pablo Galindo Salgado added the comment:
I think that was introduced in https://bugs.python.org/issue31241
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue39
Pablo Galindo Salgado added the comment:
> "Safe" means safe from user input to literal_eval().
Yup, apologies. I had something in mind and I realized after writing my initial
comment. That is why I said afterwards:
> and the security concern
Pablo Galindo Salgado added the comment:
>Do you think it is okay to just remove the call to copy_location?
I think that because in that case the parenthesis is collapsed with function
call parenthesis, the position of the AST node for the generator expression
should point to the l
Change by Pablo Galindo Salgado :
--
keywords: +patch
pull_requests: +17290
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17874
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
> We might need to tweak the documentation @pablogsal,
Maybe we can say that is 'as close as possible' if you pass an arbitrary AST
object (if only happens with Constants we could documment exactly that). Let me
think about this and I
New submission from Pablo Galindo Salgado :
./python -m test test_list -R : --junit-xml something
0:00:00 load avg: 0.52 Run tests sequentially
0:00:00 load avg: 0.52 [1/1] test_list
beginning 9 repetitions
123456789
.
test_list leaked [798, 798, 798, 798] references, sum=3192
test_list
Pablo Galindo Salgado added the comment:
This is going to be very noisy now that we are using --junit-xml in the
buildbots...
--
___
Python tracker
<https://bugs.python.org/issue39
Pablo Galindo Salgado added the comment:
> deactivating the --junit
I mean deactivating the --junit *if* is used together with -R
--
___
Python tracker
<https://bugs.python.org/issu
Pablo Galindo Salgado added the comment:
> We can stop using --junit-xml if we want. GitHub Actions doesn't support
> displaying test results anyway, so once Azure Pipelines is switched off we'll
> just be reading the console all the time anyway (unless Buildbot has a
Pablo Galindo Salgado added the comment:
> But I suggest to raise an error and tune the buildbot configuration to not
> use it, rather than silently ignore the option.
I already configured the buildbots to not use --junit when running w
Pablo Galindo Salgado added the comment:
> commit 995d9b92979768125ced4da3a56f755bcdf80f6e introduced a regression:
> bpo-37603: parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a -
> line_start)' failed, when running get-pip.py.
Fixed in https://bugs.python.
Pablo Galindo Salgado added the comment:
I will take a look and try to reproduce the benchmarks result you mentioned,
but if under PGO there is no substantial performance increase is much less
appealing as the lookup table code is less clear and maintainable than the
simple switch. Also you
Pablo Galindo Salgado added the comment:
static PyTypeObject InternalType should have
PyVarObject_HEAD_INIT(&PyType_Type, 0)
instead of
PyVarObject_HEAD_INIT(NULL, 0)
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/iss
2101 - 2200 of 4563 matches
Mail list logo