The API for functionspaces changed after the 0.7.0 release. You now need to call dolfinx.fem.functionspace (all non-captialized), as this is the new constructor.
Yes it worked, thanks a lot. Since I am new to fenics, I was planning to follow the examples as in the documentation .examples. So are they as per the new version? What is the best way to know if the APIs have changed with respect to what is specified in the example?
Note that if you are new to the system, you’ll find it way easier to use the released version, not the development version (which may continue to change).