Custom Query (1174 matches)
Results (394 - 396 of 1174)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #552 | fixed | GMGTableBase uses default kwarg of {} in methods | ||
| Description |
A few places in GMGTableBase have method definitions that look something like: def find_one(cls, query_dict={}):
...
This is almost certainly not what the authors intended. The default argument list is only evaluated once during execution, at import time. The code above creates a single dictionary as the default, and if this is mutated down the line, the mutated value becomes the default for subsequent calls. In these particular cases it's unlikely to cause problems -- that argument will almost certainly be passed in -- but in the event it's not, this can cause very strange, difficult to diagnose behavior. The correct approach is to use an immutable value as an argument default. Note that this same problem exists for class level attributes: defining a class such as: class Foo(object):
bar = {}
means that for *every* instance of |
|||
| #536 | fixed | GNU Coding Standards-compliant configure script & Makefile | ||
| Description |
According to the GNU Coding Standards, all GNU projects should have a configure script and a Makefile. I've gone ahead and made such a script based on some new Autoconf macros. The included Makefile.in is largely a wrapper around setup.py. It also includes some extra touches, like installing to a Virtualenv and building the docs. This should all be standards compliant now. As the project grows, I'll be happy to help a bit with modifying the scripts. Note: these files are part of the (as-of-yet un-announced) new GNU package pyconfigure. Over there I'll be working steadily to make these more powerful than just wrapper scripts. I'll keep you abreast of any interesting developments. The changes are available here: https://gitorious.org/mediagoblin/mediagoblin-pyconfigure/commit/52aef5b445710dbe800ebba7f44ca0cc0e06ea54/diffs/ef513974abdd60284b4c32371acbe9ee0eb9c019 |
|||
| #73 | FIXED | GNU MediaGoblin logo | ||
| Description |
We need a great logo. |
|||
