Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue14660>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
While not in the initial list, _find_module() would be really handy. Perhaps
we could call it "get_loader" instead. "find_module" is a misleading name and
I don't see any parallel with imp.find_module
New submission from Eric Snow :
(see thread at
http://mail.python.org/pipermail/python-ideas/2012-April/014878.html)
This is a patch to add sys.implementation to Python (with doc addition). The
main motivation is to have an explicit place to look for the name and version
of the
Eric Snow added the comment:
@antoine - I wondered about that. In the end I got something up to start with.
The list of fields in sys.implementation may change over time, unlike
sys.version_info, et al. However, during interpreter execution, I would expect
that neither that list nor the
Eric Snow added the comment:
@Éric - that's a good point. I considered it for a little bit, but went with
the quick and easy think to get it rolling.
There is a real benefit to mandating an API sys.implementation.version.
importlib would use that version to calculate the tag to us
Eric Snow added the comment:
I'm going to write a PEP for this, after all. I want to make sure that it's
easy to access, in one place, these points that are coming up and their
resolutions.
--
___
Python tracker
<http://bu
Eric Snow added the comment:
Thanks for bringing this up, Martin.
sys.implementation is about having an implementation-specific location (hence
sys) to consolidate explicit values concerning the implementation. It's partly
about clarifying the run-time distinction between Pytho
Eric Snow added the comment:
An updated patch using a dict. (FYI, I have the PEP up on python-ideas.)
--
Added file: http://bugs.python.org/file25378/sys_implementation_2.diff
___
Python tracker
<http://bugs.python.org/issue14
Eric Snow added the comment:
from issue13959:
New changeset eb68502731dd by Brett Cannon in branch 'default':
Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py.
http://hg.python.org/cpython/rev/eb68502731dd
--
resolution: -> fixed
stage: -> committed
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue9260>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue14678>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Here's my take. No one will care about _frozen_importlib vs.
importlib._bootstrap normally, right? If __module__/__file__ says
_frozen_importlib, it's no big deal. The only time you care about the
distiction for importlib._bootstrap is when you
Eric Snow added the comment:
I'm +1 on Nick's recommendation.
@Antoine
> Ideally, we would want to test both versions, so that any oddity in
> the freezing mechanism gets exercised and diagnosed properly.
+1
Does this mean that the whole test suite should be run unde
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue14757>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue14764>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Question on this one:
@@ -126,7 +131,7 @@ def load_compiled(name, pathname, file=N
# XXX deprecate
def load_package(name, path):
if os.path.isdir(path):
-extensions = _bootstrap._SOURCE_SUFFIXES +
[_bootstrap._BYTECODE_SUFFIX]
+extensions
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue14797>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
...rather, the error caused by your example. :)
--
___
Python tracker
<http://bugs.python.org/issue14846>
___
___
Python-bugs-list m
Eric Snow added the comment:
The caching mechanism is going to check for changes in the directory. So the
recommendation is to clear the cache manually:
The default finders used by import now utilize a cache of what is contained
within a specific directory. If you create a Python source
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue11647>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
FYI, the attached patches don't reflect the latest PEP. I'll get an updated
patch up in the next day or two.
--
___
Python tracker
<http://bugs.python.o
Eric Pruitt added the comment:
There's documentation, but you have to switch to the Python 3k branch --
http://code.google.com/p/subprocdev/source/browse/?name=python3k#hg%2Fdoc.
As for the other criticisms, I'm sure there are plenty of things that need to
be improved upon; I was
Changes by Eric Snow :
Added file: http://bugs.python.org/file25712/issue14673_as_module.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file25713/issue14673_as_type.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file25714/issue14673_as_structseq.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file25715/issue14673_as_simple_namespace.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Eric Snow added the comment:
I've just attached 4 patches, one for each of the likeliest implementations.
All 4 ran the test suite successfully.
In my mind, the "simple namespace" one is the best fit. However, it involves
adding a new built-in type (though a private one).
Changes by Eric Snow :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Eric Snow added the comment:
Here's a stab at implementing -p/-P. There are a couple warnings that I'm not
sure about and I've undoubtedly missed some detail, but it should be pretty
close.
--
keywords: +patch
Added file: http://bugs.python.org/file25721/is
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25721/issue13475_1.diff
___
Python tracker
<http://bugs.python.org/issue13475>
___
___
Python-bugs-list m
Changes by Eric Snow :
Added file: http://bugs.python.org/file25722/issue13475_1.diff
___
Python tracker
<http://bugs.python.org/issue13475>
___
___
Python-bugs-list m
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25722/issue13475_1.diff
___
Python tracker
<http://bugs.python.org/issue13475>
___
___
Python-bugs-list m
Changes by Eric Snow :
Added file: http://bugs.python.org/file25723/issue13475_1.diff
___
Python tracker
<http://bugs.python.org/issue13475>
___
___
Python-bugs-list m
Changes by Eric Snow :
Added file: http://bugs.python.org/file25724/issue14673_as_module.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file25725/issue14673_as_type.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file25726/issue14673_as_structseq.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file25727/issue14673_as_simple_namespace.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25712/issue14673_as_module.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25713/issue14673_as_type.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25714/issue14673_as_structseq.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Pytho
Changes by Eric Snow :
Removed file:
http://bugs.python.org/file25715/issue14673_as_simple_namespace.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Changes by Eric Snow :
Added file: http://bugs.python.org/file25728/issue14673_docs_and_tests.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Pytho
Eric Snow added the comment:
I updated the patches so that (hopefully) the review link shows up. I've also
pulled out the doc/test diff into its own patch, since it was the same for all
of them.
--
___
Python tracker
<http://bugs.py
Eric Snow added the comment:
> Before this is assigned a short option form, I would like to ask
> whether anybody but experts will be able to make a proper use of this
> option.
Do you mean relative to a long form? And what would constitute improper use
for the option?
As Nick note
Eric Snow added the comment:
did you mean to change the title? this isn't about overriding sys.path, but
rather just about explicitly dictating the initialization of sys.path[0].
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Long options only would be fine with me. So "--path0" and "--nopath0"?
--
___
Python tracker
<http://bug
New submission from Eric Snow :
Nick Coghlan suggested[1] exploring an easier spelling for "type(name, (), {})"
in the C API. I've attached a patch that adds a function that does so:
_PyType_New(). It's "private" in the patch, but only because I am reticent to
Changes by Eric Snow :
--
components: +Interpreter Core
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue14942>
___
___
Python-bugs-lis
Eric Snow added the comment:
Presumably you mean something like this:
PyObject *
PyType_New(PyObject *name, PyObject *bases, PyObject *ns)
{
PyObject *type, *args, *newtype;
PyInterpreterState *interp = PyThreadState_GET()->interp;
PyObject *modules = interp->m
Eric Snow added the comment:
And unless there were some performance reason, I agree that the route I took in
the patch is overkill.
--
___
Python tracker
<http://bugs.python.org/issue14
Eric Snow added the comment:
Yeah, I'd meant that as an illustration of what I'd understood, rather than
some other proposal for the C API. types.new_class looks really handy. Thanks
for clarifying.
--
___
Python tracker
<http://bu
Eric Snow added the comment:
here's an updated patch with long options only. I'm only 95% confident about
my changes to getopt.c...there's probably a better way to do it. However, the
patch stands on its own two feet.
--
Added file: http://bugs.pytho
Eric Snow added the comment:
Thanks for taking the time for the review, Barry. Again, sorry I broke the
review link. It shouldn't be a problem any more.
> Barry A. Warsaw added the comment:
>
> I'm inclined to go with the as_simple_namespace patch. As you say,
> the
Changes by Eric Snow :
Added file: http://bugs.python.org/file25768/issue14673_docs_and_tests_2.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Pytho
Eric Snow added the comment:
> History with dictproxy means I'm also OK with "new type by stealth".
> Perhaps add some tests to check "type(sys.implementation)()" does
> something sane?
Test added. Here's what happens:
>>> cls = type(sys.imp
Eric Snow added the comment:
@Barry: FWIW, the kwds passed to namespace_init was NULL when no keyword
arguments were used. Easy enough to handle though.
--
___
Python tracker
<http://bugs.python.org/issue14
Eric Snow added the comment:
This patch incorporates types.SimpleNamespace and makes the repr show all
attributes. Tests and docs for types.SimpleNamespace are also included.
The patch skips 3 tests (which I added) that are failing. One has a segfault
due to a recursive repr (where I had a
Eric Snow added the comment:
Guess I should have tested the docs before posting the patch. ;)
--
Added file: http://bugs.python.org/file25780/issue14673_full.diff
___
Python tracker
<http://bugs.python.org/issue14
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25779/issue14673_full.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Eric Snow added the comment:
sorry, I should have been more clear. issue14673_full.diff is not simply a
merging of the two previous patches, but rather their merger, plus
SimpleNamespace, plus removing the "public" restriction from the repr. I may
have a small tweak or t
Eric Snow added the comment:
I'll get a new patch up tonight.
--
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bugs-list m
Eric Snow added the comment:
Applied all but one of the recommended changes. Thanks, Barry!
--
Added file: http://bugs.python.org/file25794/issue14673_full_2.diff
___
Python tracker
<http://bugs.python.org/issue14
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25794/issue14673_full_2.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Eric Snow added the comment:
this time against TIP.
--
Added file: http://bugs.python.org/file25795/issue14673_full_2.diff
___
Python tracker
<http://bugs.python.org/issue14
Eric Snow added the comment:
I've ironed out all 3 of my new tests that were still failing.
--
Added file: http://bugs.python.org/file25797/issue14673_full_3.diff
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
> - From the docs, I could not understand the difference between
> sys.implementation.version and sys.version_info. When can they differ?
I'll make an update. As an example, PyPy is at version 1.8 which implements
the Python 2.7 language. I
Changes by Eric Snow :
Added file: http://bugs.python.org/file25804/issue14673_full_4.diff
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bug
Eric Snow added the comment:
> Is full_4.diff the most up-to-date
> patch, and is it complete (i.e. contains all code, docs, and tests)?
Yep. :)
--
___
Python tracker
<http://bugs.python.org/i
Eric Snow added the comment:
presumably PEP 421 can be marked as final now?
--
___
Python tracker
<http://bugs.python.org/issue14673>
___
___
Python-bugs-list m
New submission from Eric Snow :
The type is available as types.SimpleNamespace, and there's no reason to hold
PyNamespace_New() back.
--
components: Library (Lib)
messages: 162322
nosy: amaury.forgeotdarc, eric.snow
priority: normal
severity: normal
stage: needs patch
status:
New submission from Eric Snow :
Currently types.SimpleNamespace does not support weak references. Amaury asked
for this in #14673, but I'd like to see more discussion. What are the use
cases for weak references in this case?
The type is a simple wrapper around dict, which does not su
Eric Snow added the comment:
That's good enough for me. :)
--
keywords: +patch
Added file: http://bugs.python.org/file25826/issue15004.diff
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Patch to make PyNamespace_New() public.
--
keywords: +patch
Added file: http://bugs.python.org/file25827/issue15003_public.diff
___
Python tracker
<http://bugs.python.org/issue15
Eric Snow added the comment:
I'll get a patch up tomorrow to make the type pickleable.
--
___
Python tracker
<http://bugs.python.org/issue15003>
___
___
Eric Snow added the comment:
I'll get to a pickle patch as soon as I can. I also need to add a doc addition
for PyNamespace_New() to the existing patch.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Yeah, imp.reload() is pure Python now (Lib/imp.py), a simple wrapper around
module.__loader__.load_module(), which does not make use of any import locks.
Having it do so, however, may not be feasible as I'd expect it to mean having
load_module() handl
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25827/issue15003_public.diff
___
Python tracker
<http://bugs.python.org/issue15003>
___
___
Python-bug
Eric Snow added the comment:
Where should the docs go for PyNamespace_New()? I looked at what's in
Doc/c-api/concrete.rst (concrete.html#other-objects), and each of them points
to its own page. Adding a new page for a single function seems a bit too much.
:) Would it be bad to put th
New submission from Eric Snow :
In issue 15003 Raymond recommended that types.SimpleNamespace be picklable.
I'll get a patch up as soon as I can to add this capability.
--
messages: 162453
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
Eric Snow added the comment:
I've opened issue 15022 for making SimpleNamespace picklable.
--
___
Python tracker
<http://bugs.python.org/issue15003>
___
___
Eric Snow added the comment:
I've attached a patch that gives types.SimpleNamespace pickle support. To do
it I had to change the name of the type from "namespace" to
"types.SimpleNamespace". That's fine.
I also added __eq__/__ne__ support
Changes by Eric Snow :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue15003>
___
___
Python-bugs-list mailing list
Un
Changes by Eric Snow :
--
stage: needs patch -> patch review
___
Python tracker
<http://bugs.python.org/issue15004>
___
___
Python-bugs-list mailing list
Un
Eric Snow added the comment:
> Is this documented in whatsnew?
I'm not sure what has been (none of my patches have done so).
> Also, I remember a discussion about making it public or not, but
> don’t recall a decision.
Amaury brought it up in msg162127. His point was that the
Eric Snow added the comment:
any chance on this for 3.3?
--
___
Python tracker
<http://bugs.python.org/issue13475>
___
___
Python-bugs-list mailing list
Unsub
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue15056>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
> I am not fully sure why -O is essentially required for running .pyo
> files: why not have the Python interpreter handle everything
> automatically based on the extension?
In part because it would take work to make it happen and apparently no one
feels
Eric Snow added the comment:
At the time it referred to generic functions (a la PEP 3124: Overloading,
Generic Functions, Interfaces, and Adaptation). However, ultimately it was
Abstract Base Classes (PEP 3119) that slid into this space.
--
nosy: +eric.snow
Eric Snow added the comment:
It's actually at the top of my list, but may still be a week or two until I can
get to it.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Here are the things I'm aware of:
* implement imp.get_tag() using sys.implementation
* *maybe* implement imp.get_magic() in pure Python (patch already attached here)
* (low priority) find a way to rip out the bulk of
PyImport_ExecCodeModuleObject() from imp.
Changes by Eric Snow :
Added file: http://bugs.python.org/file26058/issue13959_get_tag.diff
___
Python tracker
<http://bugs.python.org/issue13959>
___
___
Python-bug
Changes by Eric Snow :
--
resolution: -> duplicate
status: open -> closed
superseder: -> Expose dict_proxy internal type as types.MappingProxyType
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
Here's an updated patch to address the use of _PyNamespace_New() in changeset
77414:0011536f2a06.
--
Added file: http://bugs.python.org/file26119/issue15003_public.diff
___
Python tracker
<http://bugs.py
Changes by Eric Snow :
Removed file: http://bugs.python.org/file25853/issue15003_public.diff
___
Python tracker
<http://bugs.python.org/issue15003>
___
___
Python-bug
Eric Snow added the comment:
Brett meant the implementation would set it. You'd still expect it to not
change values during the execution of the interpreter. I suppose anyone could
change that value, but I'd see that more as a consenting adults
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue15168>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue1820>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue6021>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Good catch. However, do we need that comment? The tag is programmatically
derived from the version (in Python/sysmodule.c).
--
___
Python tracker
<http://bugs.python.org/issue15
New submission from Eric Snow :
There was some concern with PyImport_GetMagicTag() extracting its value from
sys.implementation.cache_tag. One solution is to have the two use a common
underlying value. However, that's basically what was already in import.c and
I'd rather minimize
2101 - 2200 of 6470 matches
Mail list logo