From 0062046c8281a3c6fcd90ee84b51d6f093430d06 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Mon, 24 Jun 2024 12:21:01 -0700 Subject: [PATCH] remove linux_distribution comment --- pymongo/asynchronous/pool.py | 9 ++------- pymongo/synchronous/pool.py | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/pymongo/asynchronous/pool.py b/pymongo/asynchronous/pool.py index 156da7b773..ea5b201747 100644 --- a/pymongo/asynchronous/pool.py +++ b/pymongo/asynchronous/pool.py @@ -194,14 +194,9 @@ def _set_keepalive_times(sock: socket.socket) -> None: _METADATA: dict[str, Any] = {"driver": {"name": "PyMongo", "version": __version__}} if sys.platform.startswith("linux"): - # platform.linux_distribution was deprecated in Python 3.5 - # and removed in Python 3.8. Starting in Python 3.5 it - # raises DeprecationWarning - # DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5 - _name = platform.system() _METADATA["os"] = { - "type": _name, - "name": _name, + "type": platform.system(), + "name": platform.system(), "architecture": platform.machine(), # Kernel version (e.g. 4.4.0-17-generic). "version": platform.release(), diff --git a/pymongo/synchronous/pool.py b/pymongo/synchronous/pool.py index 3918116ba3..adfc82640b 100644 --- a/pymongo/synchronous/pool.py +++ b/pymongo/synchronous/pool.py @@ -194,14 +194,9 @@ def _set_keepalive_times(sock: socket.socket) -> None: _METADATA: dict[str, Any] = {"driver": {"name": "PyMongo", "version": __version__}} if sys.platform.startswith("linux"): - # platform.linux_distribution was deprecated in Python 3.5 - # and removed in Python 3.8. Starting in Python 3.5 it - # raises DeprecationWarning - # DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5 - _name = platform.system() _METADATA["os"] = { - "type": _name, - "name": _name, + "type": platform.system(), + "name": platform.system(), "architecture": platform.machine(), # Kernel version (e.g. 4.4.0-17-generic). "version": platform.release(),