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 mbussonn
Recipients mbussonn
Date 2020-08-10.21:57:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

    $ cat
    import warnings
    from codeop import compile_command

    warnings.simplefilter('error', SyntaxWarning)
    res = compile_command('1 is 1\n', symbol='exec')
    print('Res', res)

On 3.8.0...3.8.4 this correctly raises a SyntaxError:

Traceback (most recent call last):
  File "", line 5, in <module>
    res = compile_command('1 is 1\n', symbol='exec')
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/", line 122, in compile_command
    return _maybe_compile(_compile, source, filename, symbol)
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/", line 99, in _maybe_compile
    raise err1
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/", line 87, in _maybe_compile
    code1 = compiler(source + "\n", filename, symbol)
  File "/Users/bussonniermatthias/miniconda3/envs/38/lib/python3.8/", line 102, in _compile
    return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
  File "<input>", line 1
SyntaxError: "is" with a literal. Did you mean "=="?

But will silently return None on 3.8.5

$ python
Res None
Date User Action Args
2020-08-10 21:57:55mbussonnsetrecipients: + mbussonn
2020-08-10 21:57:55mbussonnsetmessageid: <>
2020-08-10 21:57:55mbussonnlinkissue41520 messages
2020-08-10 21:57:55mbussonncreate