<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/importlib/_bootstrap.py, branch v3.2b2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/importlib/_bootstrap.py?h=v3.2b2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/importlib/_bootstrap.py?h=v3.2b2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2010-11-18T03:03:04Z</updated>
<entry>
<title>Fix a minor inconsistency in capitalization for the 'No module named' exception</title>
<updated>2010-11-18T03:03:04Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-11-18T03:03:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0ffe6a976060431c294e4e5e2a0324a67bc9cf97'/>
<id>urn:sha1:0ffe6a976060431c294e4e5e2a0324a67bc9cf97</id>
<content type='text'>
message in importlib.

Thanks to Éric Araujo for spotting the inconsistency.
</content>
</entry>
<entry>
<title>Remove redundant context manager.</title>
<updated>2010-09-03T19:55:26Z</updated>
<author>
<name>Florent Xicluna</name>
<email>florent.xicluna@gmail.com</email>
</author>
<published>2010-09-03T19:55:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=764d612f5e4d7d3c27e3f1a1eef661e9e556082e'/>
<id>urn:sha1:764d612f5e4d7d3c27e3f1a1eef661e9e556082e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>OSError is the exception raised when one tries to create a directory that</title>
<updated>2010-08-26T21:07:13Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-08-26T21:07:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a7ceeb335f231269e7905597e6bd15ff0e302bd0'/>
<id>urn:sha1:a7ceeb335f231269e7905597e6bd15ff0e302bd0</id>
<content type='text'>
already exists, not IOError.

Part of the continuing saga of issue #9572.
</content>
</entry>
<entry>
<title>Fix a bug where an attribute was lacking an object to work off of.</title>
<updated>2010-08-24T21:04:05Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-08-24T21:04:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1d6569cfb956c90c6904a7b9fbbc8cf345df47ae'/>
<id>urn:sha1:1d6569cfb956c90c6904a7b9fbbc8cf345df47ae</id>
<content type='text'>
Related to the fix for issue #9572. Thanks to Łukasz Czuja for catching the
bug.
</content>
</entry>
<entry>
<title>One of the joys of having test_multiprocessing occasionally execute after</title>
<updated>2010-08-22T22:19:11Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-08-22T22:19:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ee6d64773b3137ef59272517ee0491dd7748d46d'/>
<id>urn:sha1:ee6d64773b3137ef59272517ee0491dd7748d46d</id>
<content type='text'>
test_importlib is that it discovers special little race conditions. For
instance, it turns out that importlib would throw an exception if two different
Python processes both tried to create the __pycache__ directory as one process
would succeed, causing the other process to fail as it didn't expect to get any
"help". So now importlib simply stays calm and just accepts someone else did
the work of creating the __pycache__ directory for it, moving on with life.

Closes issue #9572.
</content>
</entry>
<entry>
<title>Make importlib.abc.SourceLoader the primary mechanism for importlib.</title>
<updated>2010-07-03T22:32:41Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-07-03T22:32:41Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=418182e18b09e04fd7dd23d87f5cc81801b95299'/>
<id>urn:sha1:418182e18b09e04fd7dd23d87f5cc81801b95299</id>
<content type='text'>
This required moving the class from importlib/abc.py into
importlib/_bootstrap.py and jiggering some code to work better with the class.
This included changing how the file finder worked to better meet import
semantics. This also led to fixing importlib to handle the empty string from
sys.path as import currently does (and making me wish we didn't support that
instead just required people to insert '.' instead to represent cwd).

It also required making the new set_data abstractmethod create
any needed subdirectories implicitly thanks to __pycache__ (it was either this
or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
method or have set_data with no data arg mean to create a directory).

Lastly, as an optimization the file loaders cache the file path where the
finder found something to use for loading (this is thanks to having a
sourceless loader separate from the source loader to simplify the code and
cut out stat calls).
Unfortunately test_runpy assumed a loader would always work for a module, even
if you changed from underneath it what it was expected to work with. By simply
dropping the previous loader in test_runpy so the proper loader can be returned
by the finder fixed the failure.

At this point importlib deviates from import on two points:

1. The exception raised when trying to import a file is different (import does
an explicit file check to print a special message, importlib just says the path
cannot be imported as if it was just some module name).

2. the co_filename on a code object is not being set to where bytecode was
actually loaded from instead of where the marshalled code object originally
came from (a solution for this has already been agreed upon on python-dev but has
not been implemented yet; issue8611).
</content>
</entry>
<entry>
<title>Make importlib.abc.SourceLoader the primary mechanism for importlib.</title>
<updated>2010-07-03T21:48:25Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-07-03T21:48:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=61b14251d3a653548f70350acb250cf23b696372'/>
<id>urn:sha1:61b14251d3a653548f70350acb250cf23b696372</id>
<content type='text'>
This required moving the class from importlib/abc.py into
importlib/_bootstrap.py and jiggering some code to work better with the class.
This included changing how the file finder worked to better meet import
semantics. This also led to fixing importlib to handle the empty string from
sys.path as import currently does (and making me wish we didn't support that
instead just required people to insert '.' instead to represent cwd).

It also required making the new set_data abstractmethod create
any needed subdirectories implicitly thanks to __pycache__ (it was either this
or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
method or have set_data with no data arg mean to create a directory).

Lastly, as an optimization the file loaders cache the file path where the
finder found something to use for loading (this is thanks to having a
sourceless loader separate from the source loader to simplify the code and
cut out stat calls).
Unfortunately test_runpy assumed a loader would always work for a module, even
if you changed from underneath it what it was expected to work with. By simply
dropping the previous loader in test_runpy so the proper loader can be returned
by the finder fixed the failure.

At this point importlib deviates from import on two points:

1. The exception raised when trying to import a file is different (import does
an explicit file check to print a special message, importlib just says the path
cannot be imported as if it was just some module name).

2. the co_filename on a code object is not being set to where bytecode was
actually loaded from instead of where the marshalled code object originally
came from (a solution for this has already been agreed upon on python-dev but has
not been implemented yet; issue8611).
</content>
</entry>
<entry>
<title>Move importlib.abc.SourceLoader to _bootstrap.</title>
<updated>2010-06-28T04:57:24Z</updated>
<author>
<name>Brett Cannon</name>
<email>bcannon@gmail.com</email>
</author>
<published>2010-06-28T04:57:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0cf9e6a6214d4418286a30e305fefad644b29c52'/>
<id>urn:sha1:0cf9e6a6214d4418286a30e305fefad644b29c52</id>
<content type='text'>
Required updating code relying on other modules to switch to _bootstrap's
unique module requirements. This led to the realization that
get_code was being too liberal in its exception catching when calling set_data
by blindly grabbing IOError. Shifted the responsibility of safely ignoring
writes to a read-only path to set_data.

Importlib is still not relying on SourceLoader yet; requires creating a
SourcelessLoader and updating the source finder.
</content>
</entry>
<entry>
<title>Repair test failure.  Bug 8727.</title>
<updated>2010-05-18T14:15:20Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2010-05-18T14:15:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=04b5684d002de5e3eb4232bb287c6884afb61bf3'/>
<id>urn:sha1:04b5684d002de5e3eb4232bb287c6884afb61bf3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>PEP 3147</title>
<updated>2010-04-17T00:19:56Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2010-04-17T00:19:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=28a691b7fdde1b8abafa4c4a5025e6bfa44f48b9'/>
<id>urn:sha1:28a691b7fdde1b8abafa4c4a5025e6bfa44f48b9</id>
<content type='text'>
</content>
</entry>
</feed>
