There is nothing wrong with feeding in the tank. I know most people will try and tell you this but it is untrue from what I've seen. I have fed my snake in his tank since I got him, even though at the pet store they switched him into a container for feeding and I have had 0 issues with opening the tank.
Is he biting out of defense or out of a feeding response?
You can try hook training your python and tapping him with a hook to get him out of feeding mode if he seems to associate you with food. Handling him more may help if it's been a few years so that he can get used to being handled again.