Donald Stufft committed 8dcd81d

Fix for packages with a . in the python version

Comments (0)

Files changed (1)

 import redis
 import rq
+from distlib.util import split_filename
     import json
 except ImportError:
         # actual file when resolving the X-accel headers.
         self.handler.send_response(200, 'OK')
-        package = packages_path_to_package_name.match(path)
+        filename, _ = os.path.splitext(os.path.basename(path))
+        package, _, _ = split_filename(filename)
         if package:
             # Make sure that we associate the delivered file with the serial this
             # is valid for. Intended to support mirrors to more easily achieve
             # consistency with files that are newer than they may expect.
-            package =
             serial =
             if serial is not None:
                 self.handler.send_header("X-PYPI-LAST-SERIAL", str(serial))