Blame SOURCES/116.patch

446129
From 9c7d865e17ec16a847090a3e0d1498b698b99756 Mon Sep 17 00:00:00 2001
446129
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
446129
Date: Mon, 14 Nov 2022 12:30:12 +0100
446129
Subject: [PATCH 1/2] Drop py.code usage from tests, no longer depend on the
446129
 deprecated py package
446129
446129
--HG--
446129
branch : py.code
446129
---
446129
 README.md                                     | 2 +-
446129
 requirements.txt                              | 1 -
446129
 testing/cffi0/test_zintegration.py            | 3 ++-
446129
 testing/cffi1/test_dlopen_unicode_literals.py | 4 ++--
446129
 4 files changed, 5 insertions(+), 5 deletions(-)
446129
446129
diff --git a/README.md b/README.md
446129
index b4b84884..d39d88da 100644
446129
--- a/README.md
446129
+++ b/README.md
446129
@@ -30,7 +30,7 @@ Testing/development tips
446129
 
446129
 To run tests under CPython, run::
446129
 
446129
-    pip install pytest py  # if you don't have pytest and py already
446129
+    pip install pytest    # if you don't have pytest already
446129
     pip install pycparser
446129
     python setup.py build_ext -f -i
446129
     pytest c/ testing/
446129
diff --git a/requirements.txt b/requirements.txt
446129
index 881a093f..a97f0282 100644
446129
--- a/requirements.txt
446129
+++ b/requirements.txt
446129
@@ -1,3 +1,2 @@
446129
 pycparser
446129
 pytest
446129
-py
446129
diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py
446129
index d6a02ce0..ca2d4642 100644
446129
--- a/testing/cffi0/test_zintegration.py
446129
+++ b/testing/cffi0/test_zintegration.py
446129
@@ -1,5 +1,6 @@
446129
 import py, os, sys, shutil
446129
 import subprocess
446129
+import textwrap
446129
 from testing.udir import udir
446129
 import pytest
446129
 
446129
@@ -66,7 +67,7 @@ def really_run_setup_and_program(dirname, venv_dir_and_paths, python_snippet):
446129
         remove(os.path.join(basedir, '__pycache__'))
446129
     olddir = os.getcwd()
446129
     python_f = udir.join('x.py')
446129
-    python_f.write(py.code.Source(python_snippet))
446129
+    python_f.write(textwrap.dedent(python_snippet))
446129
     try:
446129
         os.chdir(str(SNIPPET_DIR.join(dirname)))
446129
         if os.name == 'nt':
446129
diff --git a/testing/cffi1/test_dlopen_unicode_literals.py b/testing/cffi1/test_dlopen_unicode_literals.py
446129
index e792866e..dc955a57 100644
446129
--- a/testing/cffi1/test_dlopen_unicode_literals.py
446129
+++ b/testing/cffi1/test_dlopen_unicode_literals.py
446129
@@ -1,4 +1,4 @@
446129
-import py, os
446129
+import os
446129
 
446129
 s = """from __future__ import unicode_literals
446129
 """
446129
@@ -6,4 +6,4 @@ s = """from __future__ import unicode_literals
446129
 with open(os.path.join(os.path.dirname(__file__), 'test_dlopen.py')) as f:
446129
     s += f.read()
446129
 
446129
-exec(py.code.compile(s))
446129
+exec(compile(s, filename='test_dlopen.py', mode='exec'))
446129
-- 
446129
GitLab
446129
446129
446129
From 4c1551037965864cfe5494647af014e2390d077c Mon Sep 17 00:00:00 2001
446129
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
446129
Date: Mon, 14 Nov 2022 13:12:31 +0100
446129
Subject: [PATCH 2/2] Make the space count consistent with the past
446129
446129
--HG--
446129
branch : py.code
446129
---
446129
 README.md | 2 +-
446129
 1 file changed, 1 insertion(+), 1 deletion(-)
446129
446129
diff --git a/README.md b/README.md
446129
index d39d88da..21c82b84 100644
446129
--- a/README.md
446129
+++ b/README.md
446129
@@ -30,7 +30,7 @@ Testing/development tips
446129
 
446129
 To run tests under CPython, run::
446129
 
446129
-    pip install pytest    # if you don't have pytest already
446129
+    pip install pytest     # if you don't have pytest already
446129
     pip install pycparser
446129
     python setup.py build_ext -f -i
446129
     pytest c/ testing/
446129
-- 
446129
GitLab
446129