Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue5872] New C API for declaring Python types

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Oct 27, 2009, 7:12 PM

Post #1 of 5 (102 views)
Permalink
[issue5872] New C API for declaring Python types

Changes by Alexander Belopolsky <belopolsky[at]users.sourceforge.net>:


----------
nosy: +belopolsky

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5872>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 4:34 AM

Post #2 of 5 (84 views)
Permalink
[issue5872] New C API for declaring Python types [In reply to]

Antoine Pitrou <pitrou[at]free.fr> added the comment:

This patch is huge.

Some things:
- you should provide an example of using the new API. Your description
is not very, well, descriptive :)
- "all PyTypeObjects must now be *pointers* rather than static
instances": is it mandatory, or did you add this out of "purity"? It
would be nice if we could minimize disruption (that is, provide the new
API as a feature, but not force ourselves and other people to rewrite
huge chunks of code)
- same for the private declaration of PyTypeObject: is it really
necessary to hide it from outside code?

Lastly, since your patch is not ready for consumption, I would advocate
creating a branch somewhere (on the SVN sandbox if you have access
rights, or in a separate e.g. bitbucket repository by cloning the
existing Mercurial mirror).

----------
nosy: +nnorwitz, pitrou

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5872>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 3:55 PM

Post #3 of 5 (83 views)
Permalink
[issue5872] New C API for declaring Python types [In reply to]

Larry Hastings <larry[at]hastings.org> added the comment:

Antoine: As the patch matured I would obviously provide documentation
and examples and such. The point of submitting the patch in this form
was a) so it was alive somewhere besides my hard drive, and b) to get
some public review from the core team to ensure I was going in a valid
direction.

As for mandatory vs purity: The whole purpose of the patch was to make
PyTypeObject a private type; see "THE PROBLEM" / "THE SOLUTION". This
requires that all the public interfaces take pointers. So within the
context of what the patch is trying to accomplish, it's mandatory.

The patch attempts to mitigate this as much as possible with the
backwards-compatibility

p.s. By "huge" I suspect you mean "large", though on first reading I
thought you meant "fabulous". That's what I get for working with a big
crew of 20-somethings.

p.p.s. Did this patch get mentioned recently or something? After months
of inactivity, there have been two nosy+ this week.

p.p.p.s. I have not touched this patch since submitting it. The
tribulations of working at a startup.

----------

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5872>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 3:57 PM

Post #4 of 5 (83 views)
Permalink
[issue5872] New C API for declaring Python types [In reply to]

Larry Hastings <larry[at]hastings.org> added the comment:

Whoops! I think I'll finish that unfinished sentence.

"The patch attempts to mitigate this as much as possible with the
backwards-compatibility"

header file; it minimizes as much as possible the changes you need to
perform to get your code up and working again. But I fear I've taken
that concept about as far as it makes sense to go.

----------

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5872>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 29, 2009, 4:11 PM

Post #5 of 5 (81 views)
Permalink
[issue5872] New C API for declaring Python types [In reply to]

Antoine Pitrou <pitrou[at]free.fr> added the comment:

> As the patch matured I would obviously provide documentation
> and examples and such.

What I meant is that it's difficult for me (and perhaps others) to
assess how much more practical your patch makes it to create C types.

> This
> requires that all the public interfaces take pointers. So within the
> context of what the patch is trying to accomplish, it's mandatory.

Hmm. That public interfaces take pointers is one thing, but that doesn't
mean the PyTypeObject structure itself must be concealed. It could be
exposed as an implementation detail.

Please note that your approach will make it difficult for third-party C
extensions to remain compatible accross several Python versions (those
before and after the API switch). While we sometimes change or deprecate
APIs, we never do it as massively as that (even the 2.x -> 3.x
transition is quite gentle).

> p.s. By "huge" I suspect you mean "large", though on first reading I
> thought you meant "fabulous". That's what I get for working with a big
> crew of 20-somethings.

I meant "large" indeed :)

> p.p.s. Did this patch get mentioned recently or something? After months
> of inactivity, there have been two nosy+ this week.

Well, a nosy+ bumps up the issue at the top of the recently modified
issues, which means other people notice it as well.

----------

_______________________________________
Python tracker <report[at]bugs.python.org>
<http://bugs.python.org/issue5872>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.