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

Fix warning message #798

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Fix warning message #798

merged 1 commit into from
Feb 21, 2025

Conversation

aphi
Copy link
Contributor

@aphi aphi commented Feb 21, 2025

Right now there's a slightly confronting warning message that shows up the first time you import pulp.

Under the hood it's caused by the first time you compile the test code. (Only the first time, but you can reinvoke it if you delete the pulp/tests/__pycache__)
e.g.

$ uv add pulp==3.0.2            
Resolved 108 packages in 11ms
Installed 1 package in 2ms
 + pulp==3.0.2
$ uv run python
Python 3.12.8 (main, Jan  9 2025, 13:27:20) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pulp
/Users/antony/repo/data-analysis/.venv/lib/python3.12/site-packages/pulp/tests/test_pulp.py:1776: SyntaxWarning: invalid escape sequence '\d'
  """
/Users/antony/repo/data-analysis/.venv/lib/python3.12/site-packages/pulp/tests/test_pulp.py:1950: SyntaxWarning: invalid escape sequence '\d'
  command_line, option="strong", grp_pattern="\d+"
>>> 

I want to fix this just so it's a better experience for new users of pulp.

This PR fixes those warnings by escaping those characters correctly.

@pchtsp pchtsp merged commit bfdc672 into coin-or:master Feb 21, 2025
16 checks passed
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