[issue12450] Use the Grisu algorithms to convert floats to strings

2011-06-30 Thread Eric V. Smith
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

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-06-30 Thread Eric V. Smith
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

[issue12468] longjmp causes uninitialized stack frame

2011-07-01 Thread Eric V. Smith
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

[issue12505] python interpreter not handle wildards properly

2011-07-06 Thread Eric V. Smith
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

[issue12505] python interpreter not handle wildards properly

2011-07-06 Thread Eric V. Smith
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

[issue12505] python interpreter not handle wildards properly

2011-07-06 Thread Eric V. Smith
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

[issue12505] python interpreter not handle wildards properly

2011-07-06 Thread Eric V. Smith
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

[issue12525] Unable to run a thread

2011-07-10 Thread Eric V. Smith
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

[issue12546] str.format cannot fill with \x00 char

2011-07-13 Thread Eric V. Smith
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

[issue12546] str.format cannot fill with \x00 char

2011-07-13 Thread Eric V. Smith
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

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12579 ___ ___ Python-bugs

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Eric V. Smith
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

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Eric V. Smith
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

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Eric V. Smith
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

[issue12579] str.format_map raises a SystemError for non-mapping

2011-07-17 Thread Eric V. Smith
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

[issue12579] str.format_map raises a SystemError for format strings with positional arguments

2011-07-17 Thread Eric V. Smith
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

[issue12579] str.format_map raises a SystemError for format strings with positional arguments

2011-07-17 Thread Eric V. Smith
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

[issue12546] builtin __format__ methods cannot fill with \x00 char

2011-07-19 Thread Eric V. Smith
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

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2011-08-17 Thread Eric V. Smith
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

[issue13033] recursive chown for shutils

2011-09-23 Thread Eric V. Smith
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

[issue13079] Wrong datetime format in PEP3101

2011-09-30 Thread Eric V. Smith
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

[issue13109] telnetlib insensitive to connection loss

2011-10-05 Thread Eric V. Smith
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

[issue13109] telnetlib insensitive to connection loss

2011-10-06 Thread Eric V. 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

[issue14817] pkgutil.extend_path has no tests

2012-05-15 Thread Eric V. Smith
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

[issue14817] pkgutil.extend_path has no tests

2012-05-15 Thread Eric V. Smith
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

[issue14817] pkgutil.extend_path has no tests

2012-05-15 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-15 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-16 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-17 Thread Eric V. Smith
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

[issue14846] Change in error when sys.path contains a nonexistent folder (importlib)

2012-05-17 Thread Eric V. Smith
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

[issue12014] str.format parses replacement field incorrectly

2012-05-19 Thread Eric V. Smith
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

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-05-24 Thread Eric V. Smith
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

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-05-24 Thread Eric V. Smith
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

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-05-24 Thread Eric V. Smith
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

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-05-25 Thread Eric V. Smith
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

[issue14928] Fix importlib bootstrapping issues

2012-05-27 Thread Eric V. Smith
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

[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Eric V. Smith
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

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-08 Thread Eric V. Smith
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

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-08 Thread Eric V. Smith
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

[issue15039] module/ found before module.py when both are in the CWD

2012-06-08 Thread Eric V. Smith
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

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Eric V. Smith
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

[issue15190] Allow whitespace and comments after line continuation character \

2012-06-26 Thread Eric V. Smith
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

[issue15205] distutils dereferences symlinks on Mac OS X but not on Linux

2012-06-27 Thread Eric V. Smith
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

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-06-29 Thread Eric V. Smith
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

[issue15294] regression with nested namespace packages

2012-07-08 Thread Eric V. Smith
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

[issue15294] regression with nested namespace packages

2012-07-08 Thread Eric V. Smith
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

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-07-30 Thread Eric V. Smith
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

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-02 Thread Eric V. Smith
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

[issue13971] format() doesn't parse str.

2012-02-08 Thread Eric V. Smith
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

[issue14019] Unify tests for str.format and string.Formatter

2012-02-15 Thread Eric V. 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

[issue14057] Speedup sysconfig startup

2012-02-19 Thread Eric V. Smith
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

[issue14123] Doc change re old and new string formatting

2012-02-25 Thread Eric V. Smith
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

[issue14145] string.rfind() returns AttributeError: 'list' object has no attribute 'rfind'

2012-02-28 Thread Eric V. Smith
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

[issue14145] string.rfind() returns AttributeError: 'list' object has no attribute 'rfind'

2012-02-28 Thread Eric V. Smith
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

[issue14233] argparse: append action fails to override default values

2012-03-08 Thread Eric V. Smith
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

[issue14243] NamedTemporaryFile usability request

2012-03-09 Thread Eric V. Smith
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

[issue2377] Replace __import__ w/ importlib.__import__

2012-03-11 Thread Eric V. Smith
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

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Eric V. Smith
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

[issue14259] re.finditer() doesn't accept keyword arguments

2012-03-11 Thread Eric V. Smith
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

[issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it

2012-03-11 Thread Eric V. Smith
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

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14256 ___ ___ Python-bugs

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14256

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-15 Thread Eric V. Smith
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

[issue14339] Optimizing bin, oct and hex

2012-03-16 Thread Eric V. Smith
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

[issue13922] argparse handling multiple -- in args improperly

2012-03-18 Thread Eric V. Smith
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

[issue13922] argparse handling multiple -- in args improperly

2012-03-18 Thread Eric V. Smith
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

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread Eric V. Smith
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

[issue14441] Add new date/time directives to strftime()

2012-03-29 Thread Eric V. Smith
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

[issue14441] Add new date/time directives to strftime()

2012-03-29 Thread Eric V. Smith
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

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-03-31 Thread Eric V. Smith
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

[issue14514] Equivalent to tempfile.NamedTemporaryFile that deletes file at context exit

2012-04-05 Thread Eric V. Smith
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

[issue14542] reverse() doesn't reverse sort correctly

2012-04-10 Thread Eric V. Smith
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

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Eric V. Smith
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

[issue14639] Different behavior for urllib2 in Python 2.7

2012-04-20 Thread Eric V. Smith
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

[issue14642] Fix importlib.h build rule to not depend on hg

2012-04-22 Thread Eric V. Smith
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

[issue14657] Avoid two importlib copies

2012-04-23 Thread Eric V. Smith
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

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
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

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
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

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
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

[issue14605] Make import machinery explicit

2012-04-24 Thread Eric V. Smith
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

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Eric V. Smith
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__

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-25 Thread Eric V. Smith
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

[issue14677] Python 2.6 Printing Error

2012-04-26 Thread Eric V. Smith
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

[issue14678] Update zipimport to support importlib.invalidate_caches()

2012-04-26 Thread Eric V. Smith
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

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-30 Thread Eric V. Smith
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

[issue14694] Option to show leading zeros for bin/hex/oct

2012-05-01 Thread Eric V. Smith
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

[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2012-05-03 Thread Eric V. Smith
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

[issue14716] Use unicode_writer API for str.format()

2012-05-03 Thread Eric V. Smith
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

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-04 Thread Eric V. Smith
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

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-04 Thread Eric V. 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

[issue14705] Add 'bool' format character to PyArg_ParseTuple*

2012-05-04 Thread Eric V. Smith
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

[issue14723] Misleading error message for str.format()

2012-05-04 Thread Eric V. Smith
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

[issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj()

2013-07-21 Thread Eric V. Smith
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

[issue18514] Unreachable Py_DECREF() in ctypes's PyCData_FromBaseObj()

2013-07-21 Thread Eric V. Smith
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

[issue18537] bool.toggle()

2013-07-23 Thread Eric V. Smith
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

[issue18537] bool.toggle()

2013-07-23 Thread Eric V. Smith
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

[issue18537] bool.toggle()

2013-07-23 Thread Eric V. Smith
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

<    1   2   3   4   5   6   7   8   9   10   >