Skip to content

Commit a772bdd

Browse files
committed
Version 3.10.3rc0
1 parent a21e458 commit a772bdd

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# List of hooks at https://pre-commit.com/hooks.html
55

6-
# Prefer using local configurations so they don't have to be constantly auto-updated (slow).
6+
# Prefer using local configurations as they don't have to be constantly auto-updated (slow).
77
# Local configuration follows the repo's .pre-commit-hooks.yaml
88

99
# Requires the pre-commit package manager to be installed: pip install pre-commit

CONTRIBUTING.rst

+10-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ packages, as below) before creating a pull request, starting from the project's
7070
pip install -U tox
7171
tox --parallel
7272
73-
Alternatively, you can manually run the following commands
73+
Alternatively, you can manually run the following commands:
7474

7575
.. code-block:: bash
7676
@@ -86,3 +86,12 @@ Testing documentation
8686
~~~~~~~~~~~~~~~~~~~~~
8787
For documentation, build it locally using ``$ make html`` (Linux) or ``make_html.bat`` (Windows) from within the docs
8888
directory and monitor for errors.
89+
90+
91+
Unreleased version
92+
------------------
93+
To install the unreleased version, please run:
94+
95+
.. code-block:: bash
96+
97+
pip install https://github.com/mborsetti/webchanges/archive/unreleased.tar.gz

webchanges/filters.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,8 @@ def filter(self, data: Union[str, bytes], subfilter: Dict[str, Any]) -> str:
10731073
"""
10741074
if isinstance(data, str):
10751075
data = data.encode(errors='ignore')
1076-
return hashlib.sha1(data, usedforsecurity=False).hexdigest()
1076+
# Python 3.9: insert usedforsecurity=False argument in sha1() and remove nosec
1077+
return hashlib.sha1(data).hexdigest() # nosec B324: Use of weak MD4, MD5, or SHA1 hash for security.
10771078

10781079

10791080
class HexDumpFilter(FilterBase):

webchanges/jobs.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ def get_guid(self) -> str:
394394
:returns: the GUID.
395395
"""
396396
location = self.get_location()
397-
return hashlib.sha1(location.encode(), usedforsecurity=False).hexdigest()
397+
# Python 3.9: insert usedforsecurity=False argument in sha1() and remove nosec
398+
return hashlib.sha1(location.encode()).hexdigest() # nosec B324: Use of weak hash for security.
398399

399400
def retrieve(self, job_state: JobState, headless: bool = True) -> Tuple[Union[str, bytes], str]:
400401
"""Runs job to retrieve the data, and returns data and ETag.

0 commit comments

Comments
 (0)