Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.0: sphinx warnings due to a circular import #162

Open
kloczek opened this issue Sep 1, 2021 · 1 comment
Open

1.4.0: sphinx warnings due to a circular import #162

kloczek opened this issue Sep 1, 2021 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Sep 1, 2021

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.1.2
making output directory... done
loading intersphinx inventory from http://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 7 added, 0 changed, 0 removed
reading sources... [100%] usage
WARNING: autodoc: failed to import module 'events' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'eventio' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'eventio_async' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'device' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'uinput' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'util' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'ecodes' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import data 'ecodes.keys' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import data 'ecodes.ecodes' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
WARNING: autodoc: failed to import data 'ecodes.bytype' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.4.0/evdev/__init__.py)
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-evdev.3 { install usage tutorial apidoc scope changelog } done
build succeeded, 10 warnings.
@kloczek
Copy link
Author

kloczek commented Jul 18, 2022

There are more warnings after add patch like below

--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,6 +1,9 @@
 # -*- coding: utf-8 -*-

-import sys, os
+import sys
+import os
+sys.path.insert(0, os.path.abspath(".."))
+
 import sphinx_rtd_theme

 # Check if readthedocs is building us

to allow use straight sphinx-build. With -n option sphinx-build shows:

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.2
making output directory... done
loading intersphinx inventory from http://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 7 added, 0 changed, 0 removed
reading sources... [100%] usage
WARNING: autodoc: failed to import module 'events' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'eventio' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'eventio_async' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'device' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'uinput' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'util' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import module 'ecodes' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import data 'ecodes.keys' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import data 'ecodes.ecodes' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
WARNING: autodoc: failed to import data 'ecodes.bytype' from module 'evdev'; the following exception was raised:
cannot import name '_ecodes' from partially initialized module 'evdev' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/evdev/__init__.py)
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:5: WARNING: Title underline too short.

1.6.0 (Jul 17, 2022)
==================
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:11: WARNING: Title underline too short.

1.5.0 (Mar 24, 2022)
==================
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:11: WARNING: Title underline too short.

1.5.0 (Mar 24, 2022)
==================
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-evdev.3 { install usage tutorial apidoc scope changelog } /home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/tutorial.rst:298: WARNING: py:mod reference target not found: evdev.events.event_factory
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:220: WARNING: py:func reference target not found: InputDevice.set
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:222: WARNING: py:mod reference target not found: ecodes.c
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:223: WARNING: py:func reference target not found: UInput.uinput_create
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:224: WARNING: py:class reference target not found: InputDevice
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:230: WARNING: py:func reference target not found: set_led
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:230: WARNING: py:class reference target not found: EvdevError
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:249: WARNING: py:func reference target not found: ioctl
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:255: WARNING: py:func reference target not found: InputDevice.active_keys
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:258: WARNING: py:func reference target not found: ioctl_capabilities
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:264: WARNING: py:func reference target not found: InputDevice.read_one
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:274: WARNING: py:func reference target not found: InputDevice.close
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:283: WARNING: py:func reference target not found: InputDevice.close
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:283: WARNING: py:func reference target not found: InputDevice.__del__
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:289: WARNING: py:func reference target not found: InputDevice.device_read
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:289: WARNING: py:func reference target not found: InputDevice.device_read_many
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:289: WARNING: py:func reference target not found: ioctl_capabilities
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:296: WARNING: py:func reference target not found: ecodes
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:307: WARNING: py:func reference target not found: InputDevice.set_led
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:310: WARNING: py:attr reference target not found: InputDevice.fd
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:312: WARNING: py:func reference target not found: InputDevice.device_read_many
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:318: WARNING: py:func reference target not found: InputDevice.device_read
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:318: WARNING: py:func reference target not found: InputDevice.device_read_many
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:318: WARNING: py:func reference target not found: InputDevice.read
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:328: WARNING: py:func reference target not found: DeviceInfo
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:334: WARNING: py:func reference target not found: InputDevice.read
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:345: WARNING: py:func reference target not found: InputDevice.version
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:347: WARNING: py:func reference target not found: InputDevice.read_loop
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:349: WARNING: py:func reference target not found: InputDevice.grab
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:349: WARNING: py:func reference target not found: InputDevice.ungrab
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:352: WARNING: py:func reference target not found: InputDevice.leds
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:354: WARNING: py:class reference target not found: DeviceInfo
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:356: WARNING: py:func reference target not found: InputDevice.read_one
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:358: WARNING: py:class reference target not found: AbsData
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:358: WARNING: py:class reference target not found: AbsInfo
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:367: WARNING: py:attr reference target not found: UInput.device
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:367: WARNING: py:class reference target not found: InputDevice
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:370: WARNING: py:func reference target not found: UInput.capabilities
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:370: WARNING: py:func reference target not found: UInput.device.capabilities
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:373: WARNING: py:func reference target not found: UInput.write
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:373: WARNING: py:func reference target not found: UInput.write_event
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:375: WARNING: py:func reference target not found: UInput.write(type, code, value)
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:377: WARNING: py:func reference target not found: UInput
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:386: WARNING: py:func reference target not found: InputDevice.capabilities
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:393: WARNING: py:func reference target not found: UInput.uinput_open
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:393: WARNING: py:func reference target not found: UInput.uinput_open
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:393: WARNING: py:func reference target not found: UInput.uinput_create
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:400: WARNING: py:class reference target not found: UInput
/home/tkloczko/rpmbuild/BUILD/python-evdev-1.6.0/docs/changelog.rst:406: WARNING: py:func reference target not found: ecodes.keys
done
build succeeded, 62 warnings.

You can peak on fixes that kind of issues in other projects
latchset/jwcrypto#289
click-contrib/sphinx-click@abc31069
latchset/jwcrypto#289
RDFLib/rdflib-sqlalchemy#95
sissaschool/elementpath@bf869d9e
jaraco/cssutils#21
pywbem/pywbem#2895
sissaschool/xmlschema@42ea98f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant