[issue2897] Deprecate structmember.h

2020-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Note that structmember.h pollutes global namespace with macros that do not 
> have conventional Py_ or PY_ prefix.  READONLY and RESTRICTED macros seem to 
> be most likely to conflict with other code.

One small enhance would be to add such prefix when Py_LIMITED_API is defined.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2020-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

Also, the bare minimum enhancement would be add rename READONLY to PY_READONLY, 
but keep a deprecated alias READONLY to PY_READONLY, and update CPython code 
base to use PY_READONLY. (Same for other similar flags.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2020-05-27 Thread Matthias Braun


Matthias Braun  added the comment:

> The issue title is misleading, it says "Deprecate structmember.h". Is the 
> plan still to deprecate it? Or to make it usable in the limited C API? Please 
> update the title.

As far as I understand it: The attached diff, moves the interesting declaration 
to `object.h` solving the limited API problem. And only leaves structmember.h 
around for backward compatibility for people using the "old" names `READONLY` 
or `RESTRICTED`. So in that sense it does deprecate structmember.h

But indeed I hijacked this issue with my complaints about the limited API which 
may not have been the original intention here, but they get solved nonetheless.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2020-05-27 Thread STINNER Victor


STINNER Victor  added the comment:

> The proposed patch here, would fix this!

The issue title is misleading, it says "Deprecate structmember.h". Is the plan 
still to deprecate it? Or to make it usable in the limited C API? Please update 
the title.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2020-05-27 Thread Matthias Braun


Change by Matthias Braun :


--
components: +C API
versions: +Python 3.10 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2020-05-27 Thread Matthias Braun


Matthias Braun  added the comment:

This wasn't mentioned before: Having PyMemberDef part of the structmember.h is 
a big problem for users of PEP384/limited API, because structmember.h is not 
part of it.

Which results in the odd situation that `Py_tp_members` or 
`PyDescr_NewMember()` are part of the limited API but technically you cannot 
use it because you are not supposed to include headers that are not part of 
`Python.h`.

The proposed patch here, would fix this!

--
nosy: +Matthias Braun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I move this issue to master (3.8)

--
nosy: +matrixise, vstinner
versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2016-10-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: docs@python -> belopolsky
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2016-10-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am attaching a proposed doc patch for Python 3.5+.  For 2.7 we should 
probably just add a versionchanged note explaining "restricted mode" has been 
deprecated in Python 2.3.

--
Added file: http://bugs.python.org/file44976/issue2897-docs-3x.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2016-10-04 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2897] Deprecate structmember.h

2016-10-03 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Changed the title to reflect the way forward and added affected versions to 
remember to update the documentation.  See #28349 and #24065 for details.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
title: include structmember.h in Python.h -> Deprecate structmember.h
versions: +Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com