Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9562ae2

Browse filesBrowse files
committed
rebase on master
1 parent 85ebfb2 commit 9562ae2
Copy full SHA for 9562ae2

2 files changed

+14-2Lines changed: 14 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/source/changes.rst‎

Copy file name to clipboardExpand all lines: doc/source/changes.rst
+6-1Lines changed: 6 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
Changelog
33
=========
44

5-
3.1.??
5+
3.1.15 (UNRELEASED)
6+
===================
7+
8+
* add deprectation warning for python 3.5
9+
10+
3.1.14
611
======
712

813
* git.Commit objects now have a ``replace`` method that will return a
Collapse file

‎git/cmd.py‎

Copy file name to clipboardExpand all lines: git/cmd.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import threading
2020
from collections import OrderedDict
2121
from textwrap import dedent
22+
import warnings
2223

2324
from git.compat import (
2425
defenc,
@@ -902,8 +903,14 @@ def transform_kwarg(self, name, value, split_single_char_options):
902903

903904
def transform_kwargs(self, split_single_char_options=True, **kwargs):
904905
"""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.")
905913
args = []
906-
kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0]))
907914
for k, v in kwargs.items():
908915
if isinstance(v, (list, tuple)):
909916
for value in v:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.