File: python312.patch

package info (click to toggle)
csound 1%3A6.18.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 63,260 kB
  • sloc: ansic: 192,643; cpp: 14,149; javascript: 9,654; objc: 9,181; python: 3,376; java: 3,337; sh: 1,840; yacc: 1,255; xml: 985; perl: 635; lisp: 411; tcl: 341; lex: 217; makefile: 128
file content (36 lines) | stat: -rw-r--r-- 1,475 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Date: Wed, 21 Aug 2024 10:22:40 +0200
Subject: Fix raw string for Python3.12

Origin: Debian
Bug: https://github.com/csound/csound/issues/1906
Last-Update: 2024-07-01

Py3.12 bails out if it encounters an invalid escape sequence
Last-Update: 2024-07-01
---
 tests/commandline/test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- csound.orig/tests/commandline/test.py
+++ csound/tests/commandline/test.py
@@ -193,7 +193,7 @@
         expectedResult = (len(t) == 3) and 1 or 0
 
         if(os.sep == '\\' or os.name == 'nt'):
-            executable = (csoundExecutable == "") and "..\csound.exe" or csoundExecutable
+            executable = (csoundExecutable == "") and r"..\csound.exe" or csoundExecutable
             command = "%s %s %s %s/%s 2> %s"%(executable, parserType, runArgs, sourceDirectory, filename, tempfile)
             print(command)
             retVal = os.system(command)
--- csound.orig/interfaces/ctcsound.py
+++ csound/interfaces/ctcsound.py
@@ -1611,7 +1611,7 @@
     
     #Channels, Control and Events
     def channelPtr(self, name, type_):
-        """Returns a pointer to the specified channel and an error message.
+        r"""Returns a pointer to the specified channel and an error message.
         
         If the channel is a control or an audio channel, the pointer is
         translated to an ndarray of MYFLT. If the channel is a string channel,