sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

Bug in setting the calculus method on manifolds #29021

Closed egourgoulhon closed 4 years ago

egourgoulhon commented 4 years ago

In Sage 9.1.beta0, we have

sage: M = Manifold(2, 'M')
sage: M.set_calculus_method('sympy')
sage: X.<x,y> = M.chart()
sage: X.calculus_method()
Available calculus methods (* = current):
 - SR (default) (*)
 - sympy

while the current calculus method on the chart X should be sympy, as requested for any chart on M by M.set_calculus_method('sympy'). Prior to Sage 8.8, it was OK. The bug was actually introduced in #27601 (merged in Sage 8.8.beta1) by the accidental removal of the line

self._calculus_method = method

in the code of set_calculus_method().

This ticket fixes it by restoring the missing line.

CC: @tscrim

Component: geometry

Author: Eric Gourgoulhon

Branch/Commit: 02f0418

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/29021

egourgoulhon commented 4 years ago

Branch: public/manifolds/bug_in_set_calculus_method-29021

egourgoulhon commented 4 years ago

New commits:

f993d72#29021: fix bug in set_calculus_method
egourgoulhon commented 4 years ago

Commit: f993d72

egourgoulhon commented 4 years ago

Description changed:

--- 
+++ 
@@ -17,4 +17,4 @@

in the code of set_calculus_method().

-This ticket fixes it. +This ticket fixes it by restoring the missing line.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

02f0418#29021: add a doctest
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from f993d72 to 02f0418

tscrim commented 4 years ago
comment:5

LGTM.

tscrim commented 4 years ago

Reviewer: Travis Scrimshaw

egourgoulhon commented 4 years ago
comment:6

Thank you for the review!

vbraun commented 4 years ago

Changed branch from public/manifolds/bug_in_set_calculus_method-29021 to 02f0418