iugu / iugu-python

MIT License
29 stars 26 forks source link

Removed slash ('/') at the end of URL for python 3.8 compatibility #20

Open lepri opened 4 years ago

lepri commented 4 years ago

When we're using Python 3.8 we get a duplicated path when URL ends with '/'. i.e.: 'https://api.iugu.com/v1/customers/customers'

lepri commented 4 years ago
>>> url = 'https://api.iugu.com/v1/'
>>> path = 'customers'
>>> re.sub(r'/?$', re.sub(r'^/?', '/', str(path)), url)
 'https://api.iugu.com/v1/customers/customers'
lepri commented 4 years ago

Hi,

Anyone can take a look at this PR?

guilhermej commented 2 years ago

This will not be merged? This company is a joke.