Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12450
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
I see the problems as:
1. Given Python's other overhead, we'd need to profile to show an improvement
in the speed of this conversion would make a noticeable impact on any import
workload.
2. If we want to keep the shortest-float-repr
Eric V. Smith e...@trueblade.com added the comment:
Do you have a python code snippet which triggers this?
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12468
Eric V. Smith e...@trueblade.com added the comment:
But what if you don't want the expansion done? I always invoke python from
cygwin's bash shell, and sometimes I tell the shell not to expand the
arguments, such as:
python \*
or
python '*'
I wouldn't want python (or rather the C runtime
Eric V. Smith e...@trueblade.com added the comment:
Both of them work under cygwin. My point is that neither would work if the C
runtime expanded command line arguments.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12505
Eric V. Smith e...@trueblade.com added the comment:
I'm not suggesting they use cygwin. I'm saying that if they do use cygwin that
something they currently do would stop working. There would be no way to pass a
command line parameter of * to python, at least without adding more escaping
(hard
Eric V. Smith e...@trueblade.com added the comment:
I dont't know. But what difference does it make, after all?
I just want to make sure it's something that happens automatically and wouldn't
require a change to python's C code.
To the other point, someone who currently uses:
python
Eric V. Smith e...@trueblade.com added the comment:
Don't call both start() and run(). From the documentation, start() arranges for
run() to be called. After the call to start(), 'abc' is printed.
--
components: +Extension Modules -Build
nosy: +eric.smith
resolution: - invalid
status
Eric V. Smith e...@trueblade.com added the comment:
\x00 is used as a flag internally meaning use the default fill character.
That's clearly a bug. I'll look at fixing it.
I think there are other places in the built in __format__ functions where
special values are used instead of flags. I'll
Eric V. Smith e...@trueblade.com added the comment:
Patch looks good at first glance. I'll review it some more today and commit it.
Thanks!
--
stage: needs patch - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Eric V. Smith e...@trueblade.com:
--
assignee: - eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12579
___
___
Python-bugs
Eric V. Smith e...@trueblade.com added the comment:
If you want to look at this, I think there's a missing check for args being
non-null in string_format.h, line 515.
I'd have to think to see if there are other possible failure scenarios.
Thanks for the report
Eric V. Smith e...@trueblade.com added the comment:
Actually that's probably not the place to catch it. Let me look at it closer.
Of course, patches welcome!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12579
Eric V. Smith e...@trueblade.com added the comment:
I think KeyError for {foo}.format(12) is correct. It's looking up foo in
the empty dict of **kwargs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12579
Eric V. Smith e...@trueblade.com added the comment:
I think the issue is that it should be an error in any string used for
format_map() to have a positional argument. So the right thing to do is detect
this case in get_field_object (index != -1 and args is NULL). So I think a new
test near
Eric V. Smith e...@trueblade.com added the comment:
Changing the title to reflect the real problem.
You get a SystemError even when using a mapping, if you have a format string
with positional arguments:
'{}'.format_map({'a':0})
Traceback (most recent call last):
File stdin, line 1
Eric V. Smith e...@trueblade.com added the comment:
I definitely agree it should be a ValueError.
How about including in your patch adding your name to Misc/ACKS, if it isn't
already there? I don't have your full name.
I might play with the exception wording and add a few more comments
Eric V. Smith e...@trueblade.com added the comment:
I finally got around to reviewing the patch. A couple of comments:
1. There should be some tests for str.__format__, not just str.format. This is
really a bug with str.__format__, after all. I can add those.
2. The bigger issue
Eric V. Smith e...@trueblade.com added the comment:
On 8/17/2011 6:30 AM, Ezio Melotti wrote:
OK, so in 2.7/3.2 I'll put them in unicodeobject.c, and in 3.3 I'll move them
in unicodeobject.c.
I believe the second file should be unicodeobject.h, correct
Eric V. Smith e...@trueblade.com added the comment:
See also issue 12191, where there was a brief discussion of this.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13033
Eric V. Smith e...@trueblade.com added the comment:
Thanks for the report. Fixed in 9a9bd05b9fca.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13079
Eric V. Smith e...@trueblade.com added the comment:
Can you post some example code?
I would not expect disconnecting the network cable to close any TCP
connections, unless you are transmitting data and/or you have keepalives turned
on.
--
nosy: +eric.smith
Eric V. Smith e...@trueblade.com added the comment:
Assuming that you're unplugging the cable when the code is in the loop that
occurs after the line self.pcPart.write(cmdx), and also assuming that you
haven't turned on keepalives, then the behavior you see is expected.
You're just waiting
New submission from Eric V. Smith e...@trueblade.com:
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 e...@trueblade.com 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 rep
Eric V. Smith e...@trueblade.com 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 rep...@bugs.python.org
Eric V. Smith e...@trueblade.com added the comment:
Clean up code in test_pkgutil once this issue is fixed. See issue 14817.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14715
Eric V. Smith e...@trueblade.com 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
Eric V. Smith e...@trueblade.com added the comment:
Also for use in test_pkgutil.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14715
Eric V. Smith e...@trueblade.com 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
Eric V. Smith e...@trueblade.com 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
Eric V. Smith e...@trueblade.com 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
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14846
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
I'll look at it when I'm done with PEP 420.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12014
Eric V. Smith e...@trueblade.com 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 rep...@bugs.python.org
http
New submission from Eric V. Smith e...@trueblade.com:
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
severity: normal
stage
Eric V. Smith e...@trueblade.com 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 rep...@bugs.python.org
http
Eric V. Smith e...@trueblade.com added the comment:
See also test_namespace_pkgs.py ZipWithMissingDirectory.test_missing_directory
which is currently marked as expectedFailure.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14928
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
I don't think this is related to PEP 420. Adding Brett.
--
nosy: +brett.cannon, eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14982
Eric V. Smith e...@trueblade.com added the comment:
Is there a reason manual is None, True, or False? Wouldn't just True or False
suffice?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13598
Eric V. Smith e...@trueblade.com 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 rep...@bugs.python.org
http://bugs.python.org/issue13598
Changes by Eric V. Smith e...@trueblade.com:
--
assignee: - eric.smith
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15039
Eric V. Smith e...@trueblade.com 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
codec. Maybe the error
Eric V. Smith e...@trueblade.com 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
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15205
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com 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 produce a similar message
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15294
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
The patch looks good to me. I haven't run the tests, though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15294
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15502
___
___
Python-bugs-list
Eric V. Smith added the comment:
I think the cache invalidation should be moved to the sys.meta_path level.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15502
Eric V. Smith e...@trueblade.com added the comment:
This is working as defined in PEP 3101: it calls PySequence_GetItem() or
PyObject_GetItem() on the value inside the brackets. There is indeed no item in
d that is the string 0 (including the quotes).
--
assignee: - eric.smith
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14019
___
___
Python-bugs-list
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14057
___
___
Python-bugs-list
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14123
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
I can't reproduce this. Can you please post the entire traceback? It would be
preferable if you could also show the exact code that's causing the problem,
typed from a python command prompt (see my example below).
I can reproduce the error
Eric V. Smith e...@trueblade.com added the comment:
I'm going to close this. Feel free to re-open it if you can give a small
example showing the problem.
--
resolution: - invalid
status: open - closed
type: crash - behavior
___
Python tracker rep
Eric V. Smith e...@trueblade.com added the comment:
I don't think it's worth checking that you've passed in the correct type for
the default parameter. That's not something that Python code typically does.
The error you get:
AttributeError: 'tuple' object has no attribute 'append'
seem pretty
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14243
___
___
Python-bugs-list
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2377
___
___
Python-bugs-list
New submission from Eric V. Smith e...@trueblade.com:
Presumably this needs to use requires_zlib.
$ time ./python -m test test_logging
[1/1] test_logging
test test_logging crashed -- Traceback (most recent call last):
File /home/eric/local/python/cpython/Lib/test/regrtest.py, line 1229
Changes by Eric V. Smith e...@trueblade.com:
--
title: regex.finditer() doesn't accept keyword arguments - re.finditer()
doesn't accept keyword arguments
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14259
Changes by Eric V. Smith e...@trueblade.com:
--
title: regex.groupindex available for modification and continues to work,
having incorrect data inside it - re.groupindex available for modification and
continues to work, having incorrect data inside
Changes by Eric V. Smith e...@trueblade.com:
--
assignee: - eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14256
___
___
Python-bugs
Changes by Eric V. Smith e...@trueblade.com:
--
stage: - patch review
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14256
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14331
___
___
Python-bugs-list
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14339
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
I agree with David. It's a bug. I have programs (not using argparse yet) that
do exactly what he describes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13922
Eric V. Smith e...@trueblade.com added the comment:
No. parse_known_args assumes you have known and unknown args intermixed.
Going back to the original example, what if hack and :target had
overlapping parameter names (say, they both supported --arg1)? I think
parse_known_args would pick up
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14425
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
Can we change this to a documentation bug? I was unaware of the use of '-', and
I think most other people are, too.
Although having just checked, it doesn't work under Windows :(. So maybe we
shouldn't document it.
Thinking out loud: I've
Eric V. Smith e...@trueblade.com added the comment:
Heh. You're correct about 3173. And I'm even nosy on that issue!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14441
Eric V. Smith e...@trueblade.com added the comment:
While I still think raising those errors is a good thing, we should also look
at Nick's shell-command:
http://shell-command.readthedocs.org/en/latest/index.html
--
___
Python tracker rep
Eric V. Smith e...@trueblade.com added the comment:
See also issue 14243.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14514
Eric V. Smith e...@trueblade.com added the comment:
list.reverse() does not reverse a list, it reverses its current values.
help([].reverse)
Help on built-in function reverse:
reverse(...)
L.reverse() -- reverse *IN PLACE*
--
nosy: +eric.smith
resolution: - invalid
stage
Eric V. Smith e...@trueblade.com added the comment:
Thanks, Mark.
Indeed, my answer as written is meaningless. I meant it doesn't sort in
reverse, it just reverses.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14542
Eric V. Smith e...@trueblade.com added the comment:
In what way is it different?
Does it cause a problem, or is it compatible but different?
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14639
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14642
___
___
Python-bugs-list
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14657
___
___
Python-bugs-list
New submission from Eric V. Smith e...@trueblade.com:
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 e...@trueblade.com 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 rep
Eric V. Smith e...@trueblade.com 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
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14605
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com 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__
Eric V. Smith e...@trueblade.com 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 code path. It's
Eric V. Smith e...@trueblade.com 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: - invalid
status
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14678
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com 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: - test needed
Eric V. Smith e...@trueblade.com 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, 016x)
'0144'
And with either format() or str.format
New submission from Eric V. Smith e...@trueblade.com:
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
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14716
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com 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?
--
nosy: +eric.smith
Eric V. Smith e...@trueblade.com 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 same value
Eric V. Smith e...@trueblade.com added the comment:
If bool_new() is going to use 'p', then my suggestion shouldn't be the only
test of 'p'.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14705
Eric V. Smith e...@trueblade.com 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, dict
Eric V. Smith added the comment:
Your patch looks like the output of hg help, or similar.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18514
Eric V. Smith added the comment:
For some reason the blank link in the Coverity report confused me. Yes,
swapping the lines looks right.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18514
Eric V. Smith added the comment:
bool instances are immutable, so all value.toggle() could do is the same as
not value. That is, return a new bool with the toggled value.
--
nosy: +eric.smith
resolution: - invalid
status: open - closed
___
Python
Eric V. Smith added the comment:
Since it would be the same as not value, I can't imagine this would be added
to the language.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18537
Eric V. Smith added the comment:
If that's your concern, you can use operator.not_.
import operator
filter(operator.not_, [False, True, False, False, True])
[False, False, False]
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
101 - 200 of 2689 matches
Mail list logo