This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients abarry, ezio.melotti, gvanrossum, martin.panter, r.david.murray, serhiy.storchaka, vstinner, ztane
Date 2016-06-27.11:00:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
DeprecationWarning is used when we want to remove a feature. It becomes an error in the future. FutureWarning is used when we want change the meaning of a feature instead of removing it. For example re.split(':*', 'a:bc') emits a FutureWarning and returns ['a', 'bc'] because there is a plan to make it returning ['', 'a', 'b', 'c', ''].

I think "a silent warning" means that it should emit a DeprecationWarning or a PendingDeprecationWarning. Since there is no haste, we should use 2-releases deprecation period. After this a deprecation can be changed to a SynataxWarning in 3.8 and to a UnicodeDecodeError (for strings) and a ValueError (for bytes) in 4.0. The latter are converted to SyntaxError by parser. At the end we should get the same behavior as for truncated \x and \u escapes.

>>> '\u'
  File "<stdin>", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \uXXXX escape
>>> b'\x'
  File "<stdin>", line 1
SyntaxError: (value error) invalid \x escape at position 0

Maybe change a parser to convert warnings to a SyntaxWarning?
Date User Action Args
2016-06-27 11:00:51serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, vstinner, ezio.melotti, r.david.murray, martin.panter, ztane, abarry
2016-06-27 11:00:51serhiy.storchakasetmessageid: <>
2016-06-27 11:00:51serhiy.storchakalinkissue27364 messages
2016-06-27 11:00:51serhiy.storchakacreate