Update to 4.6.10.
This commit is contained in:
parent
71d2106fc3
commit
87954bbbb1
@ -1,44 +0,0 @@
|
|||||||
From 24898e06404fdade3c37c9229402ea817d068e75 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bruno Oliveira <nicoddemus@gmail.com>
|
|
||||||
Date: Sun, 5 Jan 2020 14:15:51 -0300
|
|
||||||
Subject: [PATCH] Remove usage of parser module, deprecated in Python 3.9
|
|
||||||
|
|
||||||
Fix #6404
|
|
||||||
---
|
|
||||||
changelog/6404.trivial.rst | 1 +
|
|
||||||
src/_pytest/_code/source.py | 9 ++-------
|
|
||||||
2 files changed, 3 insertions(+), 7 deletions(-)
|
|
||||||
create mode 100644 changelog/6404.trivial.rst
|
|
||||||
|
|
||||||
diff --git a/changelog/6404.trivial.rst b/changelog/6404.trivial.rst
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000..8252098b6a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/changelog/6404.trivial.rst
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+Remove usage of ``parser`` module, deprecated in Python 3.9.
|
|
||||||
diff --git a/src/_pytest/_code/source.py b/src/_pytest/_code/source.py
|
|
||||||
index c8a4b6adf3..b35e97b9ce 100644
|
|
||||||
--- a/src/_pytest/_code/source.py
|
|
||||||
+++ b/src/_pytest/_code/source.py
|
|
||||||
@@ -123,18 +123,13 @@ def isparseable(self, deindent=True):
|
|
||||||
""" return True if source is parseable, heuristically
|
|
||||||
deindenting it by default.
|
|
||||||
"""
|
|
||||||
- from parser import suite as syntax_checker
|
|
||||||
-
|
|
||||||
if deindent:
|
|
||||||
source = str(self.deindent())
|
|
||||||
else:
|
|
||||||
source = str(self)
|
|
||||||
try:
|
|
||||||
- # compile(source+'\n', "x", "exec")
|
|
||||||
- syntax_checker(source + "\n")
|
|
||||||
- except KeyboardInterrupt:
|
|
||||||
- raise
|
|
||||||
- except Exception:
|
|
||||||
+ ast.parse(source)
|
|
||||||
+ except (SyntaxError, ValueError, TypeError):
|
|
||||||
return False
|
|
||||||
else:
|
|
||||||
return True
|
|
10
pytest.spec
10
pytest.spec
@ -1,14 +1,11 @@
|
|||||||
Name: pytest
|
Name: pytest
|
||||||
Version: 4.6.9
|
Version: 4.6.10
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Simple powerful testing with Python
|
Summary: Simple powerful testing with Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pytest.org
|
URL: https://pytest.org
|
||||||
Source0: %{pypi_source}
|
Source0: %{pypi_source}
|
||||||
|
|
||||||
# Remove usage of parser module, deprecated in Python 3.9
|
|
||||||
Patch1: https://github.com/pytest-dev/pytest/commit/f606fef19d035719be6ed862f7f426a0e7c582e1.patch
|
|
||||||
|
|
||||||
# The test in this specfile use pytest-timeout
|
# The test in this specfile use pytest-timeout
|
||||||
# When building pytest for the first time with new Python version
|
# When building pytest for the first time with new Python version
|
||||||
# that is not possible as it depends on pytest
|
# that is not possible as it depends on pytest
|
||||||
@ -142,6 +139,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
|||||||
%{python3_sitelib}/__pycache__/pytest.*
|
%{python3_sitelib}/__pycache__/pytest.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 08 2020 Miro Hrončok <mhroncok@redhat.com> - 4.6.10-1
|
||||||
|
- Update to 4.6.10.
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.9-2
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.9-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pytest-4.6.9.tar.gz) = ab45a8662aa798a6ae224ad2cd68e043c605e4830c76cb6c6aca3cfccef232c024cbbb6c48c9bae19148099c339abfef3270a2208cc7e5c37a10b34b0aa6ba79
|
SHA512 (pytest-4.6.10.tar.gz) = 73668967f6568654cdf92e260ada79d9685fcfc30967499709caeb12527e39a9e886f057c4c73e8a39125c0fbfcd674d905b7023402ce0ab9e836aa77d3888cb
|
||||||
|
Loading…
Reference in New Issue
Block a user