* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/process/, lib/portage/util/, ...
@ 2020-07-17 6:36 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2020-07-17 6:36 UTC (permalink / raw
To: gentoo-commits
commit: 323df713a741440795c565ee2d79de0beb22b722
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 17 04:30:35 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 17 04:39:01 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=323df713
Remove support code for Python < 3.2
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
lib/portage/tests/process/test_poll.py | 9 +++------
lib/portage/tests/util/futures/asyncio/test_pipe_closed.py | 7 ++-----
lib/portage/util/configparser.py | 13 +++----------
3 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/lib/portage/tests/process/test_poll.py b/lib/portage/tests/process/test_poll.py
index f505b5049..3ea176c0d 100644
--- a/lib/portage/tests/process/test_poll.py
+++ b/lib/portage/tests/process/test_poll.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2019 Gentoo Authors
+# Copyright 1998-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
import functools
@@ -34,11 +34,8 @@ class PipeReaderTestCase(TestCase):
def test_domain_socket(self):
def make_pipes():
- if sys.version_info >= (3, 2):
- read_end, write_end = socket.socketpair()
- return (read_end.detach(), write_end.detach()), None
- else:
- self.skipTest('socket detach not supported')
+ read_end, write_end = socket.socketpair()
+ return (read_end.detach(), write_end.detach()), None
self._do_test(make_pipes)
def test_named_pipe(self):
diff --git a/lib/portage/tests/util/futures/asyncio/test_pipe_closed.py b/lib/portage/tests/util/futures/asyncio/test_pipe_closed.py
index 507385c04..b8e5556d0 100644
--- a/lib/portage/tests/util/futures/asyncio/test_pipe_closed.py
+++ b/lib/portage/tests/util/futures/asyncio/test_pipe_closed.py
@@ -1,4 +1,4 @@
-# Copyright 2018 Gentoo Foundation
+# Copyright 2018-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
import errno
@@ -32,10 +32,7 @@ class _PipeClosedTestCase(object):
self._do_test(read_end, write_end)
def test_domain_socket(self):
- if sys.version_info >= (3, 2):
- read_end, write_end = socket.socketpair()
- else:
- self.skipTest('socket detach not supported')
+ read_end, write_end = socket.socketpair()
self._do_test(read_end.detach(), write_end.detach())
def test_named_pipe(self):
diff --git a/lib/portage/util/configparser.py b/lib/portage/util/configparser.py
index f3452231f..9bd9f9722 100644
--- a/lib/portage/util/configparser.py
+++ b/lib/portage/util/configparser.py
@@ -11,16 +11,9 @@ __all__ = ['ConfigParserError', 'NoOptionError', 'ParsingError',
import io
import sys
-try:
- from configparser import (Error as ConfigParserError,
- NoOptionError, ParsingError, RawConfigParser)
- if sys.hexversion >= 0x3020000:
- from configparser import ConfigParser as SafeConfigParser
- else:
- from configparser import SafeConfigParser
-except ImportError:
- from ConfigParser import (Error as ConfigParserError,
- NoOptionError, ParsingError, RawConfigParser, SafeConfigParser)
+from configparser import (Error as ConfigParserError,
+ NoOptionError, ParsingError, RawConfigParser)
+from configparser import ConfigParser as SafeConfigParser
from portage import _encodings
from portage import _unicode_encode
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-17 6:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-17 6:36 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/process/, lib/portage/util/, Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox