Build failure
seqizz opened this issue · 6 comments
Hi again,
Trying to build for python3.8 failed with following error:
Test the basic workings of `VersionInfo`. ... ok
test_python_toolbox.test_version_info.test_version_text ... ok
test_python_toolbox.test_zip_tools.test_zip_folder.test ... /build/source/source_py3/test_python_toolbox/test_zip_tools/test_zip_folder.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/build/tmp965k7xua/folder_to_zip/some_file.txt' mode='w' encoding='UTF-8'>
(folder_to_zip / 'some_file.txt').open('w').write('hello there!')
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/build/source/source_py3/test_python_toolbox/test_zip_tools/test_zip_folder.py:25: ResourceWarning: unclosed file <_io.TextIOWrapper name='/build/tmp965k7xua/folder_to_zip/some_other_file.txt' mode='w' encoding='UTF-8'>
(folder_to_zip / 'some_other_file.txt').open('w').write(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/build/source/source_py3/test_python_toolbox/test_zip_tools/test_zip_folder.py:34: ResourceWarning: unclosed file <_io.BufferedReader name='/build/tmp965k7xua/archive.zip'>
zip_tools.unzip_in_memory(zip_file_path.open('rb').read())
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ok
test_python_toolbox.test_zip_tools.test_zipping_in_memory.test ... ok
======================================================================
FAIL: test_python_toolbox.test_pickle_tools.test_compressing.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/nix/store/4pzhzk0pyi6n38r9r3j7ky2fs0xfl4wy-python3.8-nose-1.3.7/lib/python3.8/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/build/source/source_py3/test_python_toolbox/test_pickle_tools/test_compressing.py", line 28, in test
assert len(compickled) < len(pickle_module.dumps(my_messy_object))
AssertionError:
b"x\x9ck`\xd2\x88\xe0```\x08\xcfH,I-K-*d\xa8-d\xf4f\xf4f*N\x8e\x8fO*\xcd\xcc)\xc9\xcc\x8b\x8f\xe7*N-\xe1*d\x8a-d\xd6\xf0f\xf6fIm-d\t*dEQ\x91V\x94_\x95\x9a\x07V\xc7\x16[\xc8\x0eS\xc7\x11T\xc8\xa9\x19\xc1\r\xb4\xa14/39?%5\xbe$?\xbf\x90\x0b$\x8b\xa2=9?\xb7 '\xb5\x82\xab\x90\xdb\x9d\x01\n\xdc\x1dD \x8c\xb6B\x9e\xa0B\xde\xf6B\xbe\x92B~=\x00*_1\xa4" = <module 'python_toolbox.pickle_tools' from '/build/source/source_py3/python_toolbox/pickle_tools.py'>.compickle(('Whatever', {1: 2}, {3, 4}, frozenset({3, 4}), (), 'unicode_too', (3, 4, 5j)))
>> assert len(b"x\x9ck`\xd2\x88\xe0```\x08\xcfH,I-K-*d\xa8-d\xf4f\xf4f*N\x8e\x8fO*\xcd\xcc)\xc9\xcc\x8b\x8f\xe7*N-\xe1*d\x8a-d\xd6\xf0f\xf6fIm-d\t*dEQ\x91V\x94_\x95\x9a\x07V\xc7\x16[\xc8\x0eS\xc7\x11T\xc8\xa9\x19\xc1\r\xb4\xa14/39?%5\xbe$?\xbf\x90\x0b$\x8b\xa2=9?\xb7 '\xb5\x82\xab\x90\xdb\x9d\x01\n\xdc\x1dD \x8c\xb6B\x9e\xa0B\xde\xf6B\xbe\x92B~=\x00*_1\xa4") < len(<module 'pickle' from '/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/pickle.py'>.dumps(('Whatever', {1: 2}, {3, 4}, frozenset({3, 4}), (), 'unicode_too', (3, 4, 5j))))
assert <module 'python_toolbox.pickle_tools' from '/build/source/source_py3/python_toolbox/pickle_tools.py'>.decompickle(b"x\x9ck`\xd2\x88\xe0```\x08\xcfH,I-K-*d\xa8-d\xf4f\xf4f*N\x8e\x8fO*\xcd\xcc)\xc9\xcc\x8b\x8f\xe7*N-\xe1*d\x8a-d\xd6\xf0f\xf6fIm-d\t*dEQ\x91V\x94_\x95\x9a\x07V\xc7\x16[\xc8\x0eS\xc7\x11T\xc8\xa9\x19\xc1\r\xb4\xa14/39?%5\xbe$?\xbf\x90\x0b$\x8b\xa2=9?\xb7 '\xb5\x82\xab\x90\xdb\x9d\x01\n\xdc\x1dD \x8c\xb6B\x9e\xa0B\xde\xf6B\xbe\x92B~=\x00*_1\xa4") == ('Whatever', {1: 2}, {3, 4}, frozenset({3, 4}), (), 'unicode_too', (3, 4, 5j))
----------------------------------------------------------------------
Ran 520 tests in 197.718s
FAILED (failures=1, skipped=7)
Test failed: <unittest.runner.TextTestResult run=520 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=520 errors=0 failures=1>
Sorry if that's environment specific, apparently nixos build system marked pysnooper as broken and I was trying to un-prove that.
Damn. Okay, I think this test could have been made flaky by new Pickle protocols, so I commented out the problematic part of it and made a new release (1.0.9). Can you give it a try?
Hmm this time got something even weirder. Shall I run a specific script before?
warning: no files found matching 'setup.cfg'
writing manifest file 'python_toolbox.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 127, in <module>
setuptools.setup(
File "/nix/store/b5xr5x5vf40m6768j3l5681h5swjq8k6-python3.8-setuptools-44.0.0/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/nix/store/b5xr5x5vf40m6768j3l5681h5swjq8k6-python3.8-setuptools-44.0.0/lib/python3.8/site-packages/setuptools/command/test.py", line 237, in run
self.run_tests()
File "/nix/store/b5xr5x5vf40m6768j3l5681h5swjq8k6-python3.8-setuptools-44.0.0/lib/python3.8/site-packages/setuptools/command/test.py", line 255, in run_tests
test = unittest.main(
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/main.py", line 100, in __init__
self.parseArgs(argv)
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/main.py", line 124, in parseArgs
self._do_discovery(argv[2:])
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/main.py", line 244, in _do_discovery
self.createTests(from_discovery=True, Loader=Loader)
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/main.py", line 154, in createTests
self.test = loader.discover(self.start, self.pattern, self.top)
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/loader.py", line 349, in discover
tests = list(self._find_tests(start_dir, pattern))
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/loader.py", line 405, in _find_tests
tests, should_recurse = self._find_test_path(
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/loader.py", line 483, in _find_test_path
tests = self.loadTestsFromModule(package, pattern=pattern)
File "/nix/store/b5xr5x5vf40m6768j3l5681h5swjq8k6-python3.8-setuptools-44.0.0/lib/python3.8/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
tests.append(self.loadTestsFromName(submodule))
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/loader.py", line 191, in loadTestsFromName
return self.loadTestsFromModule(obj)
File "/nix/store/b5xr5x5vf40m6768j3l5681h5swjq8k6-python3.8-setuptools-44.0.0/lib/python3.8/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
tests.append(self.loadTestsFromName(submodule))
File "/nix/store/zv2wr03613fbqng9rvalrsh8yrrjbncw-python3-3.8.1/lib/python3.8/unittest/loader.py", line 205, in loadTestsFromName
test = obj()
TypeError: count_calls() missing 1 required positional argument: 'function'
builder for '/nix/store/kazqxsxq65jdk6ipayggrv58g23wlwzx-python3.8-python_toolbox-1.0.9.drv' failed with exit code 1
Wow, this is frustrating. I dove deep into this shit now, and saw that I need to connect the now-deprecated setup.py test
command to Pytest. I did it, released 1.0.10 and now it should work, please give it a try.
By the way, I'm curious, do you use python_toolbox
? It's one of my less-popular open-source projects.
released 1.0.10 and now it should work, please give it a try.
Looks OK now, it can build after fixing lack of pytest package. Could you release it under github too?
By the way, I'm curious, do you use
python_toolbox
? It's one of my less-popular open-source projects.
I have to admit I am just a casual pysnooper user, this package is a dependency :)
Looks OK now, it can build after fixing lack of pytest package. Could you release it under github too?
Released on GitHub now too, I didn't remember that was a thing.
By the way, I'm curious, do you use
python_toolbox
? It's one of my less-popular open-source projects.I have to admit I am just a casual pysnooper user, this package is a dependency :)
I think I removed python_toolbox as a dependency of PySnooper a long time ago, are you on an old version?
I think I removed python_toolbox as a dependency of PySnooper a long time ago, are you on an old version?
Heh I didn't know, I was on 0.3.0. Also bumped its version on repo + removed the dependency. Thanks 👍