Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid syntax #908

Closed
abhinavsingh opened this issue Sep 20, 2023 · 2 comments
Closed

SyntaxError: invalid syntax #908

abhinavsingh opened this issue Sep 20, 2023 · 2 comments

Comments

@abhinavsingh
Copy link

abhinavsingh commented Sep 20, 2023

Write to now seems to be producing invalid python files:

_scm_version.py", line 6
    __version__ : str = version : str = '1.3.0rc9.dev290+g7dce6a7'
                                ^
SyntaxError: invalid syntax

Previously we used to see

# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '1.3.0rc9.dev289+g7451c8a.d20230920'
version_tuple = (1, 3, 0, 'dev289', 'g7451c8a.d20230920')

which then changed to:

# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '1.3.0rc9.dev289+g7451c8a.d20230920'
__version_tuple__ = version_tuple = (1, 3, 0, 'dev289', 'g7451c8a.d20230920')

but since TODAY , we are seeing inclusion of typing syntax in generated files, leading to our workflow failures. I tried to reproduce locally without any luck, on my local I don't see any typing information in generated files.

Workaround

Pin to setuptools-scm[toml] == 7.1.0

@abhinavsingh abhinavsingh changed the title Generating invalid python files SyntaxError: invalid syntax Sep 20, 2023
@andrewmwilson
Copy link

This is a duplicate of #905

@RonnyPfannschmidt RonnyPfannschmidt closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2023
@abhinavsingh
Copy link
Author

This is a duplicate of #905

But we are seeing this for python > 3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants