added permissive argument to adapt() function, the returned factory now has __fields__ and __name__ attributes