[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-25 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-24 Thread Hiroaki Mizuguchi
Hiroaki Mizuguchi added the comment: I understand. I am mistaken about class loading. I will withdraw this issue. -- ___ Python tracker ___

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-24 Thread Vinay Sajip
Vinay Sajip added the comment: You can't expect things to work if you introduce ambiguities such as a attribute `bar` in module `foo` as well as a `foo.bar` module. If there were a clear delineation between where a module stops and where a set of attributes starts, e.g.

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-23 Thread Hiroaki Mizuguchi
Hiroaki Mizuguchi added the comment: > Then bar.logging is ambiguous. Yes, I agree. But this bug is happen new testcase that resolve 'foobar.baz.FooBarFormatter' when 'foo' module has 'import baz' statement or 'baz' variable. -- ___ Python

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-21 Thread Vinay Sajip
Vinay Sajip added the comment: > bar module use logging module of stdlib not bar.logging module in this test > case. Then bar.logging is ambiguous. There's no reason one has to use a stdlib package name in one's own package. -- ___ Python

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-20 Thread Hiroaki Mizuguchi
Hiroaki Mizuguchi added the comment: bar module use logging module of stdlib not bar.logging module in this test case. change the statement to `from . import logging` is not a solution. -- ___ Python tracker

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-19 Thread Vinay Sajip
Vinay Sajip added the comment: The problem is caused by the "import logging" in bar/__init__.py, which causes bar.logging to not be found because it clashes with the stdlib logging package. If you change the statement to from . import logging then the error does not occur. So I don't think

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-19 Thread Hiroaki Mizuguchi
Change by Hiroaki Mizuguchi : -- keywords: +patch pull_requests: +24846 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26229 ___ Python tracker

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-13 Thread Hiroaki Mizuguchi
New submission from Hiroaki Mizuguchi : This bug is loading bar.logging.FooBarFormatter is occur "ModuleNotFoundError: No module named 'bar.logging.FooBarFormatter'; 'bar.logging' is not a package" when bar module has 'import logging' directive. logging.config._resolve and