Skip to content

Commit

Permalink
remove linux_distribution comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneHarvey committed Jun 24, 2024
1 parent 7e07cae commit 0062046
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions pymongo/asynchronous/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
9 changes: 2 additions & 7 deletions pymongo/synchronous/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0062046

Please sign in to comment.