Open vrtareg-az opened 1 year ago
Stumbled upon this with a different problem. Probably it caused this one in sphinx-autodoc-typehints?
I also get this warning in rstcheck-core
with pydantic
:
WARNING: Failed guarded type import with ImportError("cannot import name 'AbstractSetIntStr' from 'pydantic._internal._utils' (/home/runner/work/rstcheck-core/rstcheck-core/.tox/docs/lib/python3.11/site-packages/pydantic/_internal/_utils.py)")
Ci run: https://github.com/rstcheck/rstcheck-core/actions/runs/6130583383/job/16639807942?pr=60#step:11:558
@hojo0590 @Cielquan did you find solution to resolve this problem "cannot import name 'AbstractSetIntStr' from 'pydantic._internal._utils'" ?
Thank you for reporting this. I have same warning, too:
F:\bh_database\docs\docstring of bh_database.core.Base.metadata:6: WARNING: undefined label: 'orm_declarative_metadata'
SQLAlchemy
version 2.0.29
-- I have this warning after replacing declarative_base
with DeclarativeBase
.
New code that causes the above warning:
from sqlalchemy.orm import (
sessionmaker,
scoped_session,
DeclarativeBase,
close_all_sessions,
Query,
)
from sqlalchemy.orm.decl_api import DeclarativeMeta
class Base(DeclarativeBase):
metaclass=DeclarativeMeta
Previous code that do not cause the above warning:
from sqlalchemy.orm import (
sessionmaker,
scoped_session,
declarative_base,
close_all_sessions,
Query,
)
from sqlalchemy.orm.decl_api import DeclarativeMeta
#:
Base = declarative_base(metaclass=DeclarativeMeta)
I get a similar error:
Warning, treated as error:
Failed guarded type import with ImportError("cannot import name 'AbstractSetIntStr' from 'pydantic._internal._utils' (/Users/ant/opt/miniconda3/envs/apa-proxy/lib/python3.12/site-packages/pydantic/_internal/_utils.py)")
Pinning the version to <1.15
did help.
Describe the bug
When running make html on a code that imports SQLAlchemy some warnings are shown:
Warnings
Windows
Ubuntu
How to Reproduce
Create folder xxx Create folders xxx/docs and xxx/middleware
file
xxx/middleware/models.py
file
docs/requirements.txt
file
docs/source/conf.py
file
docs/Makfile
file
docs/make.bat
file
docs/index.rst
file
docs/middleware.rst
files
docs/_templates/custom-class-template.rst
anddocs/_templates/custom-module-template.rst
are taken from https://github.com/JamesALeedham/Sphinx-Autosummary-Recursion/tree/master/docs/_templatesEnvironment Information
Sphinx extensions
Additional context
No response