Blame SOURCES/116.patch

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