-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10943 from pradyunsg/downgrade-distlib
Downgrade to distlib 0.3.3
- Loading branch information
Showing
20 changed files
with
4,392 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Downgrade distlib to 0.3.3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# | ||
import logging | ||
|
||
__version__ = '0.3.4' | ||
__version__ = '0.3.3' | ||
|
||
class DistlibException(Exception): | ||
pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""Modules copied from Python 3 standard libraries, for internal use only. | ||
Individual classes and functions are found in d2._backport.misc. Intended | ||
usage is to always import things missing from 3.1 from that module: the | ||
built-in/stdlib objects will be used if found. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2012 The Python Software Foundation. | ||
# See LICENSE.txt and CONTRIBUTORS.txt. | ||
# | ||
"""Backports for individual classes and functions.""" | ||
|
||
import os | ||
import sys | ||
|
||
__all__ = ['cache_from_source', 'callable', 'fsencode'] | ||
|
||
|
||
try: | ||
from imp import cache_from_source | ||
except ImportError: | ||
def cache_from_source(py_file, debug=__debug__): | ||
ext = debug and 'c' or 'o' | ||
return py_file + ext | ||
|
||
|
||
try: | ||
callable = callable | ||
except NameError: | ||
from collections import Callable | ||
|
||
def callable(obj): | ||
return isinstance(obj, Callable) | ||
|
||
|
||
try: | ||
fsencode = os.fsencode | ||
except AttributeError: | ||
def fsencode(filename): | ||
if isinstance(filename, bytes): | ||
return filename | ||
elif isinstance(filename, str): | ||
return filename.encode(sys.getfilesystemencoding()) | ||
else: | ||
raise TypeError("expect bytes or str, not %s" % | ||
type(filename).__name__) |
Oops, something went wrong.