[issue36347] Renaming the constants for the .flags of PyMemberDef

2020-02-18 Thread miss-islington
miss-islington added the comment: New changeset 24bba8cf5b8db25c19bcd1d94e8e356874d1c723 by Jeroen Demeyer in branch 'master': bpo-36347: stop using RESTRICTED constants (GH-12684) https://github.com/python/cpython/commit/24bba8cf5b8db25c19bcd1d94e8e356874d1c723 -- nosy: +miss-islin

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-04-04 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: For that, where did you see the macro was not used? maybe by an external library. -- ___ Python tracker ___ _

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-04-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +12612 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-25 Thread Ronald Oussoren
Ronald Oussoren added the comment: A discussion on the use of enum and deprecation warnings might be useful, although there is a significant risk on bike shedding. I agree that formally deprecating READONLY can lead to uglier code in extension that use the value and need to support anything

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am against deprecating READONLY. This will break virtually every third-party extension that use it. Many projects are strong about compiler warning and will need to rewrite the code that worked for years. I think that we can add the deprecation warning o

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: With the help of Victor, I don't need to implement __attribute__((deprecated)), this one is already defined in pyport.h So, I have updated my PR. Next step, update all the references of READONLY, ..., by the new constants. -- __

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: or with this feature of MSVS https://docs.microsoft.com/en-us/cpp/preprocessor/deprecated-c-cpp?view=vs-2017 -- ___ Python tracker ___ _

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @steve.dower Can I use this https://docs.microsoft.com/en-us/cpp/cpp/deprecated-cpp?view=vs-2017 for the deprecation? I am going to try with my PR but I would like to have your approbation if it's the right solution or not. Thank you -- nosy: +st

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Ronald, Please, could you check this PR and give me your advice, For the moment, it's just re-declaration of the current constants with the PY_ prefix and with an enumeration and the __attribute__(deprecated) The PR is in Draft mode and I will update it with

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +12478 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Ronald, I have checked with gcc and clang on my computer (fedora 29) This flag is defined in CLANG for the GNU and C++11 standard See this table: https://clang.llvm.org/docs/AttributeReference.html#deprecated We could integrate it because the unused fla

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Pretty good. In fact I wanted to replace the #define by const int and try to find a solution with gcc for a déprécation warning, but I was not sure about a such solution. Your proposal is really interesting and open new solutions. Thank you -- ___

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: Switches from #define's to an enum would allow explictly deprecating the old name (at least with clang and probably with GCC as well): clang -c -Wall t.c t.c:12:10: warning: 'READONLY' is deprecated: use PY_READONLY [-Wdeprecated-declarations] int i

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have closed the PR 12410. Feel free to submit another PR. -- ___ Python tracker ___ ___ Python-

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi @Josh, In the PR, I don't remove READONLY. READONLY becomes an alias of PY_READONLY. I think I should split my PR in two PRs 1. Improve the current documentation and the code 2. Change the code in the Modules/ with the new macros. @Serhyi what is your su

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-19 Thread Josh Rosenberg
Josh Rosenberg added the comment: Pretty sure you can't actually get rid of READONLY; it's part of the public API. Adding PY_READONLY to match PY_READWRITE is fine, but unlike WRITE_RESTRICTED/PY_WRITE_RESTRICTED (which isn't used at all in Py3, has been non-functional since 2.3, and caused

[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-19 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- title: Add the constant READWRITE for PyMemberDef -> Renaming the constants for the .flags of PyMemberDef ___ Python tracker ___