The bipartisan legislation would remove criminal penalties for the possession of up to half an ounce of cannabis.