Commit Graph

26 Commits

Author SHA1 Message Date
Brett Cannon 02d8454002 Issue #23014: Make importlib.abc.Loader.create_module() required when
importlib.abc.Loader.exec_module() is also defined.

Before this change, create_module() was optional **and** could return
None to trigger default semantics. This change now reduces the
options for choosing default semantics to one and in the most
backporting-friendly way (define create_module() to return None).
2015-01-09 11:39:21 -05:00
Brett Cannon 8447c703d1 Issue #14710: Fix both pkgutil.find_loader() and get_loader() to not
raise an exception when a module doesn't exist.

Thanks to Pavel Aslanov for the bug report.
2014-05-23 12:30:37 -04:00
Eric Snow 658af31372 Issue #21200: Return None from pkgutil.get_loader() when __spec__ is missing. 2014-04-19 00:13:23 -06:00
Nick Coghlan dc855b7b1f Close #20839: pkgutil.find_loader now uses importlib.util.find_spec 2014-03-04 20:39:42 +10:00
Benjamin Peterson f617fa88de merge 3.3 2014-02-16 14:53:55 -05:00
Benjamin Peterson cf62603276 backout fafac90b69c4 2014-02-16 14:52:01 -05:00
Benjamin Peterson a118c4fa79 merge 3.3 2014-01-09 11:12:31 -06:00
Benjamin Peterson 50b82c765f clear zip stat cache after each ref leak run 2014-01-09 11:10:30 -06:00
Eric Snow 37148b27ac Issue #19708: Update pkgutil to use the new importer APIs. 2014-01-04 15:09:53 -07:00
Eric Snow 2ba66ebc20 Issue #19724: clear out colliding temp module. 2013-11-22 13:55:23 -07:00
Eric Snow b523f8433a Implement PEP 451 (ModuleSpec). 2013-11-22 09:05:39 -07:00
Brett Cannon 9529fbfd36 Issue #17177: Stop using imp in a bunch of tests 2013-06-15 17:11:25 -04:00
Nick Coghlan c4e0d982f3 Close issue #16163: handle submodules in pkgutil.iter_importers 2013-04-14 22:30:42 +10:00
Nick Coghlan 9455492142 Issue #15314: Tweak a pkgutil test to hopefully be more Windows friendly 2012-07-17 21:37:58 +10:00
Nick Coghlan 8ecf50474c Issue #15343: Handle importlib.machinery.FileFinder instances in pkgutil.walk_packages (et al) 2012-07-15 21:19:18 +10:00
Nick Coghlan 85e729ec3b Take the first step in resolving the messy pkgutil vs importlib edge cases by basing pkgutil explicitly on importlib, deprecating its internal import emulation and setting __main__.__loader__ correctly so that runpy still works (Affects #15343, #15314, #15357) 2012-07-15 18:09:52 +10:00
Antoine Pitrou b2dd880e0a Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested namespace packages. 2012-07-09 21:23:58 +02:00
Eric V. Smith 984b11f88f issue 14660: Implement PEP 420, namespace packages. 2012-05-24 20:21:04 -04:00
Eric V. Smith 5cdc6308b6 Cleanup so subsequent tests won't fail. Needs to be moved into a support routine (see 14715). 2012-05-16 04:48:04 -04:00
Eric V. Smith a790c9b6d6 Issue #14817: Add rudimentary tests for pkgutil.extend_path. 2012-05-15 20:44:06 -04:00
Ned Deily 7010a07bd0 Issue #7367: Ensure test directory always gets removed. 2011-10-07 12:01:40 -07:00
Ned Deily caf5a22c5f Issue #7367: Add test case to test_pkgutil for walking path with
an unreadable directory.
2011-10-06 14:19:06 -07:00
Alexandre Vassalotti 515a74fbf9 Issue 4005: Remove .sort() call on dict_keys object.
This caused pydoc to fail when there was a zip file in sys.path.

Patch contributed by Amaury Forgeot d'Arc.
2009-07-05 06:42:44 +00:00
Benjamin Peterson ee8712cda4 #2621 rename test.test_support to test.support 2008-05-20 21:35:26 +00:00
Christian Heimes e57950fbfe Merged revisions 62420-62421,62423-62424 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62420 | mark.dickinson | 2008-04-20 20:30:05 +0200 (Sun, 20 Apr 2008) | 3 lines

  Even more fixes for alpha Tru64, this time for
  the phase and polar methods.
........
  r62421 | mark.dickinson | 2008-04-20 22:38:48 +0200 (Sun, 20 Apr 2008) | 2 lines

  Add test for tanh(-0.) == -0. on IEEE 754 systems
........
  r62423 | amaury.forgeotdarc | 2008-04-20 23:02:21 +0200 (Sun, 20 Apr 2008) | 3 lines

  Correct an apparent refleak in test_pkgutil: zipimport._zip_directory_cache contains
  info for all processed zip files, even when they are no longer used.
........
  r62424 | mark.dickinson | 2008-04-20 23:39:04 +0200 (Sun, 20 Apr 2008) | 4 lines

  math.atan2 is misbehaving on Windows;  this patch
  should fix the problem in the same way that
  the cmath.phase problems were fixed.
........
2008-04-21 13:08:03 +00:00
Christian Heimes dae2a8939d Merged revisions 62350-62355,62358-62359,62364-62365,62370,62372-62375,62378-62379,62381 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62350 | nick.coghlan | 2008-04-15 12:25:31 +0200 (Tue, 15 Apr 2008) | 1 line

  Issue 2439: add pkgutils.get_data() as a convenience wrapper for the PEP 302 get_data() API (contributed by Paul Moore)
........
  r62351 | nick.coghlan | 2008-04-15 12:28:14 +0200 (Tue, 15 Apr 2008) | 1 line

  Add test file missing from rev 62350
........
  r62352 | benjamin.peterson | 2008-04-15 13:58:46 +0200 (Tue, 15 Apr 2008) | 2 lines

  Add myself to Doc/ACKS.txt
........
  r62353 | andrew.kuchling | 2008-04-15 15:10:07 +0200 (Tue, 15 Apr 2008) | 6 lines

  Add *,**,@ to index, as suggested by
  http://farmdev.com/thoughts/24/what-does-the-def-star-variable-or-def-asterisk-parameter-syntax-do-in-python-/

  The right entry type to use isn't clear; operator seems wrong, because *,**,@
  aren't being used in expressions here.  I put them as 'statement'; 'syntax'
  might be better.
........
  r62354 | andrew.kuchling | 2008-04-15 15:10:41 +0200 (Tue, 15 Apr 2008) | 1 line

  Typo fix
........
  r62355 | mark.dickinson | 2008-04-15 22:51:18 +0200 (Tue, 15 Apr 2008) | 3 lines

  Fix for possible signed overflow:  the behaviour of -LONG_MIN is
  undefined in ANSI C.
........
  r62358 | jeroen.ruigrok | 2008-04-16 14:47:01 +0200 (Wed, 16 Apr 2008) | 2 lines

  Reformat to 80 columns prior to adding documentation.
........
  r62359 | jeroen.ruigrok | 2008-04-16 14:57:43 +0200 (Wed, 16 Apr 2008) | 2 lines

  Add details about the return value for mmap.flush().
........
  r62364 | raymond.hettinger | 2008-04-17 12:48:31 +0200 (Thu, 17 Apr 2008) | 1 line

  Issue 2648: Add leading zero to money format recipe in the docs.
........
  r62365 | jeroen.ruigrok | 2008-04-17 14:39:45 +0200 (Thu, 17 Apr 2008) | 2 lines

  Be consistent in the use of read-only.
........
  r62370 | andrew.kuchling | 2008-04-17 22:44:06 +0200 (Thu, 17 Apr 2008) | 1 line

  Typo fixes
........
  r62372 | andrew.kuchling | 2008-04-18 04:40:47 +0200 (Fri, 18 Apr 2008) | 1 line

  Use correct parameter name
........
  r62373 | andrew.kuchling | 2008-04-18 18:53:09 +0200 (Fri, 18 Apr 2008) | 1 line

  #2654: fix typo
........
  r62374 | andrew.kuchling | 2008-04-18 20:28:23 +0200 (Fri, 18 Apr 2008) | 4 lines

  Remove personal note from Jim Roskind; it no longer applies, and the
  e-mail address is for a previous employer.

  Can we move the big long copyright statement into a sidebar or something?
........
  r62375 | andrew.kuchling | 2008-04-18 20:39:55 +0200 (Fri, 18 Apr 2008) | 1 line

  Rewrite introductory section, and remove old section.  (It was already commented-out, but why keep it?)
........
  r62378 | skip.montanaro | 2008-04-18 22:35:46 +0200 (Fri, 18 Apr 2008) | 1 line

  resolve issue 2014
........
  r62379 | benjamin.peterson | 2008-04-18 22:45:33 +0200 (Fri, 18 Apr 2008) | 2 lines

  Fix indentation in sysmodule.c
........
  r62381 | amaury.forgeotdarc | 2008-04-19 01:31:33 +0200 (Sat, 19 Apr 2008) | 3 lines

  Some tests did not pass on repeated calls (regrtest -R::)
  Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
........
2008-04-19 00:55:37 +00:00