Comments (3)
adam, thanks for your patch.
Unfortunately, there is a problem with the patch as it is.
inspect.getsource() only works for a function which is defined in a source file
on
disk and just because isinstance(fun, FunctionType) is true doesn't mean
getsource()
won't throw an exception.
However, I can't imagine a situation where practically speaking one would pass a
function object that wasn't from a source file. If you had the raw code to
begin with
you could just pass it along without compiling it to a function object.
I'm accepting this and assigning it to myself. I'll play around with it.
In the meantime, a workaround if you want to run views which are defined in .py
files
is to install your .py files into your python library for the environment the
view
server runs in and pass the string "from module import map_fun" for the map
function.
Original comment by [email protected]
on 28 Feb 2009 at 4:48
- Changed state: Accepted
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from couchdb-python.
Randall, I have this patch integrated in my working copy already, and have even
added some decorator fu. I'll
check in after some more testing.
Original comment by cmlenz
on 28 Feb 2009 at 12:18
from couchdb-python.
Patch plus decorator support checked in in r136.
Original comment by cmlenz
on 9 Mar 2009 at 9:39
- Changed state: Fixed
from couchdb-python.
Related Issues (20)
- How to check for _active_tasks HOT 2
- Pypi release HOT 3
- couchdb-dump attribute error: 'Resource' object has no attribute 'http' HOT 1
- Database.view() and list() don't work on Google's AppEngine HOT 3
- Consecutives POST requests concatenates request bodies on App Engine HOT 1
- Provide ability to do bulk dump and load HOT 7
- NonASCII data in map/reduce functions when using stdlib json HOT 1
- Can't access update_seq attribute from view result HOT 1
- Enhancement: support for defining and syncing of 'validate_doc_update', 'updates' and 'shows' entities in design document HOT 9
- Document Update Handler (update_doc) support for PUT and POST HOT 8
- python 3 support HOT 21
- Non-ascii content doesn't work HOT 4
- CouchDB errors are not reported cleanly (shows up as exception from simplejson) HOT 2
- Add view server support for ddoc functions HOT 2
- Doc write exception with unicode characters HOT 5
- Python 3 install failure HOT 4
- simple document creation works on couchdb, but not on mobile HOT 6
- _security object is an exception to the document model HOT 5
- Fail on generation basic auth header for python 3 HOT 3
- tools/replicate isn't compatible with python 3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb-python.