News for hackers. Stuff that matters.
Re:Analyzing Django requirement files on GitHub by Alex3917 on Thursday June 08, 2017 @11:46AM (#14514983)
> Among all projects, more than 60% use a Django release with one or more known security vulnerabilities. Only 2% are using a secure Django release.

Probably because 95% of projects on GitHub are homework assignments for job interviews that never get updated after they're submitted.

Re:Analyzing Django requirement files on GitHub by rbanffy on Thursday June 08, 2017 @11:51AM (#14515020)
I tend not to pin versions. When I generate requirements files, I use pip-chill (disclaimer: I made it) to avoid listing redundant dependencies.
Re:Analyzing Django requirement files on GitHub by Alex3917 on Thursday June 08, 2017 @11:55AM (#14515051)
Interesting. To me pip-tools seems like a better fit for this use case, in terms of letting you specify a requirements.in file that gets compiled to a requirement.txt file. This allows you to selectively pin dependencies of other packages if you have some use case for doing so.

Something related that would be nice though is having pip list -o only output dependencies in the requirements.in file if it exists, or else that are primary dependencies.

Re:Analyzing Django requirement files on GitHub by rbanffy on Thursday June 08, 2017 @04:21PM (#14516906)
You can tell it to generate the list without version numbers so you can get a clean requirements.in for pip-tools to compile.
Re:Analyzing Django requirement files on GitHub by jijojv on Thursday June 08, 2017 @11:58AM (#14515079)
I didn't use to pin versions until last weekend i experienced https://pypi.python.org/pypi/requests going through 15 revs within 3 days.
Re:Analyzing Django requirement files on GitHub by rbanffy on Thursday June 08, 2017 @06:41PM (#14517724)
I say I tend. I never said I never do it. ;-)

My development environment is not pinned. When I set up CI, I do it with bot pinned (as it goes to production) and unpinned (from dev) requirements, both generated using pip-chill.

Re:Analyzing Django requirement files on GitHub by greysteil on Thursday June 08, 2017 @11:59AM (#14515086)
Agreed. Would be interested to hear what happens when you filter for projects that have had any activity in the last month (say).

Jay (at PyUp) - any idea?

Re:Analyzing Django requirement files on GitHub by jayfk on Thursday June 08, 2017 @01:25PM (#14515624)
The query I ran against the GitHub dataset has no activity/age/popularity data, just plain requirements files.

I'll write a follow up post on this :)

Re:Analyzing Django requirement files on GitHub by Alex3917 on Thursday June 08, 2017 @01:31PM (#14515651)
I'd add in a minimum of 100 or so stars also. Anything less than that is probably a personal project and not a package.
Re:Analyzing Django requirement files on GitHub by ryanar on Friday June 09, 2017 @07:55AM (#14520753)
Eh, that would miss my two stars django package then.[1] 100 is steep, and django packages are almost universally titled django-project-name so you could just find repos starting with django- with recent commits

[1] https://github.com/audiolion/django-groups-cache

Re:Analyzing Django requirement files on GitHub by howderek on Thursday June 08, 2017 @06:31PM (#14517667)
You may be interested in the GHTorrent database on BigQuery:

https://bigquery.cloud.google.com/dataset/ghtorrent-bq:ght

Re:Analyzing Django requirement files on GitHub by adisbladis on Thursday June 08, 2017 @09:31PM (#14518587)
I would also be interested in seeing if a project has any significant amount of stars to filter out "homework assignments" that likely doesn't see any real use.
Re:Analyzing Django requirement files on GitHub by greysteil on Thursday June 08, 2017 @03:00PM (#14516295)
Awesome, looking forward to it, and nice work on PyUp!
Re:Analyzing Django requirement files on GitHub by MrFurious on Thursday June 08, 2017 @12:34PM (#14515289)
Really?, i know "professional" projects using django versions seven years old...
Re:Analyzing Django requirement files on GitHub by godzillabrennus on Thursday June 08, 2017 @01:47PM (#14515786)
One of the companies I work with has been using Django for sites since it was in beta. They are always years behind in releases.

Sometimes you can build a small but profitable business and not do everything right from a technical perspective.

Still, you'd never see the code on a public Github repo.