From 0fc96306bc5218b76556de3c30f582dd5d28c5a0 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Sat, 26 Aug 2017 12:12:06 -0700 Subject: [PATCH] Drop support for Python 3.3 --- .travis.yml | 1 - NEWS | 1 + hy/_compat.py | 1 - hy/compiler.py | 4 ++-- hy/importer.py | 4 ++-- setup.py | 1 - tests/native_tests/language.hy | 2 +- tox.ini | 2 +- 8 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index f93fb74..d710d11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ sudo: false language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" diff --git a/NEWS b/NEWS index 429d69c..468d884 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ Changes from 0.13.0 [ Language Changes ] + * Python 3.3 is no longer supported * The unquote-splice or ~@ form now accepts any false value as empty. * `yield-from` is no longer supported under Python 2 * `apply` has been replaced with Python-style unpacking operators `#*` and diff --git a/hy/_compat.py b/hy/_compat.py index 6331771..73decf9 100644 --- a/hy/_compat.py +++ b/hy/_compat.py @@ -21,7 +21,6 @@ except ImportError: import sys PY3 = sys.version_info[0] >= 3 -PY34 = sys.version_info >= (3, 4) PY35 = sys.version_info >= (3, 5) str_type = str if PY3 else unicode # NOQA diff --git a/hy/compiler.py b/hy/compiler.py index 5b2dfa8..ca478ed 100755 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -12,7 +12,7 @@ from hy.lex.parser import hy_symbol_mangle import hy.macros from hy._compat import ( - str_type, string_types, bytes_type, long_type, PY3, PY34, PY35, + str_type, string_types, bytes_type, long_type, PY3, PY35, raise_empty) from hy.macros import require, macroexpand, tag_macroexpand import hy.importer @@ -2207,7 +2207,7 @@ class HyASTCompiler(object): ) + expression expression = expression.replace(arg[0]) - if PY34: + if PY3: # Python 3.4+ requires that args are an ast.arg object, rather # than an ast.Name or bare string. args = [ast.arg(arg=ast_str(x), diff --git a/hy/importer.py b/hy/importer.py index a1c7abe..ae32164 100644 --- a/hy/importer.py +++ b/hy/importer.py @@ -18,7 +18,7 @@ import inspect import os import __future__ -from hy._compat import PY3, PY34, MAGIC, builtins, long_type, wr_long +from hy._compat import PY3, MAGIC, builtins, long_type, wr_long from hy._compat import string_types @@ -271,7 +271,7 @@ def is_package(module_name): def get_bytecode_path(source_path): - if PY34: + if PY3: import importlib.util return importlib.util.cache_from_source(source_path) elif hasattr(imp, "cache_from_source"): diff --git a/setup.py b/setup.py index a9ac82e..f0445bd 100755 --- a/setup.py +++ b/setup.py @@ -78,7 +78,6 @@ setup( "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", diff --git a/tests/native_tests/language.hy b/tests/native_tests/language.hy index e96b171..1f069af 100644 --- a/tests/native_tests/language.hy +++ b/tests/native_tests/language.hy @@ -11,7 +11,7 @@ pytest) (import sys) -(import [hy._compat [PY3 PY34 PY35]]) +(import [hy._compat [PY3 PY35]]) (defn test-sys-argv [] "NATIVE: test sys.argv" diff --git a/tox.ini b/tox.ini index 6f0d909..8d38373 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,pypy,py33,py34,py35,py36,flake8 +envlist = py27,pypy,py34,py35,py36,flake8 skipsdist = True [testenv]