[New-bugs-announce] [issue27059] find_spec and find_loader ignore package/path argument

Gerrit Ansmann report at bugs.python.org
Thu May 19 14:49:53 EDT 2016

New submission from Gerrit Ansmann:

According to my understanding, the `package`/`path` argument of the `find_loader`/`find_spec` command should enable it to find modules in other directories than the current one. Instead, these arguments seem to be ignored and even changing the working directory from within Python (using os.chdir) does not yield the expected results with `find_spec`.

I append a script with several test cases that should succeed in my understanding, but some of which don’t.

Python version: 3.4.3.
OS: Ubuntu 14.04.4
Pertinent Stack Overflow question: http://stackoverflow.com/a/37260391/2127008

components: Library (Lib)
files: test.py
messages: 265882
nosy: Wrzlprmft, brett.cannon
priority: normal
severity: normal
status: open
title: find_spec and find_loader ignore package/path argument
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file42903/test.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list