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

validate package scoping causes incorrect package namespacing #128

Closed
majuscule opened this issue Oct 21, 2016 · 2 comments
Closed

validate package scoping causes incorrect package namespacing #128

majuscule opened this issue Oct 21, 2016 · 2 comments

Comments

@majuscule
Copy link

I believe that I have found a bug in the configobj/validate interaction. I am not entirely sure if this code is causing a user-facing issue, but I am fairly certain that the code below is not behaving as intended.

https://github.com/DiffSK/configobj/blob/master/src/configobj/__init__.py#L2177
excerpt:

if not preserve_errors or isinstance(cause, self._vdtMissingValue):

The import of validate (init.py#L2142) is relative, and the resulting classes are namespaced within configobj: <class 'configobj.validate.VdtMissingValue'> - causing the above test to fallthrough.

This is causing additional problems when I attempt to raise VdtMissingDefinition (PR
#127) from configobj, as the resulting preserve_errors dictionary contains exceptions with differing namespaces, forcing awkward imports from external code which would like to test entry error types.

@majuscule majuscule changed the title validate package scoping causes incorrect package scoping validate package scoping causes incorrect package namespacing Oct 21, 2016
@jun66j5
Copy link

jun66j5 commented Nov 24, 2016

_version.py has the same problem, violates packaging namespace. It should be configobj/_version.py.

@robdennis
Copy link
Member

I think this is addressed in 5.0.7, but since I needed to manually implement the fix, please reopen if I messed it up

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

No branches or pull requests

4 participants