Re: constructor classmethods

2016-11-02 Thread Steven D'Aprano
On Thursday 03 November 2016 00:46, stest...@gmail.com wrote: > Hi > > I was hoping to canvas opinion on using classmethods as constructors over > __init__. > > We've got a colleague who is very keen that __init__ methods don't contain > any logic/implementation at all, and if there is any, then

Re: Released: pip v9.0.0

2016-11-02 Thread Ian Cordasco
Pick check? ;-) On Nov 2, 2016 2:27 PM, "Donald Stufft" wrote: > I’d like to announce the release of pip v9.0. > > This release features: > > * The 9.x series will be the last pip versions to support Python 2.6. > * Support for Requires-Python (will require additional support in > setuptools/PyP

Re: advanced SimpleHTTPServer?

2016-11-02 Thread justin walters
On Wed, Nov 2, 2016 at 12:52 PM, Eric S. Johansson wrote: > So this brings me back to my question. What is missing in > SimpleHTTPServer to keep it from being secure enough? > There's no way to vet requests. You can't stop a request from accessing anything in the directory that SimpleHTTPServer

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Eric S. Johansson
On 11/2/2016 2:40 PM, Chris Warrick wrote: > Because, as the old saying goes, any sufficiently complicated Bottle > or Flask app contains an ad hoc, informally-specified, bug-ridden, > slow implementation of half of Django. (In the form of various plugins > to do databases, accounts, admin panels

Re: advanced SimpleHTTPServer?

2016-11-02 Thread justin walters
On Wed, Nov 2, 2016 at 11:40 AM, Chris Warrick wrote: > The other frameworks are simple to set up, too. I’ve personally had > Unicode issues with Bottle, and it doesn’t even do sessions. Unlike > Flask, or of course Django. > > Because, as the old saying goes, any sufficiently complicated Bottle

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Chris Warrick
On 2 November 2016 at 17:56, Eric S. Johansson wrote: >> Instead, you should use a real web server, such as nginx or apache. >> Those will do the first two properly, and the last one could be >> handled by a simple-ish PHP script. Or a full-fledged app in Django or >> Flask if you feel like it. >

Re: Django Application Model Reference

2016-11-02 Thread Dreyton Scott
On Wednesday, November 2, 2016 at 1:40:35 PM UTC-4, Dreyton Scott wrote: > Hello. I am currently creating a notification django application that will > need to be able to "hook" into another django application. What my app needs > is a way to retrieve all model classes in the connected applicatio

Django Application Model Reference

2016-11-02 Thread Dreyton Scott
Hello. I am currently creating a notification django application that will need to be able to "hook" into another django application. What my app needs is a way to retrieve all model classes in the connected application. Is there a way to do this? -- https://mail.python.org/mailman/listinfo/pyt

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Eric S. Johansson
On 11/2/2016 12:15 PM, Chris Warrick wrote: > SimpleHTTPServer is meant to be used for development and testing. It > should not be used for anything remotely serious for security and > speed reasons. Given that many people are trying to use SimpleHTTPServer for "production" should teach us that

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Chris Warrick
On 2 November 2016 at 08:27, Ulli Horlacher wrote: > "python -m SimpleHTTPServer" is really cool :-) > > But I need some more features: > > - some kind of a chroot, to prevent file access higher then the base > directory > > - a directory listing mit date and size information > > - an upload pos

Re: Recursive generator in Python 3.5

2016-11-02 Thread congloi1990
Thank you so much, this all clear for me now -- https://mail.python.org/mailman/listinfo/python-list

Re: constructor classmethods

2016-11-02 Thread Terry Reedy
On 11/2/2016 9:46 AM, stest...@gmail.com wrote: Hi I was hoping to canvas opinion on using classmethods as constructors over __init__. We've got a colleague who is very keen that __init__ methods don't contain any logic/implementation at all, and if there is any, then it should be moved to a

Re: constructor classmethods

2016-11-02 Thread Ethan Furman
On 11/02/2016 06:46 AM, stest...@gmail.com wrote: I was hoping to canvas opinion on using classmethods as constructors over __init__. We've got a colleague who is very keen that __init__ methods don't contain any logic/implementation at all, and if there is any, then it should be moved to a

Re: constructor classmethods

2016-11-02 Thread breamoreboy
On Wednesday, November 2, 2016 at 1:47:00 PM UTC, stes...@gmail.com wrote: > Hi > > I was hoping to canvas opinion on using classmethods as constructors over > __init__. > > We've got a colleague who is very keen that __init__ methods don't contain > any logic/implementation at all, and if ther

Re: constructor classmethods

2016-11-02 Thread Chris Angelico
On Thu, Nov 3, 2016 at 12:46 AM, wrote: > We've got a colleague who is very keen that __init__ methods don't contain > any logic/implementation at all, and if there is any, then it should be moved > to a create() classmethod. > > I get the underlying principal, and it's one that a strict OOp ap

constructor classmethods

2016-11-02 Thread stestagg
Hi I was hoping to canvas opinion on using classmethods as constructors over __init__. We've got a colleague who is very keen that __init__ methods don't contain any logic/implementation at all, and if there is any, then it should be moved to a create() classmethod. As a concrete example, one

Re: advanced SimpleHTTPServer?

2016-11-02 Thread Andrea D'Amore
On 2 November 2016 at 08:27, Ulli Horlacher wrote: > "python -m SimpleHTTPServer" is really cool :-) > - some kind of a chroot, to prevent file access higher then the base > directory Shouldn't that be done by chrooting the python process in the calling environment? -- Andrea -- https://ma

testfixtures 4.13.0 Released!

2016-11-02 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.13.0 featuring the following: - Add support to compare() for ignoring broken __eq__ implementations, such as that found in the Django ORM! The package is on PyPI and a full list of all the links to docs, issue trackers and the l

Re: lxml and xpath(?)

2016-11-02 Thread dieter
Doug OLeary writes: > ... > Any hints/tips/suggestions greatly appreciated especially with complete noob > tutorials for xpath. You can certainly do it with "XPath" (look for the "following-sibling" axis). You can also use Python (with "lxml"). If you have an element "e", then "e.getnext()" giv

advanced SimpleHTTPServer?

2016-11-02 Thread Ulli Horlacher
"python -m SimpleHTTPServer" is really cool :-) But I need some more features: - some kind of a chroot, to prevent file access higher then the base directory - a directory listing mit date and size information - an upload possibility I could modify /usr/lib/python2.7/SimpleHTTPServer.py by m