[issue11065] Fatal can't locate locale errors when zip file with directories is on the PYTHONPATH.

2011-01-29 Thread Ned Batchelder
New submission from Ned Batchelder ned...@users.sourceforge.net: Run this shell script against 3.2, and it will fail. Against 3.1, it succeeds. I've been running tests on Ubuntu 10.10. mkdir -p sub cat sub/modzip.py END_PY j = 1 END_PY zip zipmod.zip sub/modzip.py PYTHONPATH=zipmod.zip

[issue11065] Fatal can't locate locale errors when zip file with directories is on the PYTHONPATH.

2011-01-29 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: With help from ned_deily in #python-dev, we confirmed this is a dup of http://bugs.python.org/issue10955, and is already fixed. -- resolution: - duplicate ___ Python tracker rep

[issue231540] threads and profiler don't work together

2010-07-23 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: Isn't this problem solved by the threading.settrace and threading.setprofile functions? -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue231540

[issue9332] Document requirements for os.symlink usage on Windows

2010-08-01 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: This breaks virtualenv3 on Python 3.2, which simply test for the existence of os.symlink, which then fails for lack of privileges. Perhaps an os.can_symlink() method, returning a boolean? It can request privileges if you like

[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder
New submission from Ned Batchelder ned...@users.sourceforge.net: 2.6.4 had been working fine for me. Today, though, it will not stay up. I run the Django development server on Windows 7, and 2.6.4 is repeatedly crashing on me: This application has requested the Runtime to terminate

[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: I got it from python.org, the .msi Windows installer: 03/02/10 05:27:37p 14,890,496 \kit\python-2.6.4.msi -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: I tried rebooting my PC, but the problem persists. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8101

[issue8101] w32-shared-ptr.c assertion on Windows 7 with 2.6.4

2010-03-09 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: Yup, you're both right! I had a C extension (for coverage.py) built for 2.5 in the 2.6 path. Sorry for the false alarm. -- status: open - closed ___ Python tracker rep

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Ned Batchelder
New submission from Ned Batchelder [EMAIL PROTECTED]: When tracing line execution with sys.settrace, a particular code structure fails to report an executed line. The line is a continue statement after an if condition in which the if condition is true every time it is executed. Attached

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: I see that the cause of the problem is the peephole optimizer. That doesn't mean this isn't a problem. I am measuring the code coverage of a set of tests, and one of my lines is being marked as not executed. This is not the fault

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-29 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: I recognize that this is an unusual case, but it did come up in the real world. I found this while measuring test coverage, and the continue line was marked as not executed, when it was. I don't understand when the peepholer is moved, so

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-03-30 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: Raymond, do you have a cannon-less recommendation of how to kill this particular mosquito? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2506

[issue2516] Instance methods are misreporting the number of arguments

2008-03-30 Thread Ned Batchelder
Changes by Ned Batchelder [EMAIL PROTECTED]: -- nosy: +nedbat __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2516 __ ___ Python-bugs-list mailing list Unsubscribe

[issue2506] Line tracing of continue after always-taken if is incorrect

2008-04-01 Thread Ned Batchelder
Ned Batchelder [EMAIL PROTECTED] added the comment: It's hard for me to agree with your assessment that for no practical good would come from disabling the optimizer. Broadly speaking, there are two types of code execution: the vast majority of the time, you execute the code so that it can do

[issue6359] pyexpat.c calls trace function incorrectly for exceptions

2009-06-28 Thread Ned Batchelder
New submission from Ned Batchelder ned...@users.sourceforge.net: Pyexpat.c calls the tracing function explicitly (not sure why). When it intercepts an exception, it calls the function with PyTrace_EXCEPTION, but then leaves the scope without calling PyTrace_RETURN. This is incorrect

[issue6954] DISTUTILS_DEBUG causes stack trace, really simple fix

2009-09-20 Thread Ned Batchelder
New submission from Ned Batchelder ned...@users.sourceforge.net: If you set the environment variable DISTUTILS_DEBUG=1, distutils will run with DEBUG, which will trace internal activity. But one of the traces is incorrect, and leads to this stack trace: Traceback (most recent call last

[issue6954] DISTUTILS_DEBUG causes stack trace, really simple fix

2009-09-20 Thread Ned Batchelder
Ned Batchelder ned...@users.sourceforge.net added the comment: Another one: Traceback (most recent call last): File setup.py, line 72, in module **addl_args File c:\python31\lib\distutils\core.py, line 149, in setup dist.run_commands() File c:\python31\lib\distutils\dist.py, line

[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-24 Thread Ned Batchelder
Changes by Ned Batchelder ned...@users.sourceforge.net: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11846 ___ ___ Python-bugs

[issue11992] sys.settrace doesn't disable tracing if a local trace function returns None

2011-05-03 Thread Ned Batchelder
New submission from Ned Batchelder ned...@users.sourceforge.net: The docs say: The trace function is invoked (with event set to 'call') whenever a new local scope is entered; it should return a reference to a local trace function to be used that scope, or None if the scope shouldn’t

[issue11992] sys.settrace doesn't disable tracing if a local trace function returns None

2011-05-03 Thread Ned Batchelder
Changes by Ned Batchelder ned...@users.sourceforge.net: -- assignee: - nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11992 ___ ___ Python

[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-04 Thread Ned Batchelder
New submission from Ned Batchelder n...@nedbatchelder.com: The docs for os.lseek don't make any mention of its return value. I believe it's the new offset in the file, but I'm not sure if there are other subtleties to be mentioned. -- assignee: docs@python components: Documentation

[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-07 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13548 ___ ___ Python-bugs-list

[issue14373] C implementation of functools.lru_cache

2012-12-20 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: -nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2012-12-30 Thread Ned Batchelder
New submission from Ned Batchelder: If I register an atexit handler, and then call os.execv, the handler is not invoked before my process changes over to the new program. Shouldn't it be? My program is ending, so my atexit handlers should be invoked. This is based on this coverage.py bug

[issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor

2012-12-31 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16653 ___ ___ Python-bugs-list

[issue17009] Thread Programming With Python should be removed

2013-01-21 Thread Ned Batchelder
New submission from Ned Batchelder: Sorry if this is the wrong bug tracker for this issue. Someone just asked in #python what they should do about the fact that Python has no threads on the Mac. When asked why they thought that, they pointed to this: http://www.python.org/doc/essays

[issue17351] Fixed python3 descriptor documentation example + removal of explicit object inheritance in docs

2013-03-09 Thread Ned Batchelder
Ned Batchelder added the comment: Why is it important to remove subclassing object? Isn't it still good form to mention object as a base class. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17351

[issue12397] re match object methods have no docstrings

2011-06-24 Thread Ned Batchelder
New submission from Ned Batchelder n...@nedbatchelder.com: If I have a match object in hand, and ask for help on its methods, there is no information: m = re.match(a, a) help(m.group) Help on built-in function group: group(...) -- messages: 138937 nosy: nedbat priority: normal

[issue11561] coverage of Python regrtest cannot see initial import of libs

2011-08-21 Thread Ned Batchelder
Ned Batchelder n...@nedbatchelder.com added the comment: The tip of the coverage.py repo (https://bitbucket.org/ned/coveragepy) has a new implementation of the encodings hack which seems to work well. Of course, an option to run a module before anything else in the interpreter would make

[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Ned Batchelder
Ned Batchelder n...@nedbatchelder.com added the comment: The difficulty that coverage faces is not measuring python programs started from the command line like this, you can use coverage run myprog.py or python -m coverage run myprog.py. The difficulty is when there are subprocesses running

[issue15256] Typo in error message

2012-07-05 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15256 ___ ___ Python-bugs-list

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-07-29 Thread Ned Batchelder
Ned Batchelder added the comment: I'm -0.5 myself, though, for the reason that it complicates the startup process a little bit more, without looking very compelling. It smells disturbingly like LD_PRELOAD to me. Antoine, do you have a suggestion for how to solve the coverage.py problem

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-07-29 Thread Ned Batchelder
Ned Batchelder added the comment: Chris: The real problem is that it isn't the test suite that spawns the processes, the tests invoke product code, and the product code spawns Python. So modifying the Python-spawning really means modifying the product code to do something different under

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-07-29 Thread Ned Batchelder
Ned Batchelder added the comment: Chris, I'm not sure how to answer your questions. The more powerful and flexible, the better. There is no must here. I'm looking for a way to avoid the hacks coverage.py has used in the past to measure coverage in subprocesses. A language feature

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-07-31 Thread Ned Batchelder
Ned Batchelder added the comment: I agree with Antoine: I don't see why this should be a feature of virtualenvs. It's easy to use environment variables in a tightly-controlled way. We don't worry that any of the other environment variables that affect Python execution will somehow escape

[issue15541] logging.exception doesn't accept 'extra'

2012-08-02 Thread Ned Batchelder
New submission from Ned Batchelder: The logging.exception method differs from .debug(), .info(), .warning(), .error() and .critical() in that it does not accept an `extra` keyword argument. There seems to be no reason for this. The docs are misleading about this. They say, The arguments

[issue14405] Some Other Resources in the sidebar are hopelessly out of date

2012-03-25 Thread Ned Batchelder
New submission from Ned Batchelder n...@nedbatchelder.com: The Other Resources section lists these resources: Guido's Essays: out of date, the first is about 2.2, by the fifth, we're into Python 1.5. New-style Classes: this means new as of 2.2, and the linked page begins, Unfortunately, new

[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14803 ___ ___ Python-bugs-list

[issue19184] dis module has incorrect docs for RAISE_VARARGS

2013-10-06 Thread Ned Batchelder
New submission from Ned Batchelder: The order of values on the stack is backwards for RAISE_VARARGS. The docs say: Raises an exception. argc indicates the number of parameters to the raise statement, ranging from 0 to 3. The handler will find the traceback as TOS2, the parameter as TOS1

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-27 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17546 ___ ___ Python-bugs-list

[issue11205] Evaluation order of dictionary display is different from reference manual.

2013-03-28 Thread Ned Batchelder
Ned Batchelder added the comment: Since this is documented in the Python Language Reference, it doesn't make much sense to have it describe one way for 3.3 and another for 3.4, does it? By definition, doesn't that make this an implementation dependency? We should update the docs to say

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-28 Thread Ned Batchelder
Ned Batchelder added the comment: Changing the type of the locals() return isn't the right way to solve this problem. Better docs is the way to do it. If someone is calling locals(), they should read the docs. Examining the type of values is discouraged in Python, we shouldn't expect

[issue17546] Document the circumstances where the locals() dict gets updated

2013-03-30 Thread Ned Batchelder
Ned Batchelder added the comment: I would say it something like this: The dictionary returned by locals() is an accurate snapshot of the local namespace at the time it is called. After the call returns, changes to one may or may not be reflected in the other. The dictionary may change

[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-13 Thread Ned Batchelder
New submission from Ned Batchelder: I just pulled down the tip of CPython, built it, and ran the tests, and got this failure: ``` == FAIL: test_compute_rollover_weekly_attime (test.test_logging.TimedRotatingFileHandlerTest

[issue17718] boolop constant checking for if/while

2013-04-13 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17718 ___ ___ Python-bugs-list

[issue17799] settrace docs are wrong about c_call events

2013-04-19 Thread Ned Batchelder
New submission from Ned Batchelder: Looking into this Stack Overflow question: http://stackoverflow.com/questions/16115027/pythons-sys-settrace-wont-create-c-call-events Reading the code in c_eval.c and friends, it looks like c_call events are never passed to the trace function, only

[issue6359] pyexpat.c calls trace function incorrectly for exceptions

2013-04-20 Thread Ned Batchelder
Ned Batchelder added the comment: Attached a patch which simply removes the code that invokes the trace function. -- keywords: +patch Added file: http://bugs.python.org/file29951/6539.patch ___ Python tracker rep...@bugs.python.org http

[issue17894] Edits to descriptor howto

2013-05-02 Thread Ned Batchelder
New submission from Ned Batchelder: I find the explanations in the Descriptor howto to be difficult to understand. I took a stab at changing the first few sections to introduce the concepts in an easier-to-grasp style. Issue 12077 also covers a little bit of this. -- assignee: docs

[issue17898] gettext bug while parsing plural-forms metadata

2013-05-03 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17898 ___ ___ Python-bugs-list

[issue12077] Harmonizing descriptor protocol documentation

2013-05-03 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12077 ___ ___ Python-bugs-list

[issue17894] Edits to descriptor howto

2013-05-04 Thread Ned Batchelder
Ned Batchelder added the comment: I worked with Ezio to make a new patch with the full edits. I have other ideas for edits to the rest of the document, but we can discuss those if you like these... -- Added file: http://bugs.python.org/file30127/descriptor_howto_2.patch

[issue17894] Edits to descriptor howto

2013-05-04 Thread Ned Batchelder
Ned Batchelder added the comment: Raymond, I'm glad you're on top of this. I would have thought the howto should be the easy on-ramp, and deeper authoritative details should go in the reference section. -- ___ Python tracker rep...@bugs.python.org

[issue17914] add os.cpu_count()

2013-05-06 Thread Ned Batchelder
Ned Batchelder added the comment: If you can't determine the number of CPUs, return a clear can't determine value, such as 0 or -1. Returning 1 will hide information, and it's an easy default for the caller to apply if they want to. -- nosy: +nedbat

[issue17914] add os.cpu_count()

2013-05-06 Thread Ned Batchelder
Ned Batchelder added the comment: Seriously, return zero, and I can use it as: cpu_count = os.cpu_count() or 1 Why throw away information? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914

[issue17914] add os.cpu_count()

2013-05-11 Thread Ned Batchelder
Ned Batchelder added the comment: A few small points: Use `num is None` instead of `num == None`. Use `isinstance(cpus, int)` rather than `type(cpus) is int`. And this I think will throw an exception in Python 3: `cpus = 1 or cpus == None`, because you can't compare None to 1

[issue17914] add os.cpu_count()

2013-05-11 Thread Ned Batchelder
Ned Batchelder added the comment: @Yogesh: if cpus is None, then this will raise an exception in Python 3: `cpus = 1 or cpus == None` Perhaps you don't have enough test cases yet. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue17914] add os.cpu_count()

2013-05-13 Thread Ned Batchelder
Ned Batchelder added the comment: Python's goal is not to emulate the suboptimal parts of other languages. We have dynamic typing, and so can return None from the same function that returns 1. And we have compact expressions like `cpu_count() or 1`, so we don't have to make unfortunate

[issue17982] Syntax Error in IDLE3 not in IDLE

2013-05-15 Thread Ned Batchelder
Ned Batchelder added the comment: Python 3 has no print statement, it has a print function, so you need: print(Hello, world!) -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17982

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031 ___ ___ Python-bugs-list

[issue18111] Add a default argument to min max

2013-06-03 Thread Ned Batchelder
Ned Batchelder added the comment: I find the workarounds mentioned here to be baroque and confusing. The concept of a default value to return in the case of an empty iterator is straightforward. I'm +1 on adding this as well. -- nosy: +nedbat

[issue18245] In itertools.groupby() make data plural

2013-06-17 Thread Ned Batchelder
Ned Batchelder added the comment: Please don't make this change. Data is used as a singular collective noun, especially in software contexts. Data as a plural noun sounds archaic, or at best, scientific. -- nosy: +nedbat ___ Python tracker rep

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-06 Thread Ned Batchelder
New submission from Ned Batchelder: When tokenizing with tokenize.generate_tokens, if the code ends with whitespace (no newline), the tokenizer produces an ERRORTOKEN for each space. Additionally, the regex that fails to find tokens in those spaces is linear in the number of spaces, so

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-06 Thread Ned Batchelder
Ned Batchelder added the comment: Here's a patch for 3.3. I would like to also fix 2.7... -- keywords: +patch Added file: http://bugs.python.org/file27459/bug16152.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16152

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-06 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: Removed file: http://bugs.python.org/file27459/bug16152.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16152

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-06 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: Added file: http://bugs.python.org/file27466/bug16152_v33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16152

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-06 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: Added file: http://bugs.python.org/file27467/bug16152_v27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16152

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-06 Thread Ned Batchelder
Ned Batchelder added the comment: Updated with new (better) patch, for v2.7 and v3.3. They are the same except for the test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16152

[issue16152] Trailing whitespace makes tokenize.generate_tokens pathological

2012-10-09 Thread Ned Batchelder
Ned Batchelder added the comment: Jesús, done! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16152 ___ ___ Python-bugs-list mailing list

[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-04 Thread Ned Batchelder
New submission from Ned Batchelder: Examining the CPython sources, there are a number of places where PyLong_FromLong is used without checking its return value. In places where it is done correctly, PyErr_Occurred is often used to avoid having to check every call. Here are places where

[issue6359] pyexpat.c calls trace function incorrectly for exceptions

2012-11-09 Thread Ned Batchelder
Ned Batchelder added the comment: I have no idea why pyexpat.c invokes the trace function in the first place. Unless someone can explain why it does that when no other C extension does, my inclination would be to make it stop calling the trace function at all, not to fix how it calls

[issue7083] locals() behaviour differs when tracing is in effect

2012-11-13 Thread Ned Batchelder
Ned Batchelder added the comment: ITSM this could use more clarification. It is subtle and baffling. I'm struggling to come up with sentences to make it clearer, though. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http

[issue7083] locals() behaviour differs when tracing is in effect

2012-11-14 Thread Ned Batchelder
Ned Batchelder added the comment: I wrote about this here: http://nedbatchelder.com/blog/201211/tricky_locals.html A reader suggested this addition to the docs, which I like: Multiple invocations within the scope update and return the same dictionary instance. When a trace function

[issue16571] Iterating over inconsistently-indented code block causes execution of code only on last iteration of loop

2012-11-28 Thread Ned Batchelder
Ned Batchelder added the comment: @Brian: Your code doesn't run in Python 2.7 as you've shown it, it produces an IndentationError. If your code is actually different, and does run, try running it with the -tt flag on Python, which will warn about inconsistent indentation. -- nosy

[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2013-11-15 Thread Ned Batchelder
New submission from Ned Batchelder: In 2.7, set comprehensions are compiled to code objects expecting an argument named .0. This convention is also used for the unnamed arguments needed by tuple arguments. inspect.getcallargs understands the tuple argument case, but not the set

[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2013-11-15 Thread Ned Batchelder
Ned Batchelder added the comment: BTW: I don't hold any illusions that this bug is important enough to fix, but I would be interested in hearing ideas about how I could work around it... -- ___ Python tracker rep...@bugs.python.org http

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Ned Batchelder
Ned Batchelder added the comment: There are other forms of numbers allowed by Python that are not allowed by JSON: 001.1 Oddly, with all of the strictness in JSON, the exponent-marker e can be upper- or lower-case: 1e1 and 1E1 are both valid JSON. -- nosy: +nedbat

[issue16669] Docstrings for namedtuple

2013-12-08 Thread Ned Batchelder
Ned Batchelder added the comment: I'll add my voice to those asking for a way to put docstrings on namedtuples. As it is, namedtuples get automatic docstrings that seem to me to be almost worse than none. Sphinx produces this: ``` class Key Key(scope, user_id, block_scope_id

[issue19931] namedtuple docstrings are verbose for no added benefit

2013-12-08 Thread Ned Batchelder
New submission from Ned Batchelder: When I make a namedtuple, I get automatic docstrings that use a lot of words to say very little. Sphinx autodoc produces this: ``` class Key Key(scope, user_id, block_scope_id, field_name) __getnewargs__() Return self as a plain tuple

[issue19950] Document that unittest.TestCase.__init__ is called once per test

2013-12-10 Thread Ned Batchelder
Ned Batchelder added the comment: This sentence seems to cover it: Each instance of the TestCase will only be used to run a single test method, so a new fixture is created for each test. from http://docs.python.org/2/library/unittest.html The word fixture here is being used oddly, but that's

[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-18 Thread Ned Batchelder
Ned Batchelder added the comment: Although the OP was incorrect about 1 being guaranteed to be True, it is still better documentation to use True rather than 1 for a boolean argument. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http

[issue2506] Add mechanism to disable optimizations

2014-05-19 Thread Ned Batchelder
Ned Batchelder added the comment: Raymond, thanks for keeping us honest! I am still hoping to convince people that this is a good idea. I think Guido's +1 (https://mail.python.org/pipermail/python-dev/2012-December/123099.html) should help in that regard. Part of your reason for today's

[issue2506] Add mechanism to disable optimizations

2014-05-21 Thread Ned Batchelder
Ned Batchelder added the comment: Python-Ideas thread started: https://mail.python.org/pipermail/python-ideas/2014-May/027893.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506

[issue2506] Add mechanism to disable optimizations

2014-05-22 Thread Ned Batchelder
Ned Batchelder added the comment: I thought we were discussing this on Python-Ideas? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506

[issue21625] help()'s more-mode is frustrating

2014-06-01 Thread Ned Batchelder
New submission from Ned Batchelder: From the #python IRC channel: ``` [07:55:29] tonysar hello.new to programming and python, i use mac terminal but problem i have is , when i use help function of python to look up something , i lose my prompt and i have no idea how to go back , what i

[issue21625] help()'s more-mode is frustrating

2014-06-01 Thread Ned Batchelder
Ned Batchelder added the comment: Thanks, this is a very complete explanation of the machinery behind the scenes. I think we would do beginners a service if we made the behavior a bit less obscure. Are there ways that we could (for example) have the prompt say END (q to quit) instead

[issue21625] help()'s more-mode is frustrating

2014-06-02 Thread Ned Batchelder
Ned Batchelder added the comment: Serhiy, thanks for the configuration tip. But you seem to be missing my point, which is that beginners need the default to be a little more friendly. I don't want to make it bad for experienced users, of course. I doubt Unix users will be confused

[issue22022] test_pathlib: shutil.rmtree() sporadic failures on Windows

2014-07-21 Thread Ned Batchelder
Ned Batchelder added the comment: FWIW, every use of rmtree I have on Windows occasionally fails this way, parallelism seems not to be a factor. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22022

[issue22785] range docstring is less useful than in python 2

2014-11-02 Thread Ned Batchelder
New submission from Ned Batchelder: The Python 3.4 docstring for range is: {{{ | range(stop) - range object | range(start, stop[, step]) - range object | | Return a virtual sequence of numbers from start to stop by step. }}} In Python 2.7, it said: {{{ range(stop) - list of integers

[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2014-12-27 Thread Ned Batchelder
Ned Batchelder added the comment: This bug just bit me. Changing # coding: utf8 to # coding: utf-8 works around it. -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20844

[issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows

2014-12-27 Thread Ned Batchelder
Ned Batchelder added the comment: (oops: with Python 3.4.1 on Windows) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20844 ___ ___ Python-bugs

[issue22785] range docstring is less useful than in python 2

2015-04-21 Thread Ned Batchelder
Ned Batchelder added the comment: (By the time I got to the source, the word virtual had been removed...) Attached is a patch to make the help read: | range(stop) - range object | range(start, stop[, step]) - range object | | Return an object that produces a sequence of integers from

[issue24452] Make webbrowser support Chrome on Mac OS/X

2015-06-14 Thread Ned Batchelder
New submission from Ned Batchelder: This doesn't work on Python 3.4 on a Mac with Yosemite and Chrome installed: import webbrowser webbrowser.get(chrome) This patch makes it work: ``` *** /usr/local/pythonz/pythons/CPython-3.4.1/lib/python3.4/webbrowser.py 2014-09-21 16:37:46.0

[issue24632] Improve documentation about __main__.py

2015-07-14 Thread Ned Batchelder
Ned Batchelder added the comment: BTW, the Stack Overflow answer: http://stackoverflow.com/a/4043007 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24632

[issue25486] Resurrect inspect.getargspec() in 3.6

2015-10-26 Thread Ned Batchelder
Changes by Ned Batchelder <n...@nedbatchelder.com>: -- nosy: +nedbat ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25486> ___ _

[issue20438] inspect: Deprecate getfullargspec?

2015-10-26 Thread Ned Batchelder
Ned Batchelder added the comment: This is the situation I am in: coverage.py uses getargspec in a very simple way in its tooling. I support 2.7 and 3.5, so I have to do this: try: getargspec = inspect.getfullargspec except AttributeError: getargspec

[issue20438] inspect: Deprecate getfullargspec?

2015-10-25 Thread Ned Batchelder
Ned Batchelder added the comment: I'm confused: the discussion here is mostly about updating docs to note deprecation. Then at the very end, is an off-hand remark about removing getargspec. The docs for getargspec currently read, "This function will be removed in Python 3.6." Why

[issue25392] setup.py --quiet doesn't silence "no previously-included directories" warnings from MANIFEST.in

2015-10-13 Thread Ned Batchelder
Ned Batchelder added the comment: You are right that "develop" is from setuptools. The same messages appear with "sdist": $ python setup.py --quiet sdist no previously-included directories found matching 'doc/_build' no previously-included directories found ma

[issue25392] setup.py --quiet doesn't silence "no previously-included directories" warnings from MANIFEST.in

2015-10-13 Thread Ned Batchelder
New submission from Ned Batchelder: The MANIFEST.in file for coverage.py excludes directories line doc/_build. If I run "python setup.py --quiet develop", I get output like this: python3.5 setup.py --quiet develop no previously-included directories found matching '

[issue25260] python -m test --coverage doesn't work on Windows

2015-09-28 Thread Ned Batchelder
Ned Batchelder added the comment: What version of coverage.py is this? -- nosy: +nedbat ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue23619] Python 3.5.0a2 installer fails on Windows

2015-12-25 Thread Ned Batchelder
Ned Batchelder added the comment: I tried to install 3.5.1 32-bit into a fresh virtualbox image from https://dev.windows.com/en-us/microsoft-edge/tools/vms/mac/ (IE 10 on Win 7), and got this same error message. Python will not run, it only shows

  1   2   3   4   >