diff --git a/.travis.yml b/.travis.yml index 7288a2a..1341a1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python python: - - "2.6" - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" diff --git a/gitdb/db/pack.py b/gitdb/db/pack.py index 6b03d83..1e37d73 100644 --- a/gitdb/db/pack.py +++ b/gitdb/db/pack.py @@ -148,7 +148,7 @@ def update_cache(self, force=False): # packs are supposed to be prefixed with pack- by git-convention # get all pack files, figure out what changed pack_files = set(glob.glob(os.path.join(self.root_path(), "pack-*.pack"))) - our_pack_files = set(item[1].pack().path() for item in self._entities) + our_pack_files = {item[1].pack().path() for item in self._entities} # new packs for pack_file in (pack_files - our_pack_files): diff --git a/gitdb/db/ref.py b/gitdb/db/ref.py index 94a2f01..2bb1de7 100644 --- a/gitdb/db/ref.py +++ b/gitdb/db/ref.py @@ -49,7 +49,7 @@ def _update_dbs_from_ref_file(self): # END handle alternates ref_paths_set = set(ref_paths) - cur_ref_paths_set = set(db.root_path() for db in self._dbs) + cur_ref_paths_set = {db.root_path() for db in self._dbs} # remove existing for path in (cur_ref_paths_set - ref_paths_set): diff --git a/gitdb/test/lib.py b/gitdb/test/lib.py index bbdd241..ab1842d 100644 --- a/gitdb/test/lib.py +++ b/gitdb/test/lib.py @@ -86,7 +86,7 @@ def wrapper(self): try: return func(self, path) except Exception: - sys.stderr.write("Test %s.%s failed, output is at %r\n" % (type(self).__name__, func.__name__, path)) + sys.stderr.write("Test {}.{} failed, output is at {!r}\n".format(type(self).__name__, func.__name__, path)) keep = True raise finally: diff --git a/gitdb/util.py b/gitdb/util.py index 8a1819b..d680f97 100644 --- a/gitdb/util.py +++ b/gitdb/util.py @@ -19,10 +19,7 @@ # initialize our global memory manager instance # Use it to free cached (and unused) resources. -if sys.version_info < (2, 6): - mman = StaticWindowMapManager() -else: - mman = SlidingWindowMapManager() +mman = SlidingWindowMapManager() # END handle mman import hashlib diff --git a/setup.py b/setup.py index 4bff11d..27bb754 100755 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ zip_safe=False, install_requires=['smmap2 >= 2.0.0'], long_description="""GitDB is a pure-Python git object database""", + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ "Development Status :: 5 - Production/Stable", @@ -34,12 +35,10 @@ "Operating System :: MacOS :: MacOS X", "Programming Language :: Python", "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", ] )