duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Failure running tests.


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] Failure running tests.
Date: Mon, 9 Sep 2019 09:59:24 -0500

Scott,

setup.py (uses dist/makedist) is failing because you do not have the future module installed.  There may be more:

    install_requires=[u'fasteners', u'future'],
    tests_require=[u'pytest', u'pytest-runner', u'fasteners', u'future', u'mock', u'pexpect'],

dist/makedist will make a tarball from the files in dist/relfiles, then tox will use that tarball to install in a virtualenv for testing.

The only modules I see that are way out of date is tox and virtualenv.  An update would help.

...Ken


On Sun, Sep 8, 2019 at 12:18 PM Scott Hannahs <address@hidden> wrote:
Ken,

I unpacked the 0.8.04 tarball.  I put the two files in duplicity-0.8.04/dist subdirectory and overwrote the makedist file.  But I get the same error:
% tox -e py37 -v
using tox.ini: /Users/sth/Downloads/duplicity-0.8.04/tox.ini
using tox-3.0.0 from /sw/lib/python3.7/site-packages/tox/__init__.py
GLOB sdist-make: /Users/sth/Downloads/duplicity-0.8.04/setup.py
  /Users/sth/Downloads/duplicity-0.8.04$ /sw/bin/python3.7 /Users/sth/Downloads/duplicity-0.8.04/setup.py sdist --formats=zip --dist-dir /Users/sth/Downloads/duplicity-0.8.04/.tox/dist >/Users/sth/Downloads/duplicity-0.8.04/.tox/log/tox-0.log
Traceback (most recent call last):
  File "/sw/bin/tox", line 11, in <module>
    load_entry_point('tox==3.0.0', 'console_scripts', 'tox')()
  File "/sw/lib/python3.7/site-packages/tox/session.py", line 40, in run_main
    main(args)
  File "/sw/lib/python3.7/site-packages/tox/session.py", line 46, in main
    retcode = Session(config).runcommand()
  File "/sw/lib/python3.7/site-packages/tox/session.py", line 415, in runcommand
    return self.subcommand_test()
  File "/sw/lib/python3.7/site-packages/tox/session.py", line 593, in subcommand_test
    path = self.get_installpkg_path()
  File "/sw/lib/python3.7/site-packages/tox/session.py", line 569, in get_installpkg_path
    path = self._makesdist()
  File "/sw/lib/python3.7/site-packages/tox/session.py", line 449, in _makesdist
    return self.config.distdir.listdir()[0]
IndexError: list index out of range
The log file has:
% cat .tox/log/tox-0.log 
actionid: tox
msg: packaging
cmdargs: ['/sw/bin/python3.7', local('/Users/sth/Downloads/duplicity-0.8.04/setup.py'), 'sdist', '--formats=zip', '--dist-dir', local('/Users/sth/Downloads/duplicity-0.8.04/.tox/dist')]

running sdist
Traceback (most recent call last):
  File "/Users/sth/Downloads/duplicity-0.8.04/dist/makedist", line 24, in <module>
    from future import standard_library
ImportError: No module named future
mv: rename duplicity-0.8.04.tar.gz to .tox/dist/duplicity-0.8.04.tar.gz: No such file or directory
/sw/lib/python3.7/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '0.8.04' to '0.8.4'
  normalized_version,
% 

It seems that it is trying to copy a copy of the tar ball from somewhere?  The tarball is actually one directory higher than the working directory.  In Downloads, and the working directory is "Downloads/duplicity-0.8.04” as normal?

I am fine running the tests as "python3.7 setup.py test”.  However I looked at the modules you showed versions for and I have some older versions installed.  Here is a list of the versions I have.  Does anything standout as a possible cause to the few failures I have?  IIRC they were mostly restart issues.

I underlined some of the larger version differences.

-Scott

alabaster 0.7.12 0.7.11
astroid 2.2.5 1.6.3
atomicwrites 1.3.0 1.1.5
attrs 19.1.0 18.1.0
Babel 2.7.0 2.6.0
certifi 2019.6.16 2018.8.13
chardet 3.0.4 3.0.4
coverage 4.5.4 4.5.1
docutils 0.15.2 ??
duplicity 0.0.dev0 0.8.04
fasteners 0.15 0.15
fastimport 0.9.2 0.9.8
filelock 3.0.12 ??
future 0.17.1 0.17.1
idna 2.8 2.7
imagesize 1.1.0 1.1.0
importlib-metadata 0.20 ??
isort 4.3.21 4.3.4
Jinja2 2.10.1 2.10
lazy-object-proxy 1.4.2 1.3.1
MarkupSafe 1.1.1 1.0
mccabe 0.6.1 0.61
mock 3.0.5 2.0.0
monotonic 1.5 1.5
more-itertools 7.2.0 4.3.0
packaging 19.1 17.1
pexpect 4.7.0 4.6.0
pluggy 0.12.0 0.7.1
ptyprocess 0.6.0 0.6.0
py 1.8.0 1.7.0
pycodestyle 2.5.0 2.5.0 (not installed???)
Pygments 2.4.2 2.2.0
pylint 2.3.1 1.8.4
pyparsing 2.4.2 2.2.0
pytest 5.1.2 3.10.1
pytest-cov 2.7.1 2.6.0 (not installed???)
pytest-runner 5.1 4.2
pytz 2019.2 2018.5
requests 2.22.0 2.19.1
six 1.12.0 1.12.0
snowballstemmer 1.9.0 1.2.1
Sphinx 2.2.0 1.8.4
sphinxcontrib-applehelp 1.0.1 ??? (not installed???)
sphinxcontrib-devhelp 1.0.1 ??? (not installed???)
sphinxcontrib-htmlhelp 1.0.2 ??? (not installed???)
sphinxcontrib-jsmath 1.0.1 ??? (not installed???)
sphinxcontrib-qthelp 1.0.2 ??? (not installed???)
sphinxcontrib-serializinghtml 1.1.3 ??? (not installed???)
toml 0.10.0 0.1.11 (not installed???)
tox 3.14.0 3.0.0
typed-ast 1.4.0 ??? (not installed???)
urllib3 1.25.3 1.23
virtualenv 16.7.5 16.0.0
wcwidth 0.1.7 0.1.7 (not installed???)
wrapt 1.11.2 1.10.11
zipp 0.6.0 ??? (not installed???)

On Sep 5, 2019, at 2:03 PM, Kenneth Loafman <address@hidden> wrote:

Scott,

I've attached a .tgz with fixes to allow you to run tox from the tarball.  They are in the trunk if you want.

Extract the two files into the <duplicity-root>/dist subdirectory and tox will run.

...Ken


On Wed, Sep 4, 2019 at 10:53 AM Kenneth Loafman <address@hidden> wrote:
Scott,   

Have you tried updating your Mac?  It's several years behind current software.

duplicity uses a lot of python modules.  The top of the tox listing from earlier shows the version numbers of the ones used in testing.  Again, maybe an update?

Why bzr or git: dist/makedist makes an install tar from the current directory.  It uses bzr or git to get a list of the released filenames, builds a tarball using just those files, then tox uses the tarball to build the virtual environment under .tox/py37.  Keeps the distribution clean that way, no stray files from the developer.

That said, tox will not work for testing a tarball distribution.  You'll have to use "setup.py test" and I'll have to rethink dist/makedist.  My bad!

...Ken






On Tue, Sep 3, 2019 at 8:46 PM Scott Hannahs via Duplicity-talk <address@hidden> wrote:
Ken,

If I look at .tox/log the log file created tonight is:

actionid: tox
msg: packaging
cmdargs: ['/sw/bin/python3.7', local('/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/setup.py'), 'sdist', '--formats=zip', '--dist-dir', local('/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/.tox/dist')]

running sdist
failed to open trace file: [Errno 13] Permission denied: '/Users/sth/.bzr.log'
bzr: ERROR: Not a branch: "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/".
fatal: Not a git repository (or any of the parent directories): .git
Processing version 0.8.04
Traceback (most recent call last):
  File "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/dist/makedist", line 134, in <module>
    Main()
  File "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/dist/makedist", line 125, in Main
    tarfile = MakeTar()
  File "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/dist/makedist", line 90, in MakeTar
    assert not os.mkdir(os.path.join(tardir, u"po", lang)), lang
FileNotFoundError: [Errno 2] No such file or directory: 'duplicity-0.8.04/po/bg'
mv: rename duplicity-0.8.04.tar.gz to .tox/dist/duplicity-0.8.04.tar.gz: No such file or directory
/sw/lib/python3.7/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '0.8.04' to '0.8.4'
  normalized_version,

It seems that the testing needs access to a .bzr.log file in the home directory.  This could be an issue since I am trying to build this in an anonymous account as security testing for side effects.

I have tried running the test ("tox -e py37”) in my own directory as myself and still get the error the key lines are the bzr and git errors.  Why is the testing system trying to sync using bzr or git?
running sdist
bzr: ERROR: Not a branch: "/sw/src/fink.build/duplicity-0.8.04-1/duplicity-0.8.04/".
fatal: Not a git repository (or any of the parent directories): .git
Processing version 0.8.04


-Scott


On Sep 3, 2019, at 1:52 PM, Kenneth Loafman <address@hidden> wrote:

Scott,

When I run "tox -e py37" on my Mac I have no errors.

Your errors in test_selection are the same as on py36, very weird.

The permission errors causing test_replicate and test_restart are also odd.  Do you have the system locked down more than normal?  I test using just my own creds, not root..

The unicode errors when reporting the permission errors are something that needs to be fixed, but are a distraction at this point.

Try running under tox instead of fink just to eliminate one variable.

I've pasted my run.  Perhaps there is a version issue between our two systems?

...Thanks,
...Ken

ken@dione:~/workspace/duplicity-src8$ tox -e py37
GLOB sdist-make: /Users/ken/workspace/duplicity-src8/setup.py
py37 create: /Users/ken/workspace/duplicity-src8/.tox/py37
py37 installdeps: -rrequirements.txt
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
py37 inst: /Users/ken/workspace/duplicity-src8/.tox/.tmp/package/1/duplicity-0.0dev.tar.gz
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
py37 installed: alabaster==0.7.12,astroid==2.2.5,atomicwrites==1.3.0,attrs==19.1.0,Babel==2.7.0,certifi==2019.6.16,chardet==3.0.4,coverage==4.5.4,docutils==0.15.2,duplicity==0.0.dev0,fasteners==0.15,fastimport==0.9.2,filelock==3.0.12,future==0.17.1,idna==2.8,imagesize==1.1.0,importlib-metadata==0.20,isort==4.3.21,Jinja2==2.10.1,lazy-object-proxy==1.4.2,MarkupSafe==1.1.1,mccabe==0.6.1,mock==3.0.5,monotonic==1.5,more-itertools==7.2.0,packaging==19.1,pexpect==4.7.0,pluggy==0.12.0,ptyprocess==0.6.0,py==1.8.0,pycodestyle==2.5.0,Pygments==2.4.2,pylint==2.3.1,pyparsing==2.4.2,pytest==5.1.2,pytest-cov==2.7.1,pytest-runner==5.1,pytz==2019.2,requests==2.22.0,six==1.12.0,snowballstemmer==1.9.0,Sphinx==2.2.0,sphinxcontrib-applehelp==1.0.1,sphinxcontrib-devhelp==1.0.1,sphinxcontrib-htmlhelp==1.0.2,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.2,sphinxcontrib-serializinghtml==1.1.3,toml==0.10.0,tox==3.14.0,typed-ast==1.4.0,urllib3==1.25.3,virtualenv==16.7.5,wcwidth==0.1.7,wrapt==1.11.2,zipp==0.6.0
py37 run-test-pre: PYTHONHASHSEED='3996759775'
py37 run-test: commands[0] | python compilec.py
running build
running build_ext
building '_librsync' extension
creating build
creating build/temp.macosx-10.14-x86_64-3.7
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c _librsyncmodule.c -o build/temp.macosx-10.14-x86_64-3.7/_librsyncmodule.o
creating build/lib.macosx-10.14-x86_64-3.7
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk build/temp.macosx-10.14-x86_64-3.7/_librsyncmodule.o -L/usr/local/lib -lrsync -o build/lib.macosx-10.14-x86_64-3.7/_librsync.cpython-37m-darwin.so
py37 run-test: commands[1] | pytest --cov=duplicity --cov-append --cov-report=
================================================= test session starts ==================================================
platform darwin -- Python 3.7.4, pytest-5.1.2, py-1.8.0, pluggy-0.12.0
cachedir: .tox/py37/.pytest_cache
rootdir: /Users/ken/workspace/duplicity-src8, inifile: tox.ini, testpaths: testing/unit, testing/functional
plugins: cov-2.7.1
collected 428 items                                                                                                    

testing/unit/test_backend.py ............                                                                        [  2%]
testing/unit/test_backend_instance.py ............................................................               [ 16%]
testing/unit/test_collections.py ........                                                                        [ 18%]
testing/unit/test_diffdir.py .......                                                                             [ 20%]
testing/unit/test_dup_temp.py ..                                                                                 [ 20%]
testing/unit/test_dup_time.py ......................                                                             [ 25%]
testing/unit/test_file_naming.py .............                                                                   [ 28%]
testing/unit/test_globmatch.py ...........................                                                       [ 35%]
testing/unit/test_gpg.py ..........                                                                              [ 37%]
testing/unit/test_gpginterface.py ......                                                                         [ 39%]
testing/unit/test_lazy.py ............................                                                           [ 45%]
testing/unit/test_manifest.py .....                                                                              [ 46%]
testing/unit/test_patchdir.py ........                                                                           [ 48%]
testing/unit/test_path.py .....                                                                                  [ 49%]
testing/unit/test_selection.py ............................................................................      [ 67%]
testing/unit/test_statistics.py .......                                                                          [ 69%]
testing/unit/test_tarfile.py .                                                                                   [ 69%]
testing/unit/test_tempdir.py ..                                                                                  [ 69%]
testing/unit/test_util.py .                                                                                      [ 70%]
testing/functional/test_badupload.py .                                                                           [ 70%]
testing/functional/test_cleanup.py ...                                                                           [ 71%]
testing/functional/test_final.py ...........................                                                     [ 77%]
testing/functional/test_log.py .                                                                                 [ 77%]
testing/functional/test_rdiffdir.py .                                                                            [ 77%]
testing/functional/test_replicate.py ...                                                                         [ 78%]
testing/functional/test_restart.py ................................                                              [ 85%]
testing/functional/test_selection.py .......................................ss...........                        [ 98%]
testing/functional/test_verify.py ........                                                                       [100%]

=================================================== warnings summary ===================================================
.tox/py37/lib/python3.7/site-packages/past/types/oldstr.py:5
  /Users/ken/workspace/duplicity-src8/.tox/py37/lib/python3.7/site-packages/past/types/oldstr.py:5: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Iterable

.tox/py37/lib/python3.7/site-packages/past/builtins/misc.py:4
  /Users/ken/workspace/duplicity-src8/.tox/py37/lib/python3.7/site-packages/past/builtins/misc.py:4: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Mapping

testing/unit/test_globmatch.py:100
  /Users/ken/workspace/duplicity-src8/testing/unit/test_globmatch.py:100: DeprecationWarning: invalid escape sequence \/
    u"\/usr\/[^/]*\/bin\/")

-- Docs: https://docs.pytest.org/en/latest/warnings.html


================================ 426 passed, 2 skipped, 3 warnings in 560.97s (0:09:20) ================================
_______________________________________________________ summary ________________________________________________________
  py37: commands succeeded
  congratulations :)


_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
<fixes0804.tgz>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]