Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pystencils pystencils
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pycodegen
  • pystencilspystencils
  • Merge requests
  • !329

Fix deepcopying on Python 3.11

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Michael Kuron requested to merge py311 into master Jun 03, 2023
  • Overview 0
  • Commits 2
  • Pipelines 4
  • Changes 4

Python 3.11 added object.__setstate__ (https://github.com/python/cpython/commit/884eba3c76916889fd6bff3b37b8552bfb4f9566), which breaks our fix for #40 (closed), but only on Sympy version 1.11 because that version added sympy.Basic.__setstate__ (https://github.com/sympy/sympy/commit/24e1e1a2ea4e3952c577d36138f31780b7548512). The updated fix is actually more logical (because it actually does what the comment says), so hopefully it will survive future version updates better.

This fixes both the AttributeError: 'tuple' object has no attribute 'items' issue which we already have a fix for in !327 (closed), and the sp.Pow issue that came up next.

Tested with Python 3.10 and 3.11 and Sympy 1.9 and 1.11.

@holzer, you'll need to merge manually because of builds failing due to !327 (closed).

Edited Jun 04, 2023 by Michael Kuron
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: py311