1. 29 Jan, 2022 1 commit
    • da-woods's avatar
      Implement cdef dataclasses (GH-3400) · 102366d1
      da-woods authored
      New decorator/function "@cython.dataclasses.dataclass" and "cython.dataclasses.field()" to mark dataclasses and their fields.
      
      Tries to match the interface provided by a regular dataclass as much as possible.
      This means taking the types from the dataclasses module if available (so they match exactly) or a fallback Python version that just implements the core parts (executed with "PyRun_String()" in the C source).
      
      Use of placeholders in generated "__init__" code means the code in the C file isn't hugely readable. Probably not a huge issue, but don't really see a way round that.
      
      As part of this I've also also implemented a Cython version of "typing.ClassVar". Although really designed for use with dataclasses it behaves sensibly when used in types in a normal cdef class. This is worth documenting more thoroughly.
      
      Closes https://github.com/cython/cython/issues/2903
      102366d1
  2. 28 Jan, 2022 12 commits
  3. 27 Jan, 2022 2 commits
  4. 26 Jan, 2022 1 commit
  5. 25 Jan, 2022 3 commits
  6. 23 Jan, 2022 2 commits
  7. 22 Jan, 2022 1 commit
  8. 21 Jan, 2022 3 commits
  9. 20 Jan, 2022 1 commit
  10. 16 Jan, 2022 3 commits
  11. 15 Jan, 2022 3 commits
  12. 14 Jan, 2022 1 commit
  13. 11 Jan, 2022 1 commit
  14. 09 Jan, 2022 1 commit
  15. 07 Jan, 2022 1 commit
  16. 06 Jan, 2022 4 commits