Remove PEP 291 compatibility requirements for ctypes and modulefinder
https://mail.python.org/pipermail/python-dev/2016-May/144502.html
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 77b020a..e24cfd2 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
"""create and manipulate C data types in Python"""
import os as _os, sys as _sys
diff --git a/Lib/ctypes/_endian.py b/Lib/ctypes/_endian.py
index f80e675..c0ba646 100644
--- a/Lib/ctypes/_endian.py
+++ b/Lib/ctypes/_endian.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
import sys
from ctypes import *
diff --git a/Lib/ctypes/macholib/__init__.py b/Lib/ctypes/macholib/__init__.py
index 36149d2..5621def 100644
--- a/Lib/ctypes/macholib/__init__.py
+++ b/Lib/ctypes/macholib/__init__.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
"""
Enough Mach-O to make your head spin.
diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py
index 9714ec6..1fdf8d6 100644
--- a/Lib/ctypes/macholib/dyld.py
+++ b/Lib/ctypes/macholib/dyld.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
"""
dyld emulation
"""
diff --git a/Lib/ctypes/macholib/dylib.py b/Lib/ctypes/macholib/dylib.py
index ea3dd38..aa10750 100644
--- a/Lib/ctypes/macholib/dylib.py
+++ b/Lib/ctypes/macholib/dylib.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
"""
Generic dylib path manipulation
"""
diff --git a/Lib/ctypes/macholib/framework.py b/Lib/ctypes/macholib/framework.py
index dd7fb2f..ad6ed55 100644
--- a/Lib/ctypes/macholib/framework.py
+++ b/Lib/ctypes/macholib/framework.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
"""
Generic framework path manipulation
"""
diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
index 2fa42bd..f983a6b 100644
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -326,6 +326,7 @@
"(Phone) <type 'exceptions.TypeError'>: "
"expected string or Unicode object, int found")
else:
+ # Compatibility no longer strictly required
self.assertEqual(msg,
"(Phone) exceptions.TypeError: "
"expected string or Unicode object, int found")
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 929a29c..bf1b6a0 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -1,6 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
import sys, os
# find_library(name) returns the pathname of a library, or None.
diff --git a/Lib/ctypes/wintypes.py b/Lib/ctypes/wintypes.py
index dafbb78..e7f569c 100644
--- a/Lib/ctypes/wintypes.py
+++ b/Lib/ctypes/wintypes.py
@@ -1,7 +1,3 @@
-######################################################################
-# This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
-
# The most useful windows datatypes
from ctypes import *
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 2ffd448..e2fee41 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -1,5 +1,4 @@
"""Find modules used by a script, using introspection."""
-# This module should be kept compatible with Python 2.2, see PEP 291.
from __future__ import generators
import dis
@@ -13,7 +12,7 @@
if hasattr(sys.__stdout__, "newlines"):
READ_MODE = "U" # universal line endings
else:
- # remain compatible with Python < 2.3
+ # Python < 2.3 compatibility, no longer strictly required
READ_MODE = "r"
LOAD_CONST = dis.opmap['LOAD_CONST']