Skip to content

Commit 5ea715e

Browse files
gfyoungBlake Hawkins
authored and
Blake Hawkins
committed
CLN: Remove unnecessary sys.version_info checks (pandas-dev#29210)
1 parent cb4130b commit 5ea715e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

pandas/tests/io/formats/test_to_csv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class TestToCSV:
1313
@pytest.mark.xfail(
14-
(3, 6, 5) > sys.version_info >= (3, 5),
14+
(3, 6, 5) > sys.version_info,
1515
reason=("Python csv library bug (see https://bugs.python.org/issue32255)"),
1616
)
1717
def test_to_csv_with_single_column(self):

versioneer.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* https://github.com/warner/python-versioneer
99
* Brian Warner
1010
* License: Public Domain
11-
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy
1211
* [![Latest Version]
1312
(https://pypip.in/version/versioneer/badge.svg?style=flat)
1413
](https://pypi.org/project/versioneer/)
@@ -464,9 +463,9 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
464463
if verbose:
465464
print("unable to find command, tried %s" % (commands,))
466465
return None
467-
stdout = p.communicate()[0].strip()
468-
if sys.version_info[0] >= 3:
469-
stdout = stdout.decode()
466+
467+
stdout = p.communicate()[0].strip().decode()
468+
470469
if p.returncode != 0:
471470
if verbose:
472471
print("unable to run %s (error)" % dispcmd)
@@ -561,9 +560,9 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
561560
if verbose:
562561
print("unable to find command, tried %%s" %% (commands,))
563562
return None
564-
stdout = p.communicate()[0].strip()
565-
if sys.version_info[0] >= 3:
566-
stdout = stdout.decode()
563+
564+
stdout = p.communicate()[0].strip().decode()
565+
567566
if p.returncode != 0:
568567
if verbose:
569568
print("unable to run %%s (error)" %% dispcmd)

0 commit comments

Comments
 (0)