James Abbatiello added the comment:
Further investigation shows that MS asctime() doesn't like leap seconds
and causes an assertion when passing (2008, 12, 31, 23, 59, 60, 2, 366,
-1) -> 'Wed Dec 31 23:59:60 2008'.
Given that and since asctime() is such a simple function I t
James Abbatiello added the comment:
Since there's no good way to disable the assertion (see issue4804),
checking the validity of the argument beforehand looks like an option.
The checking that's currently being done in the strftime()
implementation looks useful but it is not en
James Abbatiello added the comment:
In what case(s) do you propose the output to be encoded in UTF-8? If
output is to a terminal and that terminal is set to Latin-1 or cp437 or
whatever then outputting UTF-8 in that case will only show garbage
characters to the user.
If output is to a file
James Abbatiello added the comment:
The --no-diffs option was recently added which looks like a good workaround.
Here's an attempt at a solution. If sys.stdout has an encoding set then
use that, just as is being done now. If there is no encoding (implying
"ascii") then use
New submission from James Abbatiello :
test_print_function_option is failing on Windows. Patch attached.
Output of failure:
C:>python test.py
test_all_project_files (lib2to3.tests.test_all_fixers.Test_all) ...
\2to3\lib2to3\refactor.py:194: DeprecationWarning: the
'print_function
New submission from James Abbatiello :
Start a process with os.popen() and then try to get its exit code by
closing the resulting file handle. The value returned is inconsistent
between 2.x and 3.x. Example:
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)] on win32
James Abbatiello added the comment:
Raymond, I've updated peephole.c to allow code to terminate with any of
RETURN_VALUE, END_FINALLY or RAISE_VARARGS [0-3]. I also added tests to
test_peepholer.py to make sure the peepholer still works in these
James Abbatiello added the comment:
I should add that the patch doesn't only address dead user-code. It
also eliminates code that the compiler generates itself but that would
be unreachable at runtime. Consider the following function:
def foo(x):
if x:
raise Something
else:
New submission from James Abbatiello :
Python currently emits bytecode for code that is unreachable (e.g.
following a return statement). This doesn't hurt anything but it takes
up space doing nothing.
This patch attempts to avoid generating any bytecode in this situation.
There's a
New submission from James Abbatiello :
The file Lib/test/doctest_aliases.py is used by test_doctest to check
the handling of duplicate removal. The "g = f" line in this file is one
indent too far to the right so instead of creating an alias for f called
g it is just unreachable code i
New submission from James Abbatiello :
test_winreg fails with:
==
ERROR: testLocalMachineRegistryWorks (test.test_winreg.WinregTests)
--
Traceback (most recent
New submission from James Abbatiello :
test_unittest fails on Windows with:
==
FAIL: test_find_tests_with_package (test.test_unittest.TestDiscovery
New submission from James Abbatiello :
test_float fails on Windows with:
==
FAIL: test_format_testfile (test.test_float.IEEEFormatTestCase)
--
Traceback (most
New submission from James Abbatiello :
regrtest.py test__locale fails with:
test__locale
test test__locale crashed -- : cannot
import name
RADIXCHAR
1 test failed:
test__locale
The attached patch backports the fix from issue5643
--
components: Tests, Windows
files
New submission from James Abbatiello :
The tests for 2to3 currently fail on Windows. Data is read from a file
in binary mode and then written to a temporary file in text mode which
doubles up the carriage returns.
Additionally, several files are missing the svn:eol-style property. The
15 matches
Mail list logo