Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue14657>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric V. Smith :
I have created a branch features/pep-420 where I'll be developing a proof of
concept implementation of PEP 420.
I've checked in a basic version, but it has these issues:
- We need to decide how finders communicate that they've found part
Eric V. Smith added the comment:
Right, that's a typo. I meant load_module(). I'm currently working on
implementing the loader for namespace modules, so my comment about the loader
is premature.
--
___
Python tracker
<http://bu
Eric V. Smith added the comment:
I created the NamespaceLoader in the feature branch. It has a load_module, but
it's only ever called by the code in PathFinder.load_module:
loader = NamespaceLoader(namespace_path)
return loader.load_module(ful
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue14605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I'd really prefer something like:
return load_ns_module(fullname, namespace_path)
The point being that load_module() as defined in PEP 302 will never be called
on NamespaceLoader. The loader only needs to exist to set module.__loader__,
and load_m
Eric V. Smith added the comment:
Ah. I didn't realize that reload called load_module. I'll back out the change I
just made, then.
My point was that the original call to load_module isn't made through the
normal "a finder returned me a loader, so I'll call it"
Eric V. Smith added the comment:
The "s" causes the argument to be converted to a string, then the formatting is
applied. So it's working as designed.
This is the logical equivalent of:
'%8.8s' % str(101.)
--
nosy: +eric.smith
resolution: -> in
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue14678>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I've modified zipimport to support namespace packages, and checked it in to the
feature branch. This completes all of the functionality I think needs to be
added. Next up is adding tests.
--
stage: -> tes
Eric V. Smith added the comment:
I agree with Mark.
This can also be done slightly more efficiently with plain format():
>>> format(324, "016b")
'000101000100'
>>> format(324, "016o")
'0504'
>>> format(324,
New submission from Eric V. Smith :
DirsOnSysPath doesn't clear sys.path_importer_cache, so it seems you'd always
want to use import_state, which does clear it.
We might also want to modify import_state to remember the original objects, not
just their values. DirsOnSysPath does do
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue14716>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
The patch looks good to me.
Are there any places in the current code base that would use "P"? "p" seems the
more useful case.
Are you planning on changing existing code to use P or p, or just use it going
forward?
Eric V. Smith added the comment:
Now that I think about this some more, I think I'd structure the 'p' tests as:
for expr in [False, None, True, 1, 0]: # add the rest
self.assertEqual(bool(expr), getargs_p(expr))
Since the salient point is that 'p' returns the sa
Eric V. Smith added the comment:
If bool_new() is going to use 'p', then my suggestion shouldn't be the only
test of 'p'.
--
___
Python tracker
<http:
Eric V. Smith added the comment:
This is a duplicate of issue 13790. See the comments there for why it works
this way.
--
nosy: +eric.smith
resolution: -> duplicate
status: open -> closed
superseder: -> In str.format an incorrect error message for list, tuple, d
New submission from Eric V. Smith :
Subject says it all.
There are also no tests of .pkg files.
--
components: Tests
keywords: easy
messages: 160751
nosy: eric.smith
priority: normal
severity: normal
status: open
title: pkgutil.extend_path has no tests
Eric V. Smith added the comment:
I'm going to leave this open until better tests are added. The one I did add it
very simple, but it's good enough for the changes I'm about to make.
--
nosy: -python-dev
___
Python tracker
<http
Eric V. Smith added the comment:
This code does not clean up correctly. It needs to remove the added modules in
sys.modules. I'll eventually clean it up, once issue 14715 is addressed.
--
___
Python tracker
<http://bugs.python.org/is
Eric V. Smith added the comment:
Clean up code in test_pkgutil once this issue is fixed. See issue 14817.
--
___
Python tracker
<http://bugs.python.org/issue14
Eric V. Smith added the comment:
Here's what I imagine the new function will look like. I propose moving it to
test.support and using it outside of importlib, specifically for the PEP 420
tests.
--
keywords: +patch
Added file: http://bugs.python.org/file25614/issue14715-0
Eric V. Smith added the comment:
Also for use in test_pkgutil.
--
___
Python tracker
<http://bugs.python.org/issue14715>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
Actually, I was planning on resetting everything, but I haven't gotten that to
work yet. I can't figure out why (but I will!).
With the current patch, where things are not reset, the only test I had to
change was test_path_importer_cache_empty_st
Eric V. Smith added the comment:
The current tests don't like setting sys.modules to [].
I like resetting everything (including sys.modules) back to the original state.
Otherwise some tests, which do things like "import foo", affect later tests.
So, I think I'll leave t
Eric V. Smith added the comment:
I understand about sys.modules. Maybe I'll create another context manager (say,
sys_modules_state) that does the same for sys.modules. I can always stack them
together.
When loading pure-Python namespace packages, I want to make sure they get
removed b
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue14846>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I'll look at it when I'm done with PEP 420.
--
___
Python tracker
<http://bugs.python.org/issue12014>
___
___
Python-b
Eric V. Smith added the comment:
I'm closing this issue. I'll open new issues as needed.
--
resolution: -> fixed
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs
New submission from Eric V. Smith :
If a zip file contains "pkg/foo.py" but no "pkg/" entry, it will not be
possible for "pkg" to be a namespace package portion.
--
components: Extension Modules
messages: 161543
nosy: eric.smith
priority: normal
sever
Eric V. Smith added the comment:
For a (very) brief discussion on the strategy to implement this, see:
http://mail.python.org/pipermail/import-sig/2012-May/000528.html
--
___
Python tracker
<http://bugs.python.org/issue14
Eric V. Smith added the comment:
See also test_namespace_pkgs.py ZipWithMissingDirectory.test_missing_directory
which is currently marked as expectedFailure.
--
___
Python tracker
<http://bugs.python.org/issue14
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue14928>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I don't think this is related to PEP 420. Adding Brett.
--
nosy: +brett.cannon, eric.smith
___
Python tracker
<http://bugs.python.org/is
Eric V. Smith added the comment:
Is there a reason "manual" is None, True, or False? Wouldn't just True or False
suffice?
--
___
Python tracker
<http://bugs.pyt
Eric V. Smith added the comment:
Yes, I guess that's so. I'll have to add a comment, as at first glance it just
looks like a bug. Thanks!
--
___
Python tracker
<http://bugs.python.o
Changes by Eric V. Smith :
--
assignee: -> eric.smith
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue15039>
___
___
Python-bugs-list mai
Eric V. Smith added the comment:
Could you reproduce this in a short script that doesn't use sqlite? I'm looking
for something like:
str = 'some-string'
"{0}".format(str)
Also: is that the entire traceback? I don't see how format could be invoking a
Eric V. Smith added the comment:
This would be a big change. Please bring it up on the python-ideas mailing list
for discussion first. If it is approved there, we can re-open this issue.
You'll need to present your use-case: Why this would be an improvement to
Python? What would it allo
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue15205>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Serhiy: I'm not sure what you're saying. At the point that str.format() is
producing its error message, it doesn't know as much as %-formatting does about
the original arguments, so it can't produ
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue15294>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
The patch looks good to me. I haven't run the tests, though.
--
___
Python tracker
<http://bugs.python.org/issue15294>
___
___
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue15502>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I think the cache invalidation should be moved to the sys.meta_path level.
--
___
Python tracker
<http://bugs.python.org/issue15
Eric V. Smith added the comment:
While the classmethod version has some appeal, it doesn't extend well to
handling multiple exception types.
I'm -0 on this, in any event. I think the original code is more clear. Why
force people to learn (or recognize) a second idiom for something
Eric V. Smith added the comment:
I agree with Bryan. Further, if the string is being interpreted as Tcl, then
this strikes me as a possible injection attack vector (although I'll admit to
not having looked at the code to see how the Tcl code is being used and/or
interpreted).
--
Eric V. Smith added the comment:
The case with 1.__format__ is confusing the parser. It sees:
__format__
which is indeed a syntax error.
Try:
>>> 1 .__format__(u'n')
'1'
or:
>>> (1).__format__(u'n')
'1'
Eric V. Smith added the comment:
I believe the conversion is happening in Objects/abstract.c in PyObject_Format,
around line 864, near this comment:
/* Convert to unicode, if needed. Required if spec is unicode
and result is str */
I think changing the docs will result in more
Changes by Eric V. Smith :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue15039>
___
___
Python-bugs-list
Eric V. Smith added the comment:
I was just logging in to make this point, but Serhiy beat me to it. When I
wrote several years ago that this was "easy", it was before the (awesome) PEP
393 work. I suspect, but have not verified, that having a bytes version of this
code would now
Eric V. Smith added the comment:
> The implementation may be difficult, therefore no one should attempt it?
The development cost and maintenance cost is surely part of the evaluation when
deciding whether to implement a feature, no?
--
___
Pyt
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue16131>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
As this is a feature request, it can only be applied to 3.4. I've modified the
versions.
--
components: +Library (Lib)
nosy: +eric.smith
versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue20927>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
In the first example, you switch from "./app" to "app.exe" when using
shell=True.
What happens to any of your examples if you add ".exe" without shell=True?
Popen eventually calls CreateProcess on Windows. From:
http://msdn.micro
Eric V. Smith added the comment:
Assuming this is the problem, we should at least document this. It does make
cross-platform coding difficult.
--
___
Python tracker
<http://bugs.python.org/issue20
Eric V. Smith added the comment:
The 2.x documentation says generate_tokens returns a 5-tuple, not a namedtuple:
http://docs.python.org/2/library/tokenize.html
"The generator produces 5-tuples with these members: ..."
The section you quote is talking about tokenize.tokenize, and I
Eric V. Smith added the comment:
Where is plink.exe? If it's not in cwd (c:\python33\workspace), note that the
documentation for cwd says:
"If cwd is not None, the function changes the working directory to cwd before
executing the child. In particular, the function looks for executab
Eric V. Smith added the comment:
I think the 2.7 documentation is correct: the current directory when the call
is made, and not cwd, is included in the search path. I'd suggest specifying
args as ["c:\\python33\\workspace\\plink.exe"].
I think I may have mislead you earlier on
Eric V. Smith added the comment:
The underlying APIs are very different. It's debatable how much of a shim we
should provide to make all platforms look alike.
I think first we should understand what it currently takes to make something
work in both environments. Then we can talk about h
Eric V. Smith added the comment:
I think the best we could do is have None.__format__ be:
def __format__(self, fmt):
return str(self).__format__(fmt)
Or its logical equivalent.
But this seems more like papering over a bug, instead of actually fixing a
problem. My suggestion is to use
Eric V. Smith added the comment:
We don't always provide fully cross-platform functionality (see the os module
for many examples), but we might be able to do better here. It might be some
functionality we can add, it might be a documentation issue.
Note, for example
Eric V. Smith added the comment:
Or:
"{:{:s}{:d}s}".format(str(self.pcs), self.format_align, self.max_length)
You're trying to apply the string format specifier (the stuff after the first
colon through the final "s", as expanded) to an object that's not always
Eric V. Smith added the comment:
David is correct.
It's often easiest to think about the builtin format() instead of str.format().
Notice below that the format specifier has to make sense for the object being
formatted:
>>> import datetime
>>> now = datetime.dat
Eric V. Smith added the comment:
BreamoreBoy:
This is basically the definition of object.__format__:
def __format__(self, specifier):
if len(specifier) == 0:
return str(self)
raise TypeError('non-empty format string passed to object.__format__')
Which is why it works fo
Eric V. Smith added the comment:
This bug tracker is for reporting bugs in python. For questions on using
python, please use the python-list mailing list:
https://mail.python.org/mailman/listinfo/python-list
--
nosy: +eric.smith
resolution: -> invalid
stage: -> committed/re
New submission from Eric V. Smith:
This bug tracker is for reporting bugs in python. For questions on using
python, please use the python-list mailing list:
https://mail.python.org/mailman/listinfo/python-list
--
nosy: +eric.smith
resolution: -> rejected
stage: -> committed/re
Eric V. Smith added the comment:
Makes sense to me.
--
___
Python tracker
<http://bugs.python.org/issue21097>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/issue12546>
___
___
Python-bug
Eric V. Smith added the comment:
An empty format specifier can (and to my knowledge, does) match str(). So you
get:
>>> format(1e10, '')
'100.0'
>>> format(1e10, 'g')
'1e+10'
>>> str(1e10)
'100.0'
Eric V. Smith added the comment:
The rule is:
- if the entire format specifier is the empty string (not None, but ''), then
return str(value)
- else, look at the presentation type. if it is missing, set it to something
like 'g'
- do the normal float formatting using the pr
Changes by Eric V. Smith :
--
assignee: eric.smith -> docs@python
nosy: +docs@python
___
Python tracker
<http://bugs.python.org/issue7951>
___
___
Python-
Eric V. Smith added the comment:
Fixed. Thanks!
--
nosy: +eric.smith
resolution: fixed ->
stage: committed/rejected ->
status: closed -> open
___
Python tracker
<http://bugs.python.or
Changes by Eric V. Smith :
--
type: enhancement -> behavior
versions: +Python 2.7, Python 3.4
___
Python tracker
<http://bugs.python.org/issue12546>
___
___
Py
Eric V. Smith added the comment:
Fixed in 2.7, 3.4, 3.5.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eric V. Smith :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eric V. Smith :
--
versions: +Python 3.5 -Python 3.4
___
Python tracker
<http://bugs.python.org/issue13598>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
After discussing this with Mark at the sprints, I'm going to close this.
If someone comes up with a concrete proposal on python-ideas, we can revisit
it. But as it is, there's not enough here to go on.
There are a sufficient number of ideas and al
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue21199>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/issue9334>
___
___
Python-bug
Changes by Eric V. Smith :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eric V. Smith :
--
versions: +Python 3.5 -Python 3.4
___
Python tracker
<http://bugs.python.org/issue8931>
___
___
Python-bugs-list mailing list
Unsub
Changes by Eric V. Smith :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue8931>
___
___
Python-bugs-list
Eric V. Smith added the comment:
In addition, you probably want "\\server\path\to" to be a raw string, too. That
way, the backslashes are not given special meaning. Notice the difference in
output between these two:
>>> "\\server\path\to".strip(r'"\'
Eric V. Smith added the comment:
Why are you passing None, and what would you expect the result to be?
The function is documented as taking a string.
--
nosy: +eric.smith
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issu
Eric V. Smith added the comment:
I'm going to close this as "not a bug". Feel free to reopen it if there's use
case for passing in None.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
Eric V. Smith added the comment:
I agree with Raymond: this isn't a practical problem worth solving. If it's
causing an actual problem, please re-open this issue and give a use case.
Thanks.
--
nosy: +eric.smith
resolution: -> wont fix
status: o
Changes by Eric V. Smith :
--
nosy: +eric.smith, ncoghlan, pmoody
___
Python tracker
<http://bugs.python.org/issue21386>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
Can you provide a working example? How are you calling execute()? What are
__signal and __signalList set to?
Note that the default of "None" for cmd can't ever work, due to calling
re.match ("\s", cmd).
---
New submission from Eric V. Smith:
If you meant to supply a patch, it is missing. And in any event, you need to
describe the issue.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue21
Eric V. Smith added the comment:
I'd like to help with this, but unless you can provide a script I can run that
shows the problem, I can't. I don't have the time to figure out what parameters
I need to pass in to cause the
Eric V. Smith added the comment:
Wouldn't it be better to switch uses of abspath to be os.path.abspath? os.path
is used elsewhere in the file, after all.
Brett added "from os.path import abspath" in
http://hg.python.org/cpython/rev/686e5d38be42 but I think that import should
Changes by Eric V. Smith :
--
stage: -> patch review
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue21391>
___
___
Python-bugs-list
Eric V. Smith added the comment:
I disagree. It took me longer than I'd like to admit to track down the file
history and understand it. I'd like to prevent other people from having to try
and understand why it works this way.
On the other hand, it looks like people have discovered
Eric V. Smith added the comment:
The issue is about tests for str.format and string.Formatter, but in
http://bugs.python.org/msg194709 and the associated patch there are tests for
the formatter module to increase its coverage.
I suggested on the mentorship list that we break this into two
Eric V. Smith added the comment:
Can you describe what command you ran and what you saw at the "executing with
python-3.4.0 make the execution stop" step?
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.o
Eric V. Smith added the comment:
That's working as designed. It allows you to say "-fo" if both 'f' and 'o' are
short options.
--
nosy: +eric.smith
___
Python tracker
Changes by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: enhancement -> behavior
___
Python tracker
<http://bugs.python
Changes by Eric V. Smith :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue21516>
___
___
Python-bugs-list mailing list
Unsubscrib
2101 - 2200 of 2699 matches
Mail list logo