Skip to content

Commit

Permalink
Drop unused scandir dependency (#19380)
Browse files Browse the repository at this point in the history
* Drop unused scandir dependency

* add changelog

* update agent requirements

* fix changelog number

* fix license file
  • Loading branch information
iliakur authored Jan 13, 2025
1 parent 05d8630 commit c32b251
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ requests-oauthlib,PyPI,ISC,Copyright (c) 2014 Kenneth Reitz.
requests-toolbelt,PyPI,Apache-2.0,"Copyright 2014 Ian Cordasco, Cory Benfield"
requests-unixsocket2,PyPI,ISC,Copyright (c) 2024 - 2024 thelab
rethinkdb,PyPI,Apache-2.0,Copyright 2018 RethinkDB.
scandir,PyPI,BSD-3-Clause,"Copyright (c) 2012, Ben Hoyt"
securesystemslib,PyPI,MIT,Copyright (c) 2016 Santiago Torres
semver,PyPI,BSD-3-Clause,"Copyright (c) 2013, Konstantine Rybnikov"
service-identity,PyPI,MIT,Copyright (c) 2014 Hynek Schlawack and the service-identity contributors
Expand Down
1 change: 0 additions & 1 deletion agent_requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ requests-toolbelt==1.0.0
requests-unixsocket2==0.4.2
requests==2.32.3
rethinkdb==2.4.10post1
scandir==1.10.0; python_version < '3.5'
securesystemslib[crypto,pynacl]==0.28.0
semver==3.0.2
service-identity[idna]==24.1.0
Expand Down
1 change: 1 addition & 0 deletions directory/changelog.d/19380.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop unused scandir dependency.
5 changes: 1 addition & 4 deletions directory/datadog_checks/directory/traverse.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
try:
from os import scandir
except ImportError:
from scandir import scandir
from os import scandir


def walk(top, onerror=None, followlinks=False):
Expand Down
5 changes: 1 addition & 4 deletions directory/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ dynamic = [
]

[project.optional-dependencies]
deps = [
# Starting with Python 3.5 'scandir.scandir' is in the standard library as 'os.scandir'.
"scandir==1.10.0; python_version < '3.5'",
]
deps = []

[project.urls]
Source = "https://github.com/DataDog/integrations-core"
Expand Down

0 comments on commit c32b251

Please sign in to comment.