python-poetry / python-poetry/tomlkit

new SyntaxWarning with python 3.8: invalid escape sequence \e

Open
#51 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
850
Forks
162
Avg merge
13m
Merged PRs (30d)
2

Description

These warnings are new with python 3.8 (see the "Changed in version 3.8" note at the end of https://docs.python.org/3.8/reference/lexical_analysis.html#string-and-bytes-literals ):

=============================== warnings summary ===============================
tests/test_write.py:8
  /builddir/build/BUILD/tomlkit-0.5.3/tests/test_write.py:8: SyntaxWarning: invalid escape sequence \e
    d = {"foo": "\e\u25E6\r"}

tests/test_write.py:14
  /builddir/build/BUILD/tomlkit-0.5.3/tests/test_write.py:14: SyntaxWarning: invalid escape sequence \e
    assert loads(dumps(d))["foo"] == "\e\u25E6\r"

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=============== 2 failed, 225 passed, 2 warnings in 2.28 seconds ===============

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the string literals reported in tests/test_write.py at lines 8 and 14, then run the relevant test file under Python 3.8 or newer. Done means the tests still pass and no invalid escape sequence SyntaxWarning is emitted for these cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.