Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecation warnings for platform.linux_distribution and pasteURLopener #1

Open
smoser opened this issue Nov 7, 2018 · 1 comment

Comments

@smoser
Copy link

smoser commented Nov 7, 2018

Hi. I'm using pastebinit on Ubuntu development release (disco) and seeing the following:

$ python3 --version
Python 3.7.1

$ echo foo | ./pastebinit 
./pastebinit:42: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  release = platform.linux_distribution()[0].lower()
./pastebinit:413: DeprecationWarning: pasteURLopener style of invoking requests is deprecated. Use newer urlopen functions/methods
  url_opener = pasteURLopener()
http://paste.ubuntu.com/p/BzhNQtrZhW/
@mnott
Copy link

mnott commented Nov 22, 2018

On the first error, what seems to work is

 41     #import platform                                                             
 42     import distro                                                                
 43     #release = platform.linux_distribution()[0].lower()                          
 44     release = distro.linux_distribution(full_distribution_name=False)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants