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

SyntaxWarning invalid escape sequence #483

Open
DavidMertz opened this issue Jan 24, 2025 · 0 comments
Open

SyntaxWarning invalid escape sequence #483

DavidMertz opened this issue Jan 24, 2025 · 0 comments

Comments

@DavidMertz
Copy link

When launching a project the indirectly utilizes geocoder I get a SyntaxWarning on Python 3.12:

/home/.../.venv/lib/python3.12/site-packages/geocoder/uscensus.py:36: SyntaxWarning: invalid escape sequence '\d'
  match = re.search('^\d+', self.address, re.UNICODE)

It looks like your library is pulled in by usaddress-scourgify, version = "0.6.0". From uv.lock I see:

name = "geocoder"
version = "1.38.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
    { name = "click" },
    { name = "future" },
    { name = "ratelim" },
    { name = "requests" },
    { name = "six" },
]
sdist = { url = "https://files.pythonhosted.org/packages/ea/0b/2ea440270c1efb7ac73450cb704344c8127f45dabff0bea48711dc9dd93a/geocoder-1.38.1.tar.gz", hash = "sha256:c9925374c961577d0aee403b09e6f8ea1971d913f011f00ca70c76beaf7a77e7", size = 64345 }
wheels = [
    { url = "https://files.pythonhosted.org/packages/4f/6b/13166c909ad2f2d76b929a4227c952630ebaf0d729f6317eb09cbceccbab/geocoder-1.38.1-py2.py3-none-any.whl", hash = "sha256:a733e1dfbce3f4e1a526cac03aadcedb8ed1239cf55bd7f3a23c60075121a834", size = 98590 },
]

The fix looks like it's a straightforward change to r'^\d+' rather than a plain non-rstring quote. I can submit a PR if that helps, but it's literally a one-character change.

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

1 participant