Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions autoapi/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import os

import astroid
import astroid.builder
from astroid.builder import AstroidBuilder
from astroid.manager import AstroidManager
import sphinx.util.docstrings

from . import _astroid_utils
Expand Down Expand Up @@ -37,7 +38,7 @@ def _parse_file(self, file_path, condition):
module_parts.appendleft(module_part)

module_name = ".".join(module_parts)
node = astroid.builder.AstroidBuilder().file_build(file_path, module_name)
node = AstroidBuilder(AstroidManager()).file_build(file_path, module_name)
return self.parse(node)

def parse_file(self, file_path):
Expand Down
2 changes: 2 additions & 0 deletions docs/changes/536.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update the supported versions of astroid.
Fix the breaking change to Import and pass in the AstroidManager to the AstroidBuilder
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ classifiers = [
]
requires-python = ">=3.9"
dependencies = [
'astroid>=2.7;python_version<"3.12"',
'astroid>=3;python_version>="3.12"',
'astroid~=3.0;python_version<"3.12"',
'astroid~=4.0;python_version>="3.12"',
"Jinja2",
"PyYAML",
"sphinx>=7.4.0",
Expand Down