1. 25 Apr, 2019 2 commits
    • Marius Gedminas's avatar
      Why does Microsoft even exist? · 19661a9e
      Marius Gedminas authored
      19661a9e
    • Marius Gedminas's avatar
      Fix C compilation warning · bae1560d
      Marius Gedminas authored
      gcc 8.3.0 emits this during python setup.py build:
      
      persistent/cPersistence.c: In function ‘Per_repr’:
      persistent/cPersistence.c:1481:44: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
               snprintf(buf, sizeof(buf) - 1, "%llx", oid_value);
                                               ~~~^   ~~~~~~~~~
                                               %lx
      
      <stdint.h> defines standard macros such as PRId64, PRIu64 and PRIx64 for
      printing {u,}int64_t values, so let's use them.
      bae1560d
  2. 24 Apr, 2019 3 commits
  3. 17 Apr, 2019 1 commit
  4. 26 Mar, 2019 2 commits
  5. 17 Feb, 2019 1 commit
  6. 21 Nov, 2018 2 commits
  7. 20 Nov, 2018 3 commits
  8. 17 Nov, 2018 2 commits
  9. 16 Nov, 2018 3 commits
  10. 15 Nov, 2018 1 commit
  11. 13 Nov, 2018 1 commit
  12. 12 Nov, 2018 2 commits
    • Jason Madden's avatar
      Merge pull request #105 from zopefoundation/issue102 · 7b7ce089
      Jason Madden authored
      Fully test the C implementation of the PickleCache
      7b7ce089
    • Jason Madden's avatar
      Fully test the C implementation of the PickleCache · e2116d98
      Jason Madden authored
      Fix discrepancies between it and the Python implementation:
      
        - The C implementation now raises ``ValueError`` instead of
          ``AssertionError`` for certain types of bad inputs.
        - The Python implementation uses the C wording for error messages.
        - The C implementation properly implements ``IPickleCache``; methods
          unique to the Python implementation were moved to
          ``IExtendedPickleCache``.
        - The Python implementation raises ``AttributeError`` if a
          persistent class doesn't have a ``p_jar`` attribute.
      
      Fixes #102
      e2116d98
  13. 22 Oct, 2018 4 commits
  14. 21 Oct, 2018 1 commit
  15. 20 Oct, 2018 4 commits
  16. 19 Oct, 2018 1 commit
    • Jason Madden's avatar
      Include the module in the C repr · 67447f2d
      Jason Madden authored
      Fix the repr of the persistent objects to include the module name when
      using the C extension. This matches the pure-Python behaviour and the
      behaviour prior to 4.4.0.
      
      Fixes #92
      67447f2d
  17. 28 Aug, 2018 4 commits
  18. 27 Aug, 2018 2 commits
    • Marius Gedminas's avatar
      Merge pull request #90 from zopefoundation/fix-tox · 9b8ca93f
      Marius Gedminas authored
      Make test pass when run with 'tox'
      9b8ca93f
    • Marius Gedminas's avatar
      Make test pass when run with 'tox' · a7eb124f
      Marius Gedminas authored
      I used to get failures like
      
          py27 runtests: commands[0] | zope-testrunner --test-path=.
          Test-module import failures:
      
          Module: persistent.tests.test_docs
      
          IOError: [Errno 2] No such file or directory: '/home/mg/src/zopefoundation/persistent/.tox/docs/api/cache.rst'
      
          Running zope.testrunner.layer.UnitTests tests:
            Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
            Ran 524 tests with 0 failures, 1 errors and 0 skipped in 0.249 seconds.
          Tearing down left over layers:
            Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.
      
          Test-modules with import problems:
            persistent.tests.test_docs
          ERROR: InvocationError for command '/home/mg/src/zopefoundation/persistent/.tox/py27/bin/zope-testrunner --test-path=.' (exited with code 1)
      
      because adding a ../ at the end of the path is not the same as stripping
      off the last path component when symlinks are involved!
      
          $ cd .tox && ./py27/bin/python
          >>> >>> from persistent.tests.test_docs import __file__
          >>> __file__
          '/home/mg/src/zopefoundation/persistent/.tox/py27/local/lib/python2.7/site-packages/persistent/tests/test_docs.pyc'
      
      .tox/py27/local/lib is a symlink to /home/mg/src/zopefoundation/persistent/.tox/py27/lib
      and so .tox/py27/local/lib/.. is pointing to .tox/py27, while
      os.path.abspath() thinks it's pointing to .tox/py27/local.
      
          >>> import os
          >>> here = os.path.dirname(__file__)
          >>> while not os.path.exists(os.path.join(here, 'setup.py')): here = os.path.join(here, '..')
          ...
          >>> here
          '/home/mg/src/zopefoundation/persistent/.tox/py27/local/lib/python2.7/site-packages/persistent/tests/../../../../../../..'
          >>> os.path.abspath(here)
          '/home/mg/src/zopefoundation/persistent/.tox'
          >>> os.path.exists(os.path.join(here, 'setup.py'))
          True
          >>> os.path.exists(os.path.join(os.path.abspath(here), 'setup.py'))
          False
          >>> os.path.exists(os.path.abspath(os.path.join(here, 'setup.py')))
          False
      a7eb124f
  19. 23 Aug, 2018 1 commit