[Bug 2059412] Re: SyntaxWarning: invalid escape sequence '\.'

Launchpad Bug Tracker 2059412 at bugs.launchpad.net
Fri Apr 19 03:02:59 UTC 2024


This bug was fixed in the package software-properties - 0.99.48

---------------
software-properties (0.99.48) noble; urgency=medium

  * Fix Python's warning of invalid escape sequence (LP: #2059412).
  * Make pressing enter on close button of out-of-date cache dialog trigger
    the close button, not the reload button (LP: #2061978).
  * Limit the comments in 'other software' tab to a single line (LP: #2060915).
  * apt-add-repository --list now displays deb822 sources (LP: #2060331).

 -- Nathan Pratta Teodosio <nathan.teodosio at canonical.com>  Thu, 18 Apr
2024 09:17:51 +0200

** Changed in: software-properties (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/2059412

Title:
  SyntaxWarning: invalid escape sequence '\.'

Status in software-properties package in Ubuntu:
  Fix Released

Bug description:
  Installing software-properties gives

  --->
  /usr/lib/python3/dist-packages/softwareproperties/gtk/DialogMirror.py:197: SyntaxWarning: invalid escape sequence '\.'
    elif re.match("^((ftp)|(http)|(file)|(rsync)|(https))://([a-z]|[A-Z]|[0-9]|:|/|\.|~)+$", uri) == None:
  <---

  Marked as "wishlist" importance because Python still passes that to
  re.match as '\.' instead of '.', so the behavior is correct, as can be
  confirmed with

  --->
  % python3 -c 'print("\.")'
  <string>:1: SyntaxWarning: invalid escape sequence '\.'
  \.
  <---

  In a future Python version they will be eventually a SyntaxError[1].

  [1] https://docs.python.org/3/reference/lexical_analysis.html#escape-
  sequences

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2059412/+subscriptions




More information about the foundations-bugs mailing list