[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2020-06-16 Thread miss-islington
miss-islington added the comment: New changeset 2c6d6c12c2d1a8f0c131d70ccf087555c52d4587 by Miss Islington (bot) in branch '3.9': bpo-19569: Add a macro to suppress deprecation warnings (GH-9004) https://github.com/python/cpython/commit/2c6d6c12c2d1a8f0c131d70ccf087555c52d4587 --

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2020-06-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 10.0 -> 11.0 pull_requests: +20089 pull_request: https://github.com/python/cpython/pull/20907 ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2020-06-15 Thread Inada Naoki
Inada Naoki added the comment: New changeset de4304dad8e035dbbb57d653e685312eead816df by Zackery Spytz in branch 'master': bpo-19569: Add a macro to suppress deprecation warnings (GH-9004) https://github.com/python/cpython/commit/de4304dad8e035dbbb57d653e685312eead816df -- nosy:

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2019-05-28 Thread STINNER Victor
STINNER Victor added the comment: bpo-33407 added MSVC support for Py_DEPRECATED(). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2018-08-29 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2018-08-29 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +8475 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2017-05-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not have the possibility to test on Windows. Maybe someone wants to test Arfrever's suggestion. -- assignee: serhiy.storchaka -> ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -1085 ___ Python tracker ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1085 ___ Python tracker ___ ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Arfrever, could you please provide your proposition as a patch? -- ___ Python tracker ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 75fe67538905 by Serhiy Storchaka in branch '3.5': Issue #19569: Suggested more appropriate replacements for deprecated Unicode https://hg.python.org/cpython/rev/75fe67538905 New changeset f26d3f9a958a by Serhiy Storchaka in branch '3.6': Issue

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-08 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: About MSVC compiler: https://msdn.microsoft.com/en-us/library/044swk7y.aspx https://msdn.microsoft.com/en-us/library/2c8f766e.aspx https://msdn.microsoft.com/en-us/library/d9x1s805.aspx So both: #pragma warning(push) #pragma

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Or, is this a "statement of direction" that only GCC (syntax) compilers are > (going to be) supported? This is only the first step. Since this feature is compiler specific, we should add the support for every compiler separately. Arfrever suggested the

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-07 Thread STINNER Victor
STINNER Victor added the comment: > Proposed patch marks most deprecated functions. Code is rewritten for using > non-deprecated functions if possible. Unfortunately some deprecated function > still are used in the code and can't be easier replaced. They are left not > marked. Hum, I suggest

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-07 Thread Michael Felt
Michael Felt added the comment: I am not compiler specialist, but as I do not use GCC (it adds extra run-time environment (support) requirements when not in a GNU environment such as Linux - I am just wondering what effect this has (e.g., no deprecated message) when not using GCC. Or, is

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: _Pragma syntax would be more suitable since it could be used with macros: https://gcc.gnu.org/onlinedocs/gcc-6.2.0/cpp/Pragmas.html Then Include/pyport.h (which defines Py_DEPRECATED) could also define: #if defined(__GNUC__) && ((__GNUC__

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: GCC supports pragmas to locally control warnings. https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Diagnostic-Pragmas.html Example: __attribute__((__deprecated__)) int some_deprecated_function(void) {

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated documentation. This part should be backported to all maintained 3.x versions. -- Added file: http://bugs.python.org/file45370/mark-deprecated-functions-2.patch ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch marks most deprecated functions. Code is rewritten for using non-deprecated functions if possible. Unfortunately some deprecated function still are used in the code and can't be easier replaced. They are left not marked. *

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FYI I used Py_DEPRECATED for marking PyUnicode_AsDecodedObject, PyUnicode_AsDecodedUnicode, PyUnicode_AsEncodedObject and PyUnicode_AsEncodedUnicode. -- ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Build versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-09-23 Thread STINNER Victor
STINNER Victor added the comment: Ping myself! I just cited this GCC attribute in a recent discussion on deprecating macros in the C API: https://mail.python.org/pipermail/python-dev/2016-September/146537.html -- ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2015-03-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___ ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-29 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-29 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: There is already Py_DEPRECATED in Include/pyport.h: #if defined(__GNUC__) ((__GNUC__ = 4) || \ (__GNUC__ == 3) (__GNUC_MINOR__ = 1)) #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__)) #else #define

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Idea looks good to me. -- components: +Interpreter Core nosy: +serhiy.storchaka type: - enhancement versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does the __attribute__ work for macros as well? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___ ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Deprecated macros can be replaced by deprecated functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread eryksun
eryksun added the comment: MSC has __declspec(deprecated). See http://stackoverflow.com/a/21265197, for example. It's a level 3 (/W3) warning. http://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.100%29.aspx -- nosy: +eryksun ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2013-11-13 Thread STINNER Victor
New submission from STINNER Victor: Python C API evolves. For example, the Unicode type has been rewriten for scratch to use a more efficient design. Would it be possible to mark deprecated functions as deprecated, so users will be noticed that the API evolved and Python has better functions?

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2013-11-13 Thread STINNER Victor
STINNER Victor added the comment: I just commited a change to avoid PyUnicode_GET_SIZE(): this function doesn't handle errors very well, if PyUnicode_AsUnicode() fails, the result is zero. The caller is unable to know that an error occurred. http://hg.python.org/cpython/rev/28f71af02b69