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

[2024.8.3] SyntaxWarning: invalid escape sequence #1019

Open
picca opened this issue Sep 25, 2024 · 6 comments
Open

[2024.8.3] SyntaxWarning: invalid escape sequence #1019

picca opened this issue Sep 25, 2024 · 6 comments

Comments

@picca
Copy link

picca commented Sep 25, 2024

Hello,

a bunch of warning when installing cctbx on Debian/Ubuntu/Mint/...

this is expected to fail with Python 3.13 if I am not wrong.

Cheers

Setting up python3-cctbx (2024.8+ds2+~3.21.1+ds1-1) ...
/usr/lib/python3/dist-packages/iotbx/pdb/utils.py:8: SyntaxWarning: invalid escape sequence '\{'
  """ Iterator to generate strings of length n_chars, using upper-case,
/usr/lib/python3/dist-packages/iotbx/pdb/utils.py:46: SyntaxWarning: invalid escape sequence '\/'
  special_characters = """[]_,.;:"&<>()\/\{}'`~!@#$%*|+-"""
/usr/lib/python3/dist-packages/xfel/merging/application/errors/error_modifier_mm24.py:777: SyntaxWarning: invalid escape sequence '\o'
  width=pairwise_differences_db, label='$\omega_{hkl}$'
/usr/lib/python3/dist-packages/xfel/merging/application/errors/error_modifier_mm24.py:792: SyntaxWarning: invalid escape sequence '\o'
  axes[0].set_ylabel('Distribution of $\omega_{hbk}$')
/usr/lib/python3/dist-packages/xfel/merging/application/errors/error_modifier_mm24.py:793: SyntaxWarning: invalid escape sequence '\o'
  axes[0].set_xlabel('Normalized PD ($\omega_{hbk}$)')
/usr/lib/python3/dist-packages/xfel/merging/application/errors/error_modifier_mm24.py:812: SyntaxWarning: invalid escape sequence '\o'
  axes[1].set_xlabel('Sorted Normalized PD ($\omega_{hbk}$)')
/usr/lib/python3/dist-packages/xfel/merging/application/errors/error_modifier_mm24.py:831: SyntaxWarning: invalid escape sequence '\s'
  axes[2].set_ylabel('Standard Deviation of $I_{hbk}/\sigma_{hbk}$')
/usr/lib/python3/dist-packages/xfel/merging/application/errors/error_modifier_mm24.py:860: SyntaxWarning: invalid escape sequence '\m'
  axes_sadd.set_ylabel('$s_{\mathrm{fac}}^2 \\times s_{\mathrm{add}}^2$')
Processing triggers for libc-bin (2.40-2) ...
@bkpoon
Copy link
Member

bkpoon commented Sep 25, 2024

This is showing up on our syntax checks for the Python 3.13 release candidates. I'm working on updating our static conda environments and will start testing Python 3.13 soon.

@picca
Copy link
Author

picca commented Sep 25, 2024 via email

@bkpoon
Copy link
Member

bkpoon commented Sep 25, 2024

Do you mean the update_libtbx_env.py script?

https://github.com/cctbx/cctbx_project/blob/master/libtbx/auto_build/conda_build/update_libtbx_env.py

That script is specific to conda and their directory structure. If you tell me your directory structure, we can update it to handle that. For example, the Python modules are in a site-packages directory, not dist-packages, but that directory can be exposed as a command-line option.

@picca
Copy link
Author

picca commented Sep 25, 2024 via email

@bkpoon
Copy link
Member

bkpoon commented Sep 25, 2024

Is the script in the Debian fork under the "debian" directory?

https://salsa.debian.org/science-team/cctbx/-/blob/master/debian/update_libtbx_env.py?ref_type=heads

It looks like you added the file to that directory in 2022 (https://salsa.debian.org/science-team/cctbx/-/commit/fc5efd8e334f5674dc5a96940d19d3e69a34454d).

I have the file in our commit history since 2020 (990ba48). 😄

I had to create this to put things in the right place for the conda package. It looks like the non-linux platform things were removed.

Some questions for integration,

  1. Do you build this for different versions of Python and then have the libtbx environment file in a directory for that specific version of Python ('--dest-dir` flag)?
  2. How are the command line tools structured in the Debian installations? We have "dispatchers" that will set things like PYTHONPATH in our development builds. The conda packages do not have that and will actively unset those kinds of environment variables. We also prepend the 'bin' directory from the conda environment in PATH so that the conda environment binaries take precedence. Also, that generally lets us run the code without "activating" the conda environment. If we eventually have some conda dependency that does some extra stuff during environment activation, the extra activation steps can be added into our dispatchers as well.

The timeline for merging the 2 scripts would be later this year or next year.

@bkpoon
Copy link
Member

bkpoon commented Sep 25, 2024

I forgot to mention that we are compatible with Boost 1.86 and Numpy 2. For Boost, you would need the Numpy 2 patches here (https://github.com/conda-forge/boost-feedstock/tree/v1.84.x/recipe/patches, the main branch is currently 1.86, but the Numpy 2 patches were also applied to 1.84).

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

2 participants