[issue2135] Restructure import.c into PEP 302 importer objects

2021-04-03 Thread Brett Cannon
Change by Brett Cannon : -- pull_requests: +23910 pull_request: https://github.com/python/cpython/pull/25169 ___ Python tracker ___ _

[issue2135] Restructure import.c into PEP 302 importer objects

2008-04-21 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: Closed at Doug's request. My importlib work, once it lands, will supplant all of this. -- resolution: -> rejected status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: Interesting - I'll try to find the time to take a look at this. (I also added PJE to the nosy list - hopefully he will get a chance to look at it) -- nosy: +ncoghlan, pje __ Tracker <[EMAIL PROTECTED]>

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Brett Cannon
Brett Cannon added the comment: On Fri, Feb 22, 2008 at 5:21 PM, Douglas Greiman <[EMAIL PROTECTED]> wrote: > > Douglas Greiman added the comment: > > Brett, > > I wrote my patch thinking that the next step would be to rewrite > DirectoryImporter in Python. If you're already working on that

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Douglas Greiman
Douglas Greiman added the comment: Brett, I wrote my patch thinking that the next step would be to rewrite DirectoryImporter in Python. If you're already working on that and just want to skip straight from point A to point C and skip this point B, I'm fine with that. Basically, tell me if you

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: First, let me state that I like the idea of a uniform approach to importing, but given the complexity of the task, Brett's approach (which I understand as implementing the builtin importer classes in Python) would make sense (as long as he can solve the

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Brett Cannon
Brett Cannon added the comment: Sorry I have not commented on this sooner; been swamped. First, the error Alexander is seeing is probably caused by a source file that has an encoding other than ASCII (which is fine as the default encoding in Python 3.0 is UTF-8). But chances are the file has an

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch breaks test_import on Mac OS 10.4: $ ./python.exe -E -tt -bb ./Lib/test/regrtest.py test_import test_import test test_import failed -- Traceback (most recent call last): File "./Lib/test/regrtest.py", line 1199, in main() File "./Lib/tes

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've noticed that the proposed patch adds const qualifier to many C-API functions' arguments. While at the first glance these changes are reasonable, they add clutter to the already massive patch. I would recommend to separate const qualifier changes in

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-19 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: -> brett.cannon keywords: +patch nosy: +brett.cannon, tiran priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ __

[issue2135] Restructure import.c into PEP 302 importer objects

2008-02-17 Thread Douglas Greiman
New submission from Douglas Greiman: This patch reorganizes import.c to move functionality into two new PEP 302-style Importer objects. I attempted to change as little as feasible, but the patch is still ~4700 lines long, about 1000 of which is new tests. BuiltinImporter: handles C_BUILTIN and