Skip to content

Parser fix#167

Merged
haraldschilly merged 3 commits into
sagemath:masterfrom
vincentmacri:parser-fix
Oct 1, 2025
Merged

Parser fix#167
haraldschilly merged 3 commits into
sagemath:masterfrom
vincentmacri:parser-fix

Conversation

@vincentmacri
Copy link
Copy Markdown
Member

@vincentmacri vincentmacri commented Oct 1, 2025

Apparently the more recent Python I tested #166 with locally has features not present on the Python used by the deployment CI.

Also ran the ruff formatter to clean things up a bit.

@vincentmacri vincentmacri mentioned this pull request Oct 1, 2025
@haraldschilly
Copy link
Copy Markdown
Member

So, just FYI: I tried this in python3.10, on my computer. single-quotes inside single-quotes trip the parser over. single-quotes in double-quotes, work:

hsy@x2:~$ python3.10
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = {"asdf" : 123}
>>> print(f"foo {x.get('asdf')}")
foo 123
>>> print(f'foo {x.get('asdf')}')
  File "<stdin>", line 1
    print(f'foo {x.get('asdf')}')
                        ^^^^
SyntaxError: f-string: unmatched '('

Despite that, we can always also tweak the workflow task:

https://github.com/sagemath/website/blob/master/.github/workflows/build.yml

@haraldschilly haraldschilly merged commit 7a9928e into sagemath:master Oct 1, 2025
1 check passed
@haraldschilly
Copy link
Copy Markdown
Member

ok, well, thank you for taking your time to improve this ancient code!

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

Successfully merging this pull request may close these issues.

2 participants