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

Restructure udev APIs #3

Closed
swsnr opened this issue Aug 18, 2010 · 2 comments
Closed

Restructure udev APIs #3

swsnr opened this issue Aug 18, 2010 · 2 comments
Assignees

Comments

@swsnr
Copy link
Contributor

swsnr commented Aug 18, 2010

Rename udev to pyudev and turn it into a package:

  • pyudev.__init__ contains __version__ and apipkg definitions for classes and submodules
  • pyudev._libudev contains ctypes wrapper code from _udev
  • pyudev._core contains Context and Device classes
  • pyudev._enumerate contains Enumerator class
  • pyudev._monitor contains Monitor class
  • pyudev._pyqt4 contains QUDevMonitorObserver class

All these classes and submodules are grouped in the following apipkg structure:

'Context': '._core.Context',
'Device': '._core.Device',
'Monitor': '._monitor.Monitor',
'Enumerator': '._enumerate.Enumerator',
'pyqt4': {
    'QUDevMonitorObserver': '._pyqt4.QUDevMonitorObserver'
},

Solving this issue is precondition for Python 3 support, because it de-couples to top-level package from implementation without loosing the comfortable namespace. This avoids imports of the API during installation phase, before 2to3 is run.

@swsnr
Copy link
Contributor Author

swsnr commented Aug 18, 2010

Mostly complete test coverage required to assure correctness of refactoring. #4 is therefore mandatory prerequisite.

@swsnr
Copy link
Contributor Author

swsnr commented Aug 23, 2010

Restructured API, closed by b2b46a6

udev was turned into a packge named pyudev. The namespace of this package
is controlled by apipkg, thus the public interface of pyudev is identical to
udev, but interally code is split into different modules. The required
apipkg module was added to the source tree and listed as install
requirement. qudev was moved into the pyudev package as pyudev.pyqt4.
Tests and documentation were updated accordingly.

@ghost ghost assigned swsnr Jul 19, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant