#115 Get rid of SyntaxWarning: invalid escape sequence '\d'
Merged 8 days ago by tdawson. Opened 9 days ago by churchyard.
centos/ churchyard/centpkg escape-sequence  into  develop

file modified
+1 -1
@@ -171,7 +171,7 @@ 

          # For MD5 we want to use the old format of source files, the BSD format

          # should only be used when configured for SHA512

          self.source_entry_type = "bsd" if self.lookasidehash != "md5" else "old"

-         self.branchre = "c\d{1,}(s)?(tream)?|master"

+         self.branchre = r"c\d{1,}(s)?(tream)?|master"

  

      @property

      def distgitdir(self):

no initial comment

Could you give an example of when this is happening, so I can see that it is fixed.

Every time on Feodra 41+

$ centpkg 
/usr/lib/python3.13/site-packages/centpkg/__init__.py:174: SyntaxWarning: invalid escape sequence '\d'
  self.branchre = "c\d{1,}(s)?(tream)?|master"
usage: centpkg [-h] ...

I saw this once on rawhide, then did a system update, and I'm not seeing that error again.
But on the other hand, this isn't causing any harm on any of the machines I tested it on.
So I'm ok merging it.

LGTM :thumbsup:

The error might be getting suppressed, but this is a real issue with the code that should be fixed. Thanks, Miro.

rebased onto 12342a1

8 days ago

Pull-Request has been merged by tdawson

8 days ago
Metadata