Hi Stan, It seems that trait_names() was originally added as part of a mechanism for giving tab-completion to certain objects in IPython and the Notebook, and this mechanism changed. Hence what used to be trait_names() is now called _tab_completion() -- at least units.energy._tab_completion() does exactly what units.energy.trait_names() used to do, after #20410. You should be able to change your existing code to use that instead.
But since trait_names() was a public API method, there should have definitely been added a deprecation warning in #20410 instead of just simply removing trait_names. Also, it seems the function is useful from some user-perspectives, such as your own, so perhaps there should be a publicly accessible version of _tab_completion() as well? Best, Johan Stan writes: > Dear all, > > After upgrading to 7.2, I found out that things such as > units.energy.trait_names() do not work any more. I used this extensively to > loop through the different unit names and create variable names out of > them. Why was this removed, and is there another way of doing this? I want > to be able to write e.g. 'joule' instead of 'units.energy.joule'. I found a > couple of tickets that may have led to the removal of trait_names for units > (see below), but I don't understand why, and how I can make my old > worksheets compatible with sage 7.2! > > https://trac.sagemath.org/ticket/20410 > https://trac.sagemath.org/ticket/19951 > > Thanks already for your help. > > Cheers > Stan -- -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.