File pr_5.patch of Package python-docutils-ast-writer
From f06dccb62cec60f4c950893861f27b39531d50da Mon Sep 17 00:00:00 2001
From: Torbjorn Sorby <torbjorn.sorby@zivid.com>
Date: Tue, 7 Sep 2021 15:26:31 +0200
Subject: [PATCH] Remove use_2to3
use_2to3 is no longer supported by setuptools. Let's deprecate Python 2
support, and remove the types `unicode` and `long`.
@graingert suggested adding `python_requires`, thanks!
Closes #4
---
rst2ast/writer.py | 2 +-
setup.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/rst2ast/writer.py b/rst2ast/writer.py
index 1e2e30c..59a675b 100644
--- a/rst2ast/writer.py
+++ b/rst2ast/writer.py
@@ -47,7 +47,7 @@ def walk(self, node, line=1):
# Attributes
for k, v in node.__dict__.items():
try:
- if not k.startswith('__') and isinstance(v, (str, int, float, bool, unicode, long,)):
+ if not k.startswith('__') and isinstance(v, (str, int, float, bool,)):
result[k] = v
except NameError as e:
pass
diff --git a/setup.py b/setup.py
index 0314cbb..84b4396 100755
--- a/setup.py
+++ b/setup.py
@@ -19,5 +19,5 @@
[console_scripts]
rst2ast = rst2ast.cmd:run
""",
- use_2to3 = True
+ python_requires=">=3.6",
)