trentm / trentm/python-markdown2
Deprecation warning due to invalid escape sequences in Python 3.8
Open
Nobody has claimed this yet.
Tech debt
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 459
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Deprecation warnings are raised due to invalid escape sequences in Python 3.8 . Below is a log of the warnings raised during compiling all the python files. Using raw strings or escaping them will fix this issue.
find . -iname '*.py' | xargs -P 4 -I{} python -Wall -m py_compile {}
./test/testall.py:23: DeprecationWarning: invalid escape sequence \.
ver_bits = re.split("\.|[^\d]", ver_str, 2)[:2]
./lib/markdown2.py:449: DeprecationWarning: invalid escape sequence \s
"(.*:\s+>\n\s+[\S\s]+?)(?=\n\w+\s*:\s*\w+\n|\Z)", re.MULTILINE)
./lib/markdown2.py:2167: DeprecationWarning: invalid escape sequence \w
_incomplete_tags_re = re.compile("<(/?\w+[\s/]+?)")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported find and python -Wall -m py_compile command across the Python files. Inspect test/testall.py and lib/markdown2.py at the reported warning locations, then rerun the compile check and confirm the invalid escape sequence warnings are gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100