Christian Tismer added the comment:
Very much appreciated approach.
Too bad that things stop when people are writing extensions as usual. Or do you
think we can teach them how to avoid the C stack? Anyway, good luck!
--
___
Python tracker
<ht
Christian Tismer added the comment:
FWIW, getting all function to avoid the C stack will most probably take a long
time, if it happens at all. Especially functions which might call into Python
multiple times must be re-designed heavily, turned into multiple pieces to be
in tail position
Christian Tismer added the comment:
FYI., in Stackless Python I built a chain of frames by a double linked list.
This was the replacement for the current frame/stack mix.
Debugging was still quite easy, following this frame chain.
Note that it is a rather easy step to add the capability to
Christian Tismer added the comment:
Hey guys, you know that you are about to implement the core idea of Stackless
Python, right? :-D
--
nosy: +Christian.Tismer
___
Python tracker
<https://bugs.python.org/issue45
Christian Tismer added the comment:
Since PyPy does not use the Limited API, PySide can quite easily work around
the limitations by directly working with the type object.
But the usage of PyType_Modified() would make very much sense for PySide‘s new
switchable features. That would work
Christian Tismer added the comment:
> Apart None, True and False, do you know other objects which must not be
> deleted?
Yes, what I can think of is the immutable empty tuple singleton
which is such a candidate to be forgotten.
--
___
Christian Tismer added the comment:
Ah, that would be really much to store: every object with a refcount
going to zero would have to be memorized :/
--
___
Python tracker
<https://bugs.python.org/issue45
Christian Tismer added the comment:
What about an even more flexible solution?
A debug option could memorize always the last object deallocated
and give full info (the object's repr) before the crash would happen.
--
nosy: +Christian.T
Christian Tismer added the comment:
Congrats to that change!
--
nosy: +Christian.Tismer
___
Python tracker
<https://bugs.python.org/issue30459>
___
___
Pytho
Christian Tismer added the comment:
> How does this change affect stable ABI? Is it necessary to change the
> logic in modules that use only the Py_LIMITED_API?
If you use heap types, you need to adjust refcounts beginning
with Python 3.8 . And since the Py_LIMITED_API uses heap
Change by Christian Tismer :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39016>
___
___
Pyth
Change by Christian Tismer :
--
stage: patch review -> resolved
___
Python tracker
<https://bugs.python.org/issue39016>
___
___
Python-bugs-list mai
Christian Tismer added the comment:
Sorry, I believe I was wrong and lookup_maybe_method does not return a borrowed
reference. _PyType_Lookup does and I was confused.
Closing that for now.
--
___
Python tracker
<https://bugs.python.org/issue39
Christian Tismer added the comment:
On 11.12.19 17:37, Petr Viktorin wrote:
>
> Petr Viktorin added the comment:
>
> The goal now should be to find a reasonably small reproducer.
>
> I'm trying to compile PySide to see what it does, but it's a big project and
&
Christian Tismer added the comment:
On 11.12.19 14:13, Petr Viktorin wrote:
>
> Petr Viktorin added the comment:
>
> lookup_maybe_method should not return a borrowed reference. It increfs its
> return value.
At second sight, this seems to be true. No idea why I
was so con
Christian Tismer added the comment:
On 10.12.19 17:57, Pablo Galindo Salgado wrote:
>
> Pablo Galindo Salgado added the comment:
>
>> No, this appears to be impossible.
>
> Oh, I see. Apologies then for the misunderstunding.
No problem! You could as well have been r
Christian Tismer added the comment:
On 10.12.19 17:57, Pablo Galindo Salgado wrote:
>
> Pablo Galindo Salgado added the comment:
>
>> No, this appears to be impossible.
>
> Oh, I see. Apologies then for the misunderstunding.
Well, but I think that is weird, too!
W
Christian Tismer added the comment:
No, this appears to be impossible.
The function "type_mro_modified" exists as well, but there is no
"if (custom) {" branch at all!
On 10.12.19 17:21, Pablo Galindo Salgado wrote:
>
> Pablo Galindo Salgado added the
New submission from Christian Tismer :
By the new Py_TPFLAGS_METHOD_DESCRIPTOR flag, a new code path is
activated, and when extension types like PySide create a new
class, we observe negative refcounts.
The reason is that the code in typeobject.c fkt. type_mro_modified
calls
Change by Christian Tismer :
--
keywords: +patch
pull_requests: +17029
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17555
___
Python tracker
<https://bugs.python.org/issu
Christian Tismer added the comment:
Neil, that is the absolute super-move!
When all types are heap types, then I have no longer the problem
that I cannot get at slots from builtin types, with all are static.
I am very much for that change, because then I can make my stable
ABI implementation
Christian Tismer added the comment:
Thanks for including me here!
We have indeed converted everything to new style types
but saw no refcount problems, yet. This will probably
come after the patch. We will add an issue to the tracker
for Python 3.8
Christian Tismer added the comment:
The default of PyType_FromSpec for tp_dealloc is wrong!
---
After a long struggle with crashes and leaks, the situation
was finally clarified:
When a type is converted from a static type to a heaptype
via
Christian Tismer added the comment:
If somebody is interested to see how the transition to the
Limited API was done, here is the documentation that I was
forced to write :)
https://github.com/pyside/pyside2-setup/blob/5.11/sources/shiboken2/libshiboken/pep384impl_doc.rst
Christian Tismer added the comment:
> ... Specifically, you need a way to create class with a metaclass, from C.
>
> Is that right? Or was this only an example of a larger problem?
Yes, you are exactly right. I needed access to very few fields.
In particular:
PyTypeObjec
Christian Tismer added the comment:
> 1) If I understand correctly, this problem could be solved by
> per-class C storage? Something like PyModuleDef.m_size /
> PyModule_GetState, but for classes?
No. To obtain sizeof(PyType_Type), we simply used the Python code
type.__basicsize
Christian Tismer added the comment:
Petr, Fine! PySide's problems are solved for now, no worries.
But as mentioned, there is more.
Problem 1)
--
There is another thing that gives problems:
When creating types which have fields "behind" the normal type fields,
PySi
Christian Tismer added the comment:
Hi Petr,
yes I have that what generated the wrong thing, but it is inside
a specific PySide repository in a big project. Before I try to extract
and simulate that, let me just show it.
All types which had been no heaptypes before were already quite
Christian Tismer added the comment:
Why must this become slower?
To my knowledge, many projects prefer marshal over pickle
for suitable simple objects because it is
so very fast. I would not throw that away:
Would it not be easy to add a named optional keyword
argument, like "stable
Christian Tismer added the comment:
@Victor
I cannot test on Windows because I'm in vacation.
But it is very likely similar to bpo-33614 .
The three missing symbols which are listed in python3.def
do clearly come into existence when the limited API is a
Change by Christian Tismer :
--
pull_requests: +7207
___
Python tracker
<https://bugs.python.org/issue33738>
___
___
Python-bugs-list mailing list
Unsubscribe:
Christian Tismer added the comment:
"""Excluding names from limited API can break existing code that use them with
defined Py_LIMITED_API."""
How is that different? Right now, the code would break at compile time,
because the macros are accessing opaque type
Christian Tismer added the comment:
On 07.06.18 17:59, Eric Snow wrote:
>
> Eric Snow added the comment:
>
> @Christian, you can use the "blurb" tool to create the NEWS entry. You can
> use pip to install it. See:
>
>
> https://devguide.python.org/
Change by Christian Tismer :
--
pull_requests: -7096
___
Python tracker
<https://bugs.python.org/issue33738>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Christian Tismer :
--
pull_requests: -6956
___
Python tracker
<https://bugs.python.org/issue33738>
___
___
Python-bugs-list mailing list
Unsubscribe:
Christian Tismer added the comment:
I did not understand the Misc/NEWS.d thing.
What should go where, or where would a "skip news" label go?
--
___
Python tracker
<https://bugs.python.o
Change by Christian Tismer :
--
pull_requests: +7100
___
Python tracker
<https://bugs.python.org/issue33738>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Christian Tismer :
--
pull_requests: +7096
___
Python tracker
<https://bugs.python.org/issue33738>
___
___
Python-bugs-list mailing list
Unsubscribe:
Christian Tismer added the comment:
Hi Ned,
we had a delivery date yesterday for PySide.
The PR is almost ready and will go out today.
Ciao - Chris
On 07.06.18 09:43, Ned Deily wrote:
>
> Ned Deily added the comment:
>
> Christian, any progress on this? 3.7.0rc1 is planned
Christian Tismer added the comment:
There is another catch that belongs in the same category.
There is line 2841 in typeobject.c
if (type->tp_dealloc == NULL) {
/* It's a heap type, so needs the heap types' dealloc.
subtype_dealloc will call the base type
Christian Tismer added the comment:
Yes, sure, I will submit a patch that tries to reach as much
as possible locations that have a similar problem. Of course,
the code will only be turned into functions for the PEP context.
Takes a day because I need to re-learn a bit how to do this :-)
(last
Christian Tismer added the comment:
Ok, I tried to submit a patch (not yet successful),
but as it stands, there are more locations in the code where
this will show up with similar problems.
Should I take care of these all as much as I can,
or is it better to leave it to one of you?
Whatever
Change by Christian Tismer :
--
keywords: +patch
pull_requests: +6956
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33738>
___
_
New submission from Christian Tismer :
The file number.rst on python 3.6 says
"""
.. c:function:: int PyIndex_Check(PyObject *o)
Returns ``1`` if *o* is an index integer (has the nb_index slot of the
tp_as_number structure filled in), and ``0`` otherwise.
""&qu
Christian Tismer added the comment:
Ned,
thank you for locating the patch that causes the problem.
At least, I could now make my script work, built a patch
feature into it.
cheers - Chris
--
___
Python tracker
<http://bugs.python.org/issue21
Christian Tismer added the comment:
Ned: """In general, we don't test or claim to support building for a deployment
target lower than the system being built on."""
This is not convincing, because the cpython builds are always
against <$ MACOSX_DEPLOYMEN
New submission from Christian Tismer:
Building python on OSX Mavericks (10.9)
of Python 3.4 crashes when this is set:
MACOSX_DEPLOYMENT_TARGET=10.7
This happens with OSX 10.9.2,
all current updates installed,
as of 2014-04-28.
Demo script:
You can use my attached script to validate this error
Christian Tismer added the comment:
added that with tests.
--
___
Python tracker
<http://bugs.python.org/issue19274>
___
___
Python-bugs-list mailing list
Unsub
Christian Tismer added the comment:
@georg:
> While reviewing: is it intended that the filter is only called for
> directories and not for individual files?
Not really. I will add this, later. Just wanted to see if this makes
sense and it's worth the effort t
Christian Tismer added the comment:
ah, I just see that.
The problem was that the checkin drove me nuts. It forced me to
run reindent to normalize the code. I did that with my WindIde
editor, but this did not help.
The point was: Actually an end-of-line was missing at the end of
the files.
Sorry
Changes by Christian Tismer :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue19274>
___
___
Python-bugs-list mailing list
Unsubscrib
Christian Tismer added the comment:
Ah, I understand:
The case that does not compile comes from the toplevel "test" folder,
which I could have excluded explicitly.
But it is not a complete solution:
If I want to add every package from the standard lib, then I necessarily
encounte
Christian Tismer added the comment:
@serhiy.storchaka
> I don't think this is needed. You can walk a tree and call writepy()
> for files and directories which you want.
What exactly do mean by "this" and "needed"?
I cannot see the connection of my initia
Christian Tismer added the comment:
Hi Georg,
So do you think it is ok this way?
I was not sure if extending the function with an optional
arg is ok, or if a method to configure PyZipFile would be better.
At the moment I just needed the simple functionality.
Should it maybe get a regex like
Christian Tismer added the comment:
Here is my use case as an example.
With this patch above, I can easily create a .zip file of the standard lib.
This was no longer possible at all, after revision 17558,
from 2001-04-18:
"""This is a test"""
from __futu
New submission from Christian Tismer:
zipfile.PyZipFile needs a filter function.
Reason:
When creating an archive of the python lib, we don't want the tests.
Especially the test file "badsyntax_future3.py" does not compile.
Use case:
With this little addition, it becomes very e
Christian Tismer added the comment:
Hi Tim,
Yes, this would be great to get sorted out.
Then we could make watchdog.py automatically
configure itself for network mounts.
Right now this makes no nense because of windows.
cheers - chris
--
nosy: +Christian.Tismer
Christian Tismer added the comment:
I would like to make an additional suggestion.
(and I implemented this yesterday):
Native namedtuple (not a derived class) can be made much simpler to handle
when no module and class machinery is involved at all.
The way I implemented it has no need for sys
58 matches
Mail list logo