[issue16549] regression: -m json.tool module is broken

2013-12-08 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

Somehow these errors do not occur today. Maybe they were side effects of other 
failures in test_json. Closing for now.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2013-12-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This doesn't look related to json tests. Are there other tests failures with 
similar symptoms (_assert_python is None)?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

No other tests fail in this way.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2013-11-30 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

2 tests fail (only on 2.7 branch) when `make test` runs test suite the second 
time:

==
ERROR: test_infile_outfile (json.tests.test_tool.TestTool)
--
Traceback (most recent call last):
  File 
/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/json/tests/test_tool.py,
 line 64, in test_infile_outfile
rc, out, err = assert_python_ok('-m', 'json.tool', infile, outfile)
  File 
/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/test/script_helper.py,
 line 55, in assert_python_ok
return _assert_python(True, *args, **env_vars)
TypeError: 'NoneType' object is not callable

==
ERROR: test_infile_stdout (json.tests.test_tool.TestTool)
--
Traceback (most recent call last):
  File 
/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/json/tests/test_tool.py,
 line 57, in test_infile_stdout
rc, out, err = assert_python_ok('-m', 'json.tool', infile)
  File 
/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/test/script_helper.py,
 line 55, in assert_python_ok
return _assert_python(True, *args, **env_vars)
TypeError: 'NoneType' object is not callable

==

--
nosy: +Arfrever
resolution: fixed - 
stage: committed/rejected - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-29 Thread anatoly techtonik

anatoly techtonik added the comment:

+1

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 08e5973fdc7e by Ezio Melotti in branch '2.7':
#16549: Add tests for json.tools.  Initial patch by Berker Peksag and Serhiy 
Storchaka.
http://hg.python.org/cpython/rev/08e5973fdc7e

New changeset 44c544809e6c by Ezio Melotti in branch '3.2':
#16549: Make json.tool work again on Python 3 and add tests.  Initial patch by 
Berker Peksag and Serhiy Storchaka.
http://hg.python.org/cpython/rev/44c544809e6c

New changeset 1e2ae5e01963 by Ezio Melotti in branch '3.3':
#16549: merge with 3.2.
http://hg.python.org/cpython/rev/1e2ae5e01963

New changeset cdeca27b32e5 by Ezio Melotti in branch 'default':
#16549: merge with 3.3.
http://hg.python.org/cpython/rev/cdeca27b32e5

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-28 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patches!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4102c1a02417 by Ezio Melotti in branch '2.7':
#16549: fix test failures on Windows.
http://hg.python.org/cpython/rev/4102c1a02417

New changeset 4ec9f0b0f8f1 by Ezio Melotti in branch '3.2':
#16549: fix test failures on Windows.
http://hg.python.org/cpython/rev/4ec9f0b0f8f1

New changeset e26345437f9f by Ezio Melotti in branch '3.3':
#16549: merge with 3.2.
http://hg.python.org/cpython/rev/e26345437f9f

New changeset 2a73d9e64d34 by Ezio Melotti in branch 'default':
#16549: merge with 3.3.
http://hg.python.org/cpython/rev/2a73d9e64d34

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-27 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
assignee: ezio.melotti - 
nosy: +jcea
stage: patch review - needs patch
versions: +Python 3.1 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-26 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
assignee:  - ezio.melotti
stage: needs patch - patch review
versions: +Python 3.4 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a simple patch.

--
keywords: +patch
nosy: +serhiy.storchaka
versions: +Python 3.4 -Python 3.1
Added file: http://bugs.python.org/file28113/json_tool_open.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
assignee:  - ezio.melotti
nosy: +ezio.melotti
stage: needs patch - test needed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Berker Peksag

Berker Peksag added the comment:

Lib/json/tool.py is triggering a ResourceWarning.

Patch attached with a test.

--
nosy: +berker.peksag
Added file: http://bugs.python.org/file28114/issue16549.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests added. They fail until issue16333 will be resolved.

--
Added file: http://bugs.python.org/file28115/json_tool_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___diff -r aac6b313ef5f Lib/test/json_tests/test_tool.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/Lib/test/json_tests/test_tool.py  Sun Nov 25 17:03:12 2012 +0200
@@ -0,0 +1,53 @@
+import os
+import textwrap
+import unittest
+from test import support
+from test.script_helper import assert_python_ok
+from test.support import TESTFN
+
+class TestTool(unittest.TestCase):
+data = 
+
+[[blorpie],[ whoops ] , [
+ ],\td-shtaeou,\rd-nthiouh,
+i-vhbjkhnth, {nifty:87}, {morefield :\tfalse,field
+:yes}  ]
+   
+
+expect = textwrap.dedent(\
+[
+[
+blorpie
+],
+[
+whoops
+],
+[],
+d-shtaeou,
+d-nthiouh,
+i-vhbjkhnth,
+{
+nifty: 87
+},
+{
+field: yes,
+morefield: false
+}
+]
+)
+
+def test_tool(self):
+infile = support.TESTFN
+with open(infile, w) as fp:
+self.addCleanup(os.remove, infile)
+fp.write(self.data)
+rc, out, err = assert_python_ok('-m', 'json.tool', infile)
+self.assertEqual(out, self.expect.encode())
+self.assertEqual(err, b'')
+outfile = support.TESTFN + '.out'
+rc, out, err = assert_python_ok('-m', 'json.tool', infile, outfile)
+self.addCleanup(os.remove, outfile)
+with open(outfile, r) as fp:
+self.assertEqual(fp.read(), self.expect)
+self.assertEqual(out, b'')
+self.assertEqual(err, b'')
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oops. This issue becomes very popular.

--
dependencies: +Trailing whitespace in json dump when using indent
stage: test needed - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Berker and me wrote the different tests. I were add a separate test file 
because json.tool should not be tested for both C and Python implementation and 
because json tests already splitted on many files. Berker tests using json.tool 
as a filter. Both tests should be merged. Of course, using a `with` for open 
files is a good idea.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a merged tests.

--
Added file: http://bugs.python.org/file28123/json_tool_tests_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-24 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
components: +Library (Lib)
title: regression: -m json.tool module - regression: -m json.tool module is 
broken

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16549] regression: -m json.tool module is broken

2012-11-24 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
keywords: +easy
stage:  - needs patch
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16549
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com