Skip to content

BUG: Use raw strings for paths in __config__.py.in #17936

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

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

ganesh-k13
Copy link
Contributor

@ganesh-k13 ganesh-k13 commented Feb 6, 2023

Reference issue

resolves #17934

What does this implement/fix?

  • \U leads to strings being treated as unicode, hence we escape it with raw strings
  • Changed bool parameters to real bools instead of string "True" and "False"

Additional information

* `\U` leads to strings being treated as unicode, hence we escape it
  with raw strings
* Changed bool parameters real bools instead of string `"True"` and
  `"False"`

[wheel build]
@tupui tupui requested a review from andyfaff February 6, 2023 15:08
@tupui tupui added defect A clear bug or issue that prevents SciPy from being installed or used as expected maintenance Items related to regular maintenance tasks Meson Items related to the introduction of Meson as the new build system for SciPy and removed maintenance Items related to regular maintenance tasks labels Feb 6, 2023
@mattip
Copy link
Contributor

mattip commented Feb 6, 2023

It seems these are the build time python and include file paths. Is that going to be relevant for end users?

@andyfaff
Copy link
Contributor

andyfaff commented Feb 8, 2023

@mattip, probably not.

@andyfaff andyfaff merged commit 750442f into scipy:main Feb 8, 2023
@andyfaff
Copy link
Contributor

andyfaff commented Feb 8, 2023

Thank you @ganesh-k13.

@j-bowhay j-bowhay added this to the 1.11.0 milestone Feb 8, 2023
@andyfaff andyfaff added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Feb 16, 2023
@andyfaff
Copy link
Contributor

@tylerjereddy I think this has to be backported to allow the Windows wheels to be built, otherwise the wheel tests fail.

@tylerjereddy
Copy link
Contributor

@andyfaff Indeed, thanks, the Windows wheel failures were observed in the backport PR cross-linked above.

ganesh-k13 added a commit to ganesh-k13/numpy that referenced this pull request Feb 17, 2023
* `\U` leads to strings being treated as unicode, hence we escape it
  with raw strings
* Changed bool parameters real bools instead of string `"True"` and
  `"False"`
* Small refactor in `_cleanup` to make it consistent with SciPy

Taken from scipy/scipy#17936
@tylerjereddy tylerjereddy modified the milestones: 1.11.0, 1.10.1 Feb 18, 2023
@tylerjereddy tylerjereddy removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Feb 19, 2023
rgommers added a commit to rgommers/scipy that referenced this pull request Jan 22, 2024
Reported in conda-forge/scipy-feedstock#264:
linker args contained a `\s` on Windows as part of a path in a linker
flag.

This is basically the same bug as scipygh-17936, it was fixed for paths
in `__config__.py` but not for things like linker flags which usually
don't contain a path but may do so.

Now turn everything except name/version/found/id, which really should
not contain escapes, into raw strings.

[skip circle] [skip cirrus]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Meson Items related to the introduction of Meson as the new build system for SciPy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: meson __config__ generation - truncated unicode characters
6 participants