Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyFloat_FromString deprecated form #44541

Closed
jimjjewett mannequin opened this issue Feb 2, 2007 · 6 comments
Closed

PyFloat_FromString deprecated form #44541

jimjjewett mannequin opened this issue Feb 2, 2007 · 6 comments

Comments

@jimjjewett
Copy link
Mannequin

jimjjewett mannequin commented Feb 2, 2007

BPO 1650903
Nosy @gvanrossum, @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-01-06.22:29:46.829>
created_at = <Date 2007-02-02.19:41:29.000>
labels = []
title = 'PyFloat_FromString deprecated form'
updated_at = <Date 2008-01-06.22:29:46.829>
user = 'https://bugs.python.org/jimjjewett'

bugs.python.org fields:

activity = <Date 2008-01-06.22:29:46.829>
actor = 'admin'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['None']
creation = <Date 2007-02-02.19:41:29.000>
creator = 'jimjjewett'
dependencies = []
files = []
hgrepos = []
issue_num = 1650903
keywords = []
message_count = 6.0
messages = ['31165', '31166', '31167', '31168', '31169', '31170']
nosy_count = 3.0
nosy_names = ['gvanrossum', 'georg.brandl', 'jimjjewett']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1650903'
versions = ['Python 3.0']

@jimjjewett
Copy link
Mannequin Author

jimjjewett mannequin commented Feb 2, 2007

PyFloat_FromString takes two arguments, and the only purpose of the second is to avoid changing the API.

Extracts from Tim's 2000 comment:

Since we can't change the interface of a public API function, pend is still supported but now *officially* useless: if pend is not NULL, *pend is set to NULL.

@jimjjewett jimjjewett mannequin closed this as completed Feb 2, 2007
@jimjjewett jimjjewett mannequin closed this as completed Feb 2, 2007
@birkenfeld
Copy link
Member

What do you propose to do?

@birkenfeld
Copy link
Member

(cont'd)
C API functions shouldn't even change signature in Py 3000. Therefore, a new name would be needed...

@jimjjewett
Copy link
Mannequin Author

jimjjewett mannequin commented Mar 7, 2007

I didn't realize that a decision had been made about the C API stability.

I would indeed propose changing it, but probably not if it the rest of the API (even for strings and unicode?) is supposed to stay stable.

@gvanrossum
Copy link
Member

I think I should relax that statement a bit. IMO it's OK to change the signature (for Py3k) since the compiler will report an error if you call it with the old signature. What's *not* OK is to keep the signature (or to keep it compatible anyway) but change the *behavior*, as that would cause bugs that are only caught (if at all) at runtime, and will hence be hard to debug. Examples of bad changes would be changing the reference count behavior of an API, changing the type of object returned (if a specific type was previously documented) or making it possible to return NULL where this was previous not possible.

@birkenfeld
Copy link
Member

Okay, I fixed this case in rev. 54433.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants