Prints a bunch of syntax warnings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
itstool (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
24.04 beta, fully updated.
Simply start 'itstool'. Notice how it spits out a lot of syntax warnings:
/usr/
if re.sub('\s+', ' ', text).strip() != '':
/usr/
message = re.sub('\s+', ' ', message).strip()
/usr/
return re.sub('\s+', ' ', self.locnote)
/usr/
return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref
/usr/
regex = re.compile('(.*) \<(.*)\>, (.*)')
/usr/
if re.sub('\s+', '', prevtext) == '':
/usr/
_locale_pattern = re.compile(
I don't know if these invalid escape sequences in turn cause any actual misbehavior.
(I noticed these warnings while compiling gnome-terminal. These weren't there in 23.10.)
summary: |
- Prints a bunch of syntax warning + Prints a bunch of syntax warnings |
description: | updated |
itstool didn't change from 23.10, python3 did.
This article seems relevant: https:/ /adamj. eu/tech/ 2022/11/ 04/why- does-python- deprecationwarn ing-invalid- escape- sequence/
and it also claims that python 3.11 already gave warnings if you asked for it (which wasn't the default), but with python 3.12+ these warnings are enabled by default.
Anyway, itstool is using some Python regex stuff incorrectly.