Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Pipenv and Poetry are both in the weeds - what can we do to help?

I discovered that neither project has merged a PR in roughly a month. Meanwhile, PR's and Issues are flowing in much faster than they're getting resolved. Intrigued by this, I checked dependency/package managers in other languages, and didn't see the same problems (Python/Conda, Rust/Cargo, Ruby/Bundler, Node/npm).

I think this is a big issue. It doesn't just mean that bugs aren't getting fixed, but that they're not accepting help from the community.

Is it a matter of the project owners needing to delegate more? I.e., one person, or a tiny group, is responsible for all decisions? Is there something that we, the stakeholders -- who aren't the maintainers -- can do to help?

\-----

Source: I used my opensource repocheck app to collect the data. E.g.:

* [Analysis: Pipenv](https://repocheck.com/#https%3A%2F%2Fgithub.com%2Fpypa%2Fpipenv) score: **1.6** out of 10
* [Analysis: Poetry](https://repocheck.com/#https%3A%2F%2Fgithub.com%2Fsdispater%2Fpoetry) score: **2.8** out of 10
* [Analysis: Conda](https://repocheck.com/#https%3A%2F%2Fgithub.com%2Fconda%2Fconda) score: 6.4 out of 10
* [Analysis: Ruby Bundler](https://repocheck.com/#https%3A%2F%2Fgithub.com%2Fbundler%2Fbundler) score: 7.0 out of 10

/r/Python
https://redd.it/awbr99
I just made the most 50/50 script ever: it selects and opens random image URLs from 4chan (returns NSFW results like half of the time)

It's fun to run! Cause you *really* never know what's going to pop up. Run at your own risk though, cause it can return anything from cute kitten pictures, to not-unseeable NSFL pictures

#!/usr/bin/python3
#*************************************************************************************************************************
#IMPORTANT
#Don't remove the time.sleeps; which are in place to comply with 4chan's API rule of 'no more than 1 request per second'
#https://github.com/4chan/4chan-API
#
#This script selects a random images from 4chan, and opens them in web browser
#Requires the 'requests' module
#*************************************************************************************************************************

import requests,random,json,time,webbrowser

#Returns [ random image URL, random image's thread URL ]
def r4chan():
#List of 4chan boards
boards = ['a','c','w','m','cgl','cm','n','jp','vp','v','vg','vr','co','g','tv','k','o','an','tg','sp','asp','sci','int','out','toy','biz','i','po','p','ck','ic','wg','mu','fa','3','gd','diy','wsg','s','hc','hm','h','e','u','d','y','t','hr','gif','trv','fit','x','lit','adv','lgbt','mlp','b','r','r9k','pol','soc','s4s']

#Select a board
board = random.choice(boards)

#Request board catalog, and get get a list of threads on the board; then sleeping for 1.5 seconds
threadnums = list()


/r/Python
https://redd.it/ccrh6o
Can't get Cloudfront to work (Heroku + Whitenoise)

Hi experts, thanks for any advice: as the title says, am in deployment on Heroku, am using Whitenoise. I have set up CloudFront as per directions from Whitenoise: https://whitenoise.readthedocs.io/en/latest/django.html#instructions-for-amazon-cloudfront, but it just doesn't want to work - e.g. my admin page has no CSS. I have put my app domain under origins in Cloudfront settings of course and have changed no other settings.

Settings:

STATIC_ROOT = BASE_DIR / "staticfiles"

Successful without Cloudfront

STATIC_URL = "static/"

Unsuccessful with Cloudfront

STATIC_HOST = os.environ.get("DJANGO_STATIC_HOST", "")

STATIC_URL = STATIC_HOST + "/static/" #https://xxxxxxxx.cloudfront.net/static

Logs aren't returning errors, but the Browser console is returning various "rejected" messages - it just can't see the Cloudfront resources, or there is some other security setting I need to change. It's driving me nuts: thanks for any tips you can give!

/r/django
https://redd.it/1fbgomg