Skip to content
Myr

fix models.py

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent af52bf7 · Browse files · 1 file+1 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−7 removed

  • other:+1 added−7 removed

1 file+1 added−7 removed

modified:requests/models.py+1 added-7 removed
332 unmodified lines
333 self.method = to_native_string(self.method.upper())334335 @staticmethod336 def _get_idna_encoded_host(host):337 try:338 from .packages import idna339 except ImportError:340 # tolerate the possibility of downstream repackagers unvendoring `requests`341 # For more information, read: packages/__init__.py342 import idna337 import idna343 sys.modules['requests.packages.idna'] = idna338339 try:340 host = idna.encode(host, uts46=True).decode('utf-8')341 except idna.IDNAError:
601 unmodified lines