1. 25 Oct, 2021 2 commits
  2. 24 Oct, 2021 3 commits
    • da-woods's avatar
      Initial support for Python 3.11 (GH-4414) · 9d1ffd5d
      da-woods authored
      * Add a basic replacement for PyCode_New().
      
      An optimized versions would be nice, but this is intended to work sufficiently to start testing. Also, CPython 3.11 might actually add a new C-API function to simplify setting the current code position. That might be used instead.
      
      * Disable introspection of frame object with vectorcall
      
      This feature looked to only be used for early Python versions that don't have the full vectorcall protocol (and the contents of the frame object are changed in Python 3.11).
      9d1ffd5d
    • Stefan Behnel's avatar
      Make sure that version dependent special methods are correctly and completely... · 346c81fe
      Stefan Behnel authored
      Make sure that version dependent special methods are correctly and completely excluded via preprocessor guards.
      Previously, implementing "__div__" could fail in Py3 (if the code for adapting the Python wrapper was generated) or would at least generate C compiler warnings about unused "__div__" C functions.
      346c81fe
    • Stefan Behnel's avatar
      Add Py3.10 as CI test target. · 3748c3cd
      Stefan Behnel authored
      3748c3cd
  3. 23 Oct, 2021 1 commit
  4. 22 Oct, 2021 3 commits
  5. 21 Oct, 2021 2 commits
  6. 20 Oct, 2021 1 commit
  7. 18 Oct, 2021 6 commits
  8. 17 Oct, 2021 2 commits
    • da-woods's avatar
      Fix fused cpdef default arguments (GH-4413) · f6eeeda5
      da-woods authored
      A couple of things were going wrong:
      * they're creating CloneNodes (but not requiring the contents of the clone of the clone node to be temp)
      * assignment from a clone node generates cleanup code (which is against the general rules of a clone node), and also loses a reference via giveref
      * cpdef functions cause a small memory leak (#4412) by assigning to their constants twice. This is unfortunately difficult to test for. With this patch we no longer leak, but still duplicate a little bit of work.
      f6eeeda5
    • da-woods's avatar
      Import TextTestResult in test runner instead of _TextTestResult (GH-4415) · a0571a69
      da-woods authored
      All the versions we currently test are new enough that the alias is no longer necessary.
      a0571a69
  9. 15 Oct, 2021 1 commit
  10. 07 Oct, 2021 1 commit
  11. 06 Oct, 2021 1 commit
  12. 02 Oct, 2021 1 commit
  13. 01 Oct, 2021 2 commits
  14. 29 Sep, 2021 1 commit
  15. 28 Sep, 2021 1 commit
  16. 27 Sep, 2021 2 commits
  17. 24 Sep, 2021 1 commit
  18. 20 Sep, 2021 1 commit
  19. 07 Sep, 2021 4 commits
  20. 06 Sep, 2021 1 commit
    • Nicolas Pauss's avatar
      Fix maybe uninitialized `value` in get_value and get_value_no_default. (GH-4361) · 16a82475
      Nicolas Pauss authored
      ff16389c introduced convenient functions get_value() and get_value_no_default().
      
      Unfortunately, the variable `value` in these functions was not set before usage with PyContextVar_Get().
      This triggered some warnings:
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          """Return a new reference to the value of the context variable,
          or the default value of the context variable,
          or None if no such value or default was found.
          """
          cdef PyObject *value
          PyContextVar_Get(var, NULL, &value)
                                      ^
      ------------------------------------------------------------
      
      Cython/Includes/cpython/contextvars.pxd:118:33: local variable 'value' might be referenced before assignment
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          or the provided default value if no such value was found.
      
          Ignores the default value of the context variable, if any.
          """
          cdef PyObject *value
          PyContextVar_Get(var, <PyObject*>default_value, &value)
                                                          ^
      ------------------------------------------------------------
      
      Cython/Includes/cpython/contextvars.pxd:136:53: local variable 'value' might be referenced before assignment
      
      It can be replicated by simply importing `cpython`:
      echo "cimport cpython" >/tmp/mod.pyx && ./cython.py -Werror -Wextra /tmp/mod.pyx
      
      The solution is simply to assign NULL to `value` on declaration.
      16a82475
  21. 05 Sep, 2021 1 commit
  22. 03 Sep, 2021 2 commits