Skip to content

Bugfix: syaml_int repr for Python 3.8.0#13487

Merged
tgamblin merged 1 commit intospack:developfrom
scheibelp:bugfix/yaml-type-repr
Oct 29, 2019
Merged

Bugfix: syaml_int repr for Python 3.8.0#13487
tgamblin merged 1 commit intospack:developfrom
scheibelp:bugfix/yaml-type-repr

Conversation

@scheibelp
Copy link
Copy Markdown
Member

@scheibelp scheibelp commented Oct 29, 2019

Fixes #13247
Fixes #13355

#13247 (comment) notes that python 3.8.0 removes __str__ from int, so for python 3.8.0 invocations of int.__str__ fall back on int.__repr__. Spack's syaml_int type assigns __repr__ = str.__repr__ which appears to be causing failures.

This updates syaml_int type to use int.__repr__ rather than str.__repr__, which allows running Spack with Python 3.8.0 and assigning integer configuration settings.

@adamjstewart
Copy link
Copy Markdown
Member

Feel free to steal #13347 if you really want to test this.

@scheibelp
Copy link
Copy Markdown
Member Author

scheibelp commented Oct 29, 2019

@adamjstewart thanks - I tested with 3.8.0 manually as part of figuring out what the issue was so I think this is set

@scheibelp scheibelp requested a review from tgamblin October 29, 2019 19:09
@scheibelp scheibelp changed the title [WIP] Bugfix syaml_int repr for Python 3.8.0 Bugfix: syaml_int repr for Python 3.8.0 Oct 29, 2019
@tgamblin
Copy link
Copy Markdown
Member

Thanks @scheibelp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants