14
0
Files
python-requirements-detector/fix-astroid-import.patch
Steve Kowalik b29d7e526c - Update to 1.2.2:
* Stop polluting site-packages (see python-poetry/poetry#2015)
  * Added semver as a dependency as it is needed by the (transplanted)
    former poetry-semver code
  * remove poetry-semver from the list of deps
  * Updating packaging requirement in poetry lock file
  * Consolidating new version and poetry dependencies after merging some PRs
  * Output the dependency name without a version for poetry git, path and
    url dependencies
  * Tidying up some type hinting and heeding mypy warnings
  * Fixing all public API methods to handle str or Path arguments
  * Fixing from_setup_py to handle string and Path arguments
  * Fixing handling of >=X style version ranges
  * Added note about pyproject / poetry parsing
  * Re-adding 3.6; prospector still supports it for now
  * Handling parsing a requirements.txt generated by "poetry export"
  * More refactoring, adding some type hints, moving towards astroid 2+
    only compatibility
  * Refactoring setup.py handling to separate module to make testing easier
  * Cleaning up unused setup.py ; fixing pre-commit
- Add patch fix-astroid-import.patch:
  * Use correct exception name from Astroid.
- Switch to autosetup and pyproject macros.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requirements-detector?expand=0&rev=20
2024-03-27 03:32:39 +00:00

23 lines
1.0 KiB
Diff

Index: requirements-detector-1.2.2/requirements_detector/handle_setup.py
===================================================================
--- requirements-detector-1.2.2.orig/requirements_detector/handle_setup.py
+++ requirements-detector-1.2.2/requirements_detector/handle_setup.py
@@ -1,7 +1,7 @@
from pathlib import Path
from typing import Union
-from astroid import MANAGER, AstroidBuildingException, AstroidSyntaxError
+from astroid import MANAGER, AstroidBuildingError, AstroidSyntaxError
from astroid.builder import AstroidBuilder
from astroid.nodes import Assign, AssignName, Call, Const, Keyword, List, Name, Tuple
@@ -92,7 +92,7 @@ def from_setup_py(setup_file: Union[str,
try:
ast = AstroidBuilder(MANAGER).string_build(setup_file.open().read())
- except (SyntaxError, AstroidBuildingException, AstroidSyntaxError):
+ except (SyntaxError, AstroidBuildingError, AstroidSyntaxError):
# if the setup file is broken, we can't do much about that...
raise CouldNotParseRequirements