File CVE-2022-42969-remove-svn-traces.patch of Package python-py.27845

Index: py-1.8.1/testing/path/test_local.py
===================================================================
--- py-1.8.1.orig/testing/path/test_local.py
+++ py-1.8.1/testing/path/test_local.py
@@ -327,11 +327,12 @@ class TestLocalPath(common.CommonFSTests
         l2 = local(l)
         assert l2 == l
 
-        wc = py.path.svnwc('.')
-        l3 = local(wc)
-        assert l3 is not wc
-        assert l3.strpath == wc.strpath
-        assert not hasattr(l3, 'commit')
+        # CVE-2022-42969 Remove all traces of svn
+        #wc = py.path.svnwc('.')
+        #l3 = local(wc)
+        #assert l3 is not wc
+        #assert l3.strpath == wc.strpath
+        #assert not hasattr(l3, 'commit')
 
     @py.test.mark.xfail(run=False, reason="unreliable est for long filenames")
     def test_long_filenames(self, tmpdir):
Index: py-1.8.1/py/__init__.py
===================================================================
--- py-1.8.1.orig/py/__init__.py
+++ py-1.8.1/py/__init__.py
@@ -55,12 +55,13 @@ apipkg.initpkg(__name__, attr={'_apipkg'
         'ParseError'     : vendor_prefix + 'iniconfig:ParseError',
     },
 
+    # CVE-2022-42969 Remove all traces of svn
     'path' : {
         '__doc__'        : '._path:__doc__',
-        'svnwc'          : '._path.svnwc:SvnWCCommandPath',
-        'svnurl'         : '._path.svnurl:SvnCommandPath',
+        #'svnwc'          : '._path.svnwc:SvnWCCommandPath',
+        #'svnurl'         : '._path.svnurl:SvnCommandPath',
         'local'          : '._path.local:LocalPath',
-        'SvnAuth'        : '._path.svnwc:SvnAuth',
+        #'SvnAuth'        : '._path.svnwc:SvnAuth',
     },
 
     # python inspection/code-generation API
openSUSE Build Service is sponsored by