| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,12 @@ | |||
| 2 | 2 | Changelog | |
| 3 | 3 | ========= | |
| 4 | 4 | ||
| 5 | - 3.1.?? | ||
| 5 | + 3.1.15 (UNRELEASED) | ||
| 6 | + =================== | ||
| 7 | + | ||
| 8 | + * add deprectation warning for python 3.5 | ||
| 9 | + | ||
| 10 | + 3.1.14 | ||
| 6 | 11 | ====== | |
| 7 | 12 | ||
| 8 | 13 | * git.Commit objects now have a ``replace`` method that will return a | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,7 @@ | |||
| 19 | 19 | import threading | |
| 20 | 20 | from collections import OrderedDict | |
| 21 | 21 | from textwrap import dedent | |
| 22 | + import warnings | ||
| 22 | 23 | ||
| 23 | 24 | from git.compat import ( | |
| 24 | 25 | defenc, | |
@@ -902,8 +903,14 @@ def transform_kwarg(self, name, value, split_single_char_options): | |||
| 902 | 903 | ||
| 903 | 904 | def transform_kwargs(self, split_single_char_options=True, **kwargs): | |
| 904 | 905 | """Transforms Python style kwargs into git command line options.""" | |
| 906 | + # Python 3.6 preserves the order of kwargs and thus has a stable | ||
| 907 | + # order. For older versions sort the kwargs by the key to get a stable | ||
| 908 | + # order. | ||
| 909 | + if sys.version_info[:2] < (3, 6): | ||
| 910 | + kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0])) | ||
| 911 | + warnings.warn("Python 3.5 support is deprecated and will be removed 2021-09-05.\n" + | ||
| 912 | + "It does not preserve the order for key-word arguments and enforce lexical sorting instead.") | ||
| 905 | 913 | args = [] | |
| 906 | - kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0])) | ||
| 907 | 914 | for k, v in kwargs.items(): | |
| 908 | 915 | if isinstance(v, (list, tuple)): | |
| 909 | 916 | for value in v: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments