[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-03 Thread Eric Snow
Eric Snow added the comment: Here's a patch that updates a couple files to not use find_module/load_module. These are the only changes like this (of consequence) outside pydoc, pkgutil, and importlib, which are covered by other tickets. -- Added file: http://bugs.python.org/file

[issue19708] Check pkgutil for anything missing for PEP 451

2014-01-03 Thread Eric Snow
New submission from Eric Snow: Here's a patch that does the minimum of updating pkgutil and its tests to move away from find_module/load_module. I'm not sure there is much more to do than this. -- keywords: +patch Added file: http://bugs.python.org/file33301/issue197

[issue19703] Update pydoc to PEP 451

2014-01-03 Thread Eric Snow
Eric Snow added the comment: Here's a patch that updates pydoc to move away from find_module/load_module. These 4 don't need to change for PEP 451: safeimport() HTMLDoc.docmodule() HTMLDoc.index() TextDoc.docmodule() -- keywords: +patch Added file: http://bugs.python.org

[issue19699] Update zipimport for PEP 451

2014-01-03 Thread Eric Snow
Eric Snow added the comment: Could this wait for 3.5? -- ___ Python tracker <http://bugs.python.org/issue19699> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Eric Snow
Eric Snow added the comment: Here's an outline of how I see __main__.__spec__ playing out relative to the various cmdline interfaces. == == == === - -c -m dir file name loader origin cached has_loc

[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Eric Snow
Eric Snow added the comment: For the record, normal start-up happens like this (simplified): 1. prep for and create/initialize interpreter 2. exec the site module in the __main__ namespace (unless -S) 3. do the interface-specific stuff Note: exec of the site module does not impact the spec

[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Eric Snow
Eric Snow added the comment: Food for thought: We could (for 3.5) add an importer just for __main__ that gives us the appropriate spec and loads __main__ accordingly. Such a loader could even incorporate exec of the site module (and any PYTHONSTARTUP script

[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-04 Thread Eric Snow
Eric Snow added the comment: I'm fine with leaving __spec__ as None for those remaining cases. It definitely simplifies this ticket. :) Do you see any reason to not close this one at this point? -- ___ Python tracker <http://bugs.py

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Eric Snow added the comment: I'll commit it in a little while. Thanks. -- versions: +Python 3.4 -Python 3.5 ___ Python tracker <http://bugs.python.org/is

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19708] Check pkgutil for anything missing for PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: There wasn't much left to do for pkgutil after all. :) -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: At this point the only places using find_module and load_module are pydoc, importlib, and some oddballs that aren't worth worrying about. Issue #19703 covers the pydoc changes. -- dependencies: +Update pydoc to PE

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
New submission from Eric Snow: I'm guessing this is a very seldom (never?) used code path. I've included a patch to test and fix the problem. The patch includes several related tests for pydoc. $ py3 -c 'import pydoc; pydoc.synopsis("/opt/python3.4/lib/python3.4/lib-

[issue19703] Update pydoc to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Here's a new patch relative to the patch for issue #20123. -- dependencies: +pydoc.synopsis fails to load binary modules Added file: http://bugs.python.org/file33310/issue19703-use-new-api.diff ___ Python tracker

[issue19703] Update pydoc to PEP 451

2014-01-04 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33302/issue19703-use-new-api.diff ___ Python tracker <http://bugs.python.org/issue19703> ___ ___ Python-bug

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: FYI, I found this while working on issue #19703. -- ___ Python tracker <http://bugs.python.org/issue20123> ___ ___ Python-bugs-list m

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: I should clarify. That last commit was not the patch that adds the warnings. I'm going to update that patch and attach it here when I get the chance. -- ___ Python tracker <http://bugs.python.org/is

[issue20125] We need a good replacement for direct use of load_module(), post-PEP 451

2014-01-04 Thread Eric Snow
New submission from Eric Snow: In issue #19713, it came up that while PEP 451 deprecated Loader.load_module(), it did not provide a suitable replacement for calling it directly. We've worked around this in the stdlib by making calls to private APIs, but that won't work so we

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Hmm. That's a good question. There really isn't a simple, public-API replacement. I've opened issue #20125 to discuss our options. Feel free to offer any suggestions there. Thanks for b

[issue20125] We need a good replacement for direct use of load_module(), post-PEP 451

2014-01-04 Thread Eric Snow
Changes by Eric Snow : -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue20125> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Not sure why I nosy'ed you, either. :) -- ___ Python tracker <http://bugs.python.org/issue20123> ___ ___ Python-bugs-list m

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Eric Snow added the comment: I'll take a look. It could be something with #19713 or #19708 that also failed there. The other failing buildbot for those 3 changesets is http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Thanks for taking a look. Here's the patch that I totally forget to attach. -- keywords: +patch Added file: http://bugs.python.org/file33311/issue20123-fix-pydoc-synopsis.diff ___ Python tracker <http://bugs.py

[issue20127] Race condition in test_threaded_import.task()?

2014-01-04 Thread Eric Snow
New submission from Eric Snow: While looking at the logs of a buildbot failure [1], I took a look at Lib/test/test_threaded_import.py. In ThreadedImportTests.check_parallel_module_init() it makes a bunch of threaded calls to the module-level "task()" function. There may be a race

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Eric Snow added the comment: The windows buildbot failure looks like a race condition in a test unrelated to my changes (see issue #20127). I'm looking at the FreeBSD failure now. -- ___ Python tracker <http://bugs.python.org/is

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Which passed on the subsequent run... -- ___ Python tracker <http://bugs.python.org/issue19927> ___ ___ Python-bugs-list mailin

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Eric Snow added the comment: The FreeBSD failure happened in test_threading (apparently), where it was the last test to "finish". In the passing run it finished 339/388 -- the seed was different (1253928 vs. 5389019). This does not seem to be related to my 3 changesets. I'

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33311/issue20123-fix-pydoc-synopsis.diff ___ Python tracker <http://bugs.python.org/issue20123> ___ ___

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Sounds good to me. Here's an updated patch. -- Added file: http://bugs.python.org/file33312/issue20123-fix-pydoc-synopsis.diff ___ Python tracker <http://bugs.python.org/is

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Ah, I missed that in your earlier suggestion. I followed your recommendation. Thanks for that. :) -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python track

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: This broke one of the FreeBSD buildbots: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6102 -- status: closed -> open ___ Python tracker <http://bugs.python.org/issu

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: I've run out of time to trouble-shoot the failure (specific to 1 buildbot). Until I can get back to it, I've disabled the problematic test (even though it's only a problem on 1 buildbot). -- ___ Python

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-04 Thread Eric Snow
Eric Snow added the comment: The buildbot is happy again. I'll address fixing that test in issue #20128. -- status: open -> closed ___ Python tracker <http://bugs.python.org

[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2014-01-04 Thread Eric Snow
New submission from Eric Snow: The test (added in issue #20123) broke one of the stable FreeBSD buildbots: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6102 The log for that test run indicates the traceback and the test can be found in Lib/test/test_pydoc.py

[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2014-01-04 Thread Eric Snow
Changes by Eric Snow : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue19927> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue19703] Update pydoc to PEP 451

2014-01-04 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33310/issue19703-use-new-api.diff ___ Python tracker <http://bugs.python.org/issue19703> ___ ___ Python-bug

[issue19703] Update pydoc to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Here's a slightly updated patch. -- assignee: -> eric.snow stage: -> patch review type: -> enhancement Added file: http://bugs.python.org/file33313/issue19703-use-new-api.diff ___ Python

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Okay, there were a few lingering changes (mostly related to importlib.find_loader). Here's a patch. -- Added file: http://bugs.python.org/file33314/issue19713-more-API-adjustments.diff ___ Python tracker

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: ...and the patch. -- Added file: http://bugs.python.org/file33315/issue19713-deprecation-warnings.diff ___ Python tracker <http://bugs.python.org/issue19

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Eric Snow added the comment: Here's a patch that should round out the changes for this ticket, adding the various deprecation warnings. Most of the patch involves silencing warnings or cleaning up importlib tests relative to the deprecated

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Changes by Eric Snow : -- dependencies: +Check pkgutil for anything missing for PEP 451 ___ Python tracker <http://bugs.python.org/issue19713> ___ ___ Python-bug

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Changes by Eric Snow : -- assignee: -> eric.snow ___ Python tracker <http://bugs.python.org/issue19713> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-04 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33202/issue19713-deprecation-warnings.diff ___ Python tracker <http://bugs.python.org/issue19713> ___ ___

[issue19944] Make importlib.find_spec load packages as needed

2014-01-05 Thread Eric Snow
Eric Snow added the comment: Brett: What do you think about moving importlib.find_spec() to importlib.util? -- ___ Python tracker <http://bugs.python.org/issue19

[issue19703] Update pydoc to PEP 451

2014-01-06 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-06 Thread Eric Snow
Eric Snow added the comment: Larry: There wasn't any API change for this issue. It was a matter of fixing up places that were still using find_module/find_loader/load_module. -- resolution: -> fixed stage: test needed -> committed/rejected status: ope

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-06 Thread Eric Snow
Eric Snow added the comment: Also: changeset: 88332:bfcbe41e892d4451b53bb5674fc4fa4ae791ec8c user:Eric Snow date:Mon Jan 06 20:42:59 2014 -0700 summary: Remove more usage of APIs deprecated by PEP 451. -- ___ Python tracker

[issue20125] We need a good replacement for direct use of load_module(), post-PEP 451

2014-01-06 Thread Eric Snow
Eric Snow added the comment: Yeah, waiting on this until 3.5 is fine with me. Arfrever brought it up so I at least wanted to track it. -- stage: -> needs patch versions: +Python 3.5 -Python 3.4 ___ Python tracker <http://bugs.pyth

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Eric Snow added the comment: Here's an update to the patch. It includes doc and test changes. It also moves find_spec() into importlib.util. (I'm removing the other patches since I don't consider them valid approaches any longer). -- Added file: http://bugs.pytho

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Eric Snow added the comment: (...and to reduce any confusion on which patch is under consideration.) -- ___ Python tracker <http://bugs.python.org/issue19

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33112/issue19944-find-spec-mirror-import-module-simple.diff ___ Python tracker <http://bugs.python.org/issue19

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33111/issue19944-find-spec-mirror-import-module.diff ___ Python tracker <http://bugs.python.org/issue19

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33087/issue19944-find-spec-parent-module.diff ___ Python tracker <http://bugs.python.org/issue19

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file33299/issue19944-find-spec-mirror-import-module-direct.diff ___ Python tracker <http://bugs.python.org/issue19

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2014-01-06 Thread Eric Snow
Eric Snow added the comment: About the only thing left for this ticket is to finish up writing a few tests and round out some documentation. -- dependencies: -Update pickle to take advantage of PEP 451, Update zipimport for PEP 451 ___ Python

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2014-01-06 Thread Eric Snow
Eric Snow added the comment: There are a few lingering to-do comments that will need to be addressed as part of the remaining work: Lib/test/test_importlib/extension/test_case_sensitivity.py:# XXX find_spec tests Lib/test/test_importlib/extension/test_finder.py:# XXX find_spec tests Lib/test

[issue19944] Make importlib.find_spec load packages as needed

2014-01-06 Thread Eric Snow
Eric Snow added the comment: If nothing else comes up, this will be the last PEP-451 functional change for 3.4. -- ___ Python tracker <http://bugs.python.org/issue19

[issue20123] pydoc.synopsis fails to load binary modules

2014-01-07 Thread Eric Snow
Eric Snow added the comment: I realized today that this should probably be fixed in 3.3 as well, as RDM implied by marking it as also a 3.3 bug. :) -- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open versions: -P

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-07 Thread Eric Snow
Eric Snow added the comment: Good catch. I've gone through looking for other such left-overs from earlier patches that included deprecation warnings for loader.load_module(), but this is the only one I found. However, I did notice that _SpecMethods.from_module() does not get used any

[issue20199] status of module_for_loader and utils._module_to_load

2014-01-08 Thread Eric Snow
Eric Snow added the comment: utils.module_to_load() has been removed (it was introduced in 3.4) and module_for_loader() remains deprecated. The import machinery now does the work that both functions did, rendering them unnecessary. I guess I failed to take a look at whatsnew relative all

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Eric Snow
Eric Snow added the comment: The difference is that inspect.signature is not friendly to Signature subclasses. Without from_callable you can't customize the behavior in inspect.signature easily. -- ___ Python tracker <http://bugs.py

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Eric Snow
Eric Snow added the comment: It's not about customizing inspect.signature. It's about customizing the nice behavior of that function, including what type it returns. -- ___ Python tracker <http://bugs.python.o

[issue20261] Cannot pickle some objects that have a __getattr__()

2014-01-14 Thread Eric Snow
Eric Snow added the comment: This is a duplicate of #16251, no? Pickle looks up dunder ;) methods on instances rather than on classes, so __getattr__() gets triggered unexpectedly. I had to work around this in some code of mine by special-casing in __getattr__() names that start with

[issue19944] Make importlib.find_spec load packages as needed

2014-01-25 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: -> committed/rejected status: open -> pending type: -> enhancement ___ Python tracker <http://bugs.python

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow
Eric Snow added the comment: Looks like 3b8a2281d323aa9abf497192b01cf906b98ed3d8 broke the buildbots. e.g. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1533 -- nosy: +eric.snow ___ Python tracker <h

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow
Eric Snow added the comment: FYI: on my local box I saw only the 2 failed tests in test_telnetlib. -- ___ Python tracker <http://bugs.python.org/issue20

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow
Eric Snow added the comment: A better example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1538 -- ___ Python tracker <http://bugs.python.org/issue20

[issue19944] Make importlib.find_spec load packages as needed

2014-01-25 Thread Eric Snow
Changes by Eric Snow : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue19944> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue16991] Add OrderedDict written in C

2014-01-31 Thread Eric Snow
Eric Snow added the comment: I agree with Antoine. It's first on my todo list for 3.5. My goal is that this and a couple of related features will land during the PyCon sprints. -- ___ Python tracker <http://bugs.python.org/is

[issue20518] multiple inheritance + C extension = possibly unexpected __base__

2014-02-05 Thread Eric Snow
Eric Snow added the comment: So to restate, where some class Spam inherits from multiple classes and at least one was written in C, Spam.__base__ may have an unexpected value. > So, to conclude: it is sometimes not possible to use python > cooperative multiple inheritance if C base class

[issue20541] os.path.exists() gives wrong answer for Windows special files

2014-02-07 Thread Eric Snow
Eric Snow added the comment: > As per issue 1311, the exists returns True <-> stat will work equivalence is deliberate. We'll have to find a different way to resolve issue 20053 on Windows. I was going t say we should note this design/impl. detail in the os.path.exists() docs

[issue20484] test_pydoc can alter execution environment causing subsequent test failures

2014-02-21 Thread Eric Snow
Eric Snow added the comment: Sorry for the delay. It will likely be tomorrow before I can take a look but I'll do so as soon as possible. -- ___ Python tracker <http://bugs.python.org/is

[issue20484] calling pydoc.Helper()('modules') in the test suite sometimes causes failures

2014-02-22 Thread Eric Snow
Eric Snow added the comment: TL;DR new tests (improving coverage) uncovered existing "bugs". We should probably disable the tests for now. I'm glad you found this. Out of curiosity, how often do you run the test suite against a clean checkout? Typically I only run it

[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2014-02-22 Thread Eric Snow
Eric Snow added the comment: The other two test_modules* tests in test_pydoc are also having issues and I've likewise disabled them (see issue20484). They'll need to be investigated and re-enabled too. -- ___ Python trac

[issue20484] calling pydoc.Helper()('modules') in the test suite sometimes causes failures

2014-02-22 Thread Eric Snow
Eric Snow added the comment: I've disabled 2 of the 3 tests (the other was already disabled for issue20123). I'll pick up re-enabling the tests in issue20128. Thanks again, Ned, for finding this. (mental note: stay away from pydoc!] -- resolution: -> fixed stage

[issue20734] 3.4 cherry-pick: 13edfab6c3c0 disable 2 pydoc tests

2014-02-22 Thread Eric Snow
New submission from Eric Snow: New changeset 13edfab6c3c0 by Eric Snow in branch 'default': Issue #20484: Disable the 2 remaining "modules" tests in test_pydoc -- assignee: larry messages: 211957 nosy: eric.snow, larry, ned.deily priority: release blocker severity:

[issue20484] calling pydoc.Helper()('modules') in the test suite sometimes causes failures

2014-02-22 Thread Eric Snow
Eric Snow added the comment: I've opened issue20734 for the 3.4.0 cherry-pick. -- ___ Python tracker <http://bugs.python.org/issue20484> ___ ___ Python-bugs-l

[issue20763] old sys.path_hooks importer does not work with Python 3.4.0rc1

2014-02-25 Thread Eric Snow
Eric Snow added the comment: LGTM -- ___ Python tracker <http://bugs.python.org/issue20763> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue17911] Extracting tracebacks does too much work

2014-03-05 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue17911> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1580] Use shorter float repr when possible

2014-03-07 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue1580> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20864] getattr does not work well with descriptor

2014-03-07 Thread Eric Snow
Eric Snow added the comment: Returning None is the right thing here. The default for getattr() is returned only when it catches an AttributeError (hence the exception is the sentinel, so to speak, not None. Here's a rough equivalent: _notset = object() def getattr(obj, name, de

[issue20864] getattr does not work well with descriptor

2014-03-07 Thread Eric Snow
Eric Snow added the comment: You may get unexpected behavior when you have a descriptor on a class that also has __getattr__ defined. See issue #1615. However, I don't think that applies here. As far as I can tell, everything is working the way it s

[issue29102] Add an id field to PyInterpreterState.

2016-12-28 Thread Eric Snow
New submission from Eric Snow: Currently there isn't any way to uniquely identify an interpreter. This patch adds a new "id" field to the PyInterpreterState struct. The ID for every new interpreter is set to the value of an increasing global counter. That means that the ID i

[issue29102] Add an id field to PyInterpreterState.

2016-12-28 Thread Eric Snow
Eric Snow added the comment: Pointers can get re-used, so they aren't temporally unique. -- ___ Python tracker <http://bugs.python.org/issue29102> ___ ___

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Eric Snow
Eric Snow added the comment: Three reasons come to mind: 1. threads are identified by small integers 2. long, random-looking IDs are not human-friendly, and subinterpreter IDs will be used like thread IDs are 3. related to what Steve said, temporally unique IDs allow us to be confident about

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Eric Snow
Eric Snow added the comment: Interpreter states are in a linked list, so you can traverse the list to find one by ID. Exactly. At first I had added a PyInterpreterState_FindByID() or something like that. However, as you noted, I realized it wasn't necessary. :) WRT weakrefs, we can&

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Eric Snow
Eric Snow added the comment: > What do you think about resetting the counter back to 1 in Py_Initialize? Sounds good to me. When I was working on the patch I had the idea in the back of my mind that not resetting the counter would better support interpreter separation efforts in the fut

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Eric Snow
Eric Snow added the comment: Here's the updated patch. -- Added file: http://bugs.python.org/file46094/interpreter-id-2.diff ___ Python tracker <http://bugs.python.org/is

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread Eric Snow
Eric Snow added the comment: int_fast64_t it is then. :) I vacillated between the options and went with the bigger space. However, you're right that following convention is worth it. -- ___ Python tracker <http://bugs.python.org/is

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread Eric Snow
Eric Snow added the comment: I've updated the patch to address Nick's review. Thanks! -- Added file: http://bugs.python.org/file46100/interpreter-id-3.diff ___ Python tracker <http://bugs.python.o

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread Eric Snow
Eric Snow added the comment: Thanks for pointing that out, Victor. Given the precedent I switched to using int64_t. The patch actually uses PY_INT64_T, but I didn't see a reason to use int64_t directly. FWIW, there *are* a few places that use int_fast64_t, but they are rather specia

[issue29154] 5 failures in test_doctest: ModuleNotFoundError: No module named 'IPython'

2017-01-09 Thread Eric Snow
Eric Snow added the comment: There shouldn't be anything in CPython that depends on IPython. I'd recommend checking for $PYTHONSTARTUP, in site.py, and for .pth files in directories on sys.path. Also look for .py files in the current directory that are shadowing stdlib module

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Eric Snow
Eric Snow added the comment: This is strictly a problem for the system Python, right? In that case, can't the dist package clear __pycache__ under the system site-packages directory (and any other user-read-only dirs) during install of the updated Python? Is the concern that upgrading P

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-13 Thread Eric Snow
Eric Snow added the comment: > These files *do not* belong to the CPython package, they belong to the > individual Python modules that depend on CPython, so messing with them > when installing a new version of CPython would be a significant breach > of distro policies. Thanks fo

[issue27138] FileFinder.find_spec() docstring needs to be corrected.

2016-05-27 Thread Eric Snow
New submission from Eric Snow: Looks like we weren't careful when we added find_spec(). :) This issue is just to track the change. I'll push the fix shortly. -- assignee: eric.snow messages: 266506 nosy: brett.cannon, eric.snow priority: normal severity: normal stage: n

[issue27138] FileFinder.find_spec() docstring needs to be corrected.

2016-05-27 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue27147] importlib docs do not mention PEP 420

2016-05-28 Thread Eric Snow
New submission from Eric Snow: PEP 420 should be mentioned in the introduction section of the importlib docs. I'll push a change to fix this in a minute. -- assignee: eric.snow components: Documentation messages: 266565 nosy: brett.cannon, eric.snow priority: normal severity: n

[issue27147] importlib docs do not mention PEP 420

2016-05-28 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue24254] Make class definition namespace ordered by default

2016-06-02 Thread Eric Snow
Eric Snow added the comment: Thanks. Yeah, I wanted to keep the patches separate for the sake of code review. I'll fold the changes into a single commit once everything's ready. -- ___ Python tracker <http://bugs.python.o

[issue24254] Make class definition namespace ordered by default

2016-06-03 Thread Eric Snow
Eric Snow added the comment: Here's the full patch, including the addition of __definition_order__, tests, and docs. -- Added file: http://bugs.python.org/file43168/deforder.diff ___ Python tracker <http://bugs.python.org/is

<    17   18   19   20   21   22   23   24   25   26   >