[issue12915] Add inspect.locate and inspect.resolve

2020-12-31 Thread Rahul Jha
Change by Rahul Jha : -- nosy: +RJ722 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12915] Add inspect.locate and inspect.resolve

2020-06-29 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12915] Add inspect.locate and inspect.resolve

2020-06-29 Thread Ned Deily
Ned Deily added the comment: See bpo-41154 for possible regression introduced by these changes. -- nosy: +ned.deily ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-03-03 Thread STINNER Victor
STINNER Victor added the comment: I understand that all known issues are now fixed, so I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue12915] Add inspect.locate and inspect.resolve

2020-03-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset e0acec15412203359d59db33e447698ee51e07fc by Michael Felt in branch 'master': bpo-12915: Skip test_pkgutil.test_name_resolution() non-encodable filenames (GH-18720)

[issue12915] Add inspect.locate and inspect.resolve

2020-03-01 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +18078 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18720 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-02-29 Thread Michael Felt
Michael Felt added the comment: I am very busy with normal work this week. However I’ll attempt to add a pr with your (Victor”s) suggestion. Sent from my iPhone > On 29 Feb 2020, at 23:36, STINNER Victor wrote: > >  > STINNER Victor added the comment: > >> File >>

[issue12915] Add inspect.locate and inspect.resolve

2020-02-29 Thread STINNER Victor
STINNER Victor added the comment: > File > "/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/test/test_pkgutil.py", > line 249, in test_name_resolution >os.makedirs(d, exist_ok=True) (...) > UnicodeEncodeError: 'latin-1' codec can't encode characters in position > 17-19:

[issue12915] Add inspect.locate and inspect.resolve

2020-02-29 Thread Michael Felt
Michael Felt added the comment: PR18517 has, likely, a utf-8 dependency. AIX, default latin-1 does not accept the new test. Starting with this merge AIX bot fails with: == ERROR: test_name_resolution

[issue12915] Add inspect.locate and inspect.resolve

2020-02-28 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 4f17c5cd9a1ec50fe8de7ef68c39220a01a862cb by Vinay Sajip in branch 'master': bpo-12915: Improve Unicode support for package names and attributes. (GH-18517) https://github.com/python/cpython/commit/4f17c5cd9a1ec50fe8de7ef68c39220a01a862cb

[issue12915] Add inspect.locate and inspect.resolve

2020-02-17 Thread Vinay Sajip
Vinay Sajip added the comment: > I'm not sure how to design the regex. Did you not look at the PR I added to address this (Unicode chars), with a regex change? I added you as a reviewer. -- ___ Python tracker

[issue12915] Add inspect.locate and inspect.resolve

2020-02-17 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue to discuss the non-ASCII identifiers. Currently, the code uses [a-z_]\w*, but "é" is a valid Python module name for example: $ echo 'print("here")' > é.py $ python3 -c 'import é' here I'm not sure how to design the regex. I just reported

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +17895 pull_request: https://github.com/python/cpython/pull/18517 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: To be more precise, one could use ^(?!\d)(\w+)(\.(?!\d)(\w+))* for _DOTTED_WORDS and use the re.U flag when compiling the pattern. That should match any packages where segments start with a letter and continue with alphanumerics. Do you agree? --

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: > The regex looks too strict. Python 3 accepts non-ASCII module names. Would adding the re.U flag be enough, or are you thinking of other possibilities? -- ___ Python tracker

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread STINNER Victor
STINNER Victor added the comment: The regex looks too strict. Python 3 accepts non-ASCII module names. Should existing functions be modified to reuse the new function? -- nosy: +vstinner ___ Python tracker

[issue12915] Add inspect.locate and inspect.resolve

2020-02-14 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.5 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-02-14 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 1ed61617a4a6632905ad6a0b440cd2cafb8b6414 by Vinay Sajip in branch 'master': bpo-12915: Add pkgutil.resolve_name (GH-18310) https://github.com/python/cpython/commit/1ed61617a4a6632905ad6a0b440cd2cafb8b6414 --

[issue12915] Add inspect.locate and inspect.resolve

2020-02-02 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +17686 pull_request: https://github.com/python/cpython/pull/18310 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: FTR, Django has a similar helper: from django.utils.module_loading import import_string ValidationError = import_string('django.core.exceptions.ValidationError')

[issue12915] Add inspect.locate and inspect.resolve

2020-01-25 Thread Vinay Sajip
Vinay Sajip added the comment: > With the lack of support, I suggest closing this. Well, the lack of support is just for adding to importlib. It still seems useful to refactor it out ... just not clear where the best place is. Perhaps pkgutil? It's definitely useful to have in the stdlib in

[issue12915] Add inspect.locate and inspect.resolve

2020-01-24 Thread Éric Araujo
Éric Araujo added the comment: With the lack of support, I suggest closing this. -- ___ Python tracker ___ ___ Python-bugs-list

[issue12915] Add inspect.locate and inspect.resolve

2020-01-24 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Vinay Sajip
Vinay Sajip added the comment: Another question to consider: is inspect the best place for this? I don't think it is, because (a) It's not really an inspection facility (b) Importing inspect to get this functionality would pull in lots of stuff which wouldn't be used in the typical use

[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Brett Cannon
Brett Cannon added the comment: importlib.util.resolve_name() already exists for resolving an explicit relative import name to an absolute one, so closing this as out of date. -- resolution: - out of date status: open - closed ___ Python tracker

[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Vinay Sajip
Vinay Sajip added the comment: importlib.util.resolve_name() already exists But that's not what the proposed functionality is for, is it? This covers finding values inside an imported module which can be accessed via a dotted path from the module globals. -- resolution: out of date

[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Brett Cannon
Brett Cannon added the comment: Importlib already has importlib.import_module() (since Python 2.7) and that's as far as I'm willing to go for finding a module by name. Anything past that is a getarr() call on the resulting module and thus not worth adding to importlib. --

[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Vinay Sajip
Vinay Sajip added the comment: and thus not worth adding to importlib. Okay, fair enough. It's not purely an import function, though partly related to imports. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915

[issue12915] Add inspect.locate and inspect.resolve

2014-01-31 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___

[issue12915] Add inspect.locate and inspect.resolve

2013-02-26 Thread Ezio Melotti
Ezio Melotti added the comment: Can you provide a couple of examples of that notation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___

[issue12915] Add inspect.locate and inspect.resolve

2013-02-26 Thread Vinay Sajip
Vinay Sajip added the comment: Can you provide a couple of examples of that notation? entry_points = [console_scripts] pybabel = babel.messages.frontend:main [distutils.commands] compile_catalog = babel.messages.frontend:compile_catalog extract_messages =

[issue12915] Add inspect.locate and inspect.resolve

2013-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Something to consider with these functions: it is probably desirable to also support the popular alternate notation which uses an explicit : to separate the module name from the reference within the module. For example, setuptools entry points and nose test

[issue12915] Add inspect.locate and inspect.resolve

2012-12-31 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs-list

[issue12915] Add inspect.locate and inspect.resolve

2012-12-30 Thread Berker Peksag
Berker Peksag added the comment: Attaching new patch to address Vinay Sajip's suggestions on Rietveld. Thank you, Vinay. -- Added file: http://bugs.python.org/file28500/issue12915_v2.diff ___ Python tracker rep...@bugs.python.org

[issue12915] Add inspect.locate and inspect.resolve

2012-12-10 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch nosy: +berker.peksag versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file28277/issue12915.diff ___ Python tracker rep...@bugs.python.org

[issue12915] Add inspect.locate and inspect.resolve

2012-12-10 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___

[issue12915] Add inspect.locate and inspect.resolve

2011-11-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5df1065ddb8b by Éric Araujo in branch 'default': Expand tests and fix bugs in util.resolve_name. http://hg.python.org/distutils2/rev/5df1065ddb8b -- ___ Python tracker

[issue12915] Add inspect.locate and inspect.resolve

2011-10-20 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The version in logging.config appears to be doing the same job, but is shorter: def _resolve(name): Resolve a dotted name to a global object. name = name.split('.') used = name.pop(0) found = __import__(used) for n in

[issue12915] Add inspect.locate and inspect.resolve

2011-10-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1405df4a1535 by Éric Araujo in branch 'default': Expand tests and fix bugs in packaging.util.resolve_name. http://hg.python.org/cpython/rev/1405df4a1535 -- nosy: +python-dev

[issue12915] Add inspect.locate and inspect.resolve

2011-10-19 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs-list

[issue12915] Add inspect.locate and inspect.resolve

2011-09-13 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: In addition, error handling/reporting is not trivial to get right. We’ve had to fix the code in distutils2 and it’s still not quite right (#12703). I opened this report because I’d like to see all stdlib modules use the same functions and I’d

[issue12915] Add inspect.locate and inspect.resolve

2011-09-12 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Sorry if I was unclear; the functions work with a dotted name as a string and resolve it to an object. __import__ works with module, whereas this kind of functions work with mod.name, pkg.mod.name.attr, etc., that is, they combine import and

[issue12915] Add inspect.locate and inspect.resolve

2011-09-09 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs-list

[issue12915] Add inspect.locate and inspect.resolve

2011-09-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: To be a little clearer, this is about dotted import names, not regular dotted names. pydoc.locate(path, forceload=0): Locate an object by name or dotted path, importing as necessary pydoc.resolve(thing, forceload=0): Given an object or a

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___

[issue12915] Add inspect.locate and inspect.resolve

2011-09-06 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: The need to resolve a dotted name to a Python object is spreading in the stdlib: pydoc has locate and resolve, packaging has util.resolve_name, unittest has something else, etc. For the benefit of stdlib maintainers as well as the community,