Fix 34532

Added a check if encodingType is null to allow it to retrieve the default
encoding.
Fix 34616

Updated pdb.py and test_pdb.py to match the code in the CPython patch.
Fix 33627

Fixed the logic when an existing dialect is passed in with keyword args as
well