Userprovided

Latest version: v1.0.0

Safety actively analyzes 688867 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.8.1

* Set PyPI development status to `stable`.
* Switched from `unittest` to `pytest` and improved test coverage.
* No functional changes.
* Improved documentation.

0.8.0

* The method `hash.calculate_file_hash` now also accepts a string for the `file_path` parameter instead of only a `pathlib.Path` object as before.
* The method `url.is_url` does not log an error anymore if the URL is malformed. Other methods use `is_url` for checks and this would pollute the logs. Instead those messages have been downgraded to `debug`. However, if the requirement for a specific scheme is not met, there will be still an error logged.
* The method `url.normalize_query_part` does raise `ValueError` if it is given a full URL instead of the query part.
* Currently 98% test coverage.

Bugfixes:
* The function `url.determine_file_extension` did not handle some edge cases separetly, but instead suggested the extension `.unknown` in both cases. Now:
* If neither the URL nor the server provide enough information to determine the file extension, the function will suggest `.unknown`.
* If the file extension in the URL and the provided mime-type contradict each other, the file extension suggested by the URL will prevail.
* The function `url.determine_file_extension` did try to guess a file extension from the URL even if that missed the path part (i.e. `https://www.example.com` instead of something like `https://www.example.com/index.html`). Now it only guesses from the URL if there is a path component. Otherwise only the mime-type suggested by the server will be used.
* The method `url.normalize_query_part` does not raise an exception anymore, if a chunk of the query part is malformed by missing an equal sign (like `example.com/index.php?missinghere&foo=bar`).
* Fix `calculate_file_hash` (missing value for check).

0.7.6

Bugfixes:
* The functions `url.normalize_url` (respectively `normalize_query_part`) no longer throw an exception if confronted with a not RFC 3986 compliant URL which does not use key=value syntax in the query part. Such URLs are for example generated by some versions of vBulletin.
* `url.py` contained a print statement used for debugging.

0.7.5

* New function `url.normalize_url` which normalizes an URL:
* remove whitespace around it,
* convert scheme and hostname to lowercase,
* remove ports if they are the standard port for the scheme,
* remove duplicate slashes from the path,
* remove fragments (like foo),
* remove empty elements of the query part,
* order the elements in the query part by alphabet

0.7.4

* All tests are now also run with Python 3.9.

0.7.3

* New function `parameters.string_in_range`: Strips whitespace from both ends of a string and then checks if the length of that string falls in given limits.
* New function `parameters.enforce_boolean`: Raises a ValueError if the parameter is not of type bool.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.