Re: (Help!) small bugs everywhere with polymorphic class-based views
Thanks! After visiting the first page, the next page still has some of the rendering values from the first. I think I'll figure it out though. Thanks for the pointer about super()! On Sunday, August 4, 2013 1:52:54 AM UTC-7, Michael Merickel wrote: Huh? Where do you describe the error you're seeing??? You should probably be calling __init__ on your parent via super or explicitly but it's not actually a bug since you duplicated the code in both __init__s. On Sun, Aug 4, 2013 at 1:01 AM, John Cadigan johnpau...@gmail.comjavascript: wrote: I'm trying to implement polymorphic class-based views, but small errors seem to be popping up at random. Especially as the website runs for a while. Does it look like I'm taking the right approach to this? In particular, am I doing the right thing with in the classe's init? Thanks a ton for the awesome framework! class BaseView(object): *def __init__(self,request): self.request = request self.response = {}* def user_info(self, userid): if userid: auth_id = DBSession.query(AuthID).filter_by(id=userid).first() username = auth_id.display_name user_group = str(auth_id.groups[0]) else: username = '' user_group = '' user_info = {'username':username, 'group':user_group,'flashcards':flashcards, 'rank': rank} return user_info def add_user_info(self): self.userid = authenticated_userid(self.request) headers='' self.response = self.user_info(self.userid) class ContentView(BaseView): *def __init__(self, request): self.request = request self.response = {} self.add_user_info()* @reify def url(self): return self.request.matchdict['curl'] def view_classroom(self): self.response.update(self.add_some_content_method(self.url)) return self.response -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel...@googlegroups.com javascript:. To post to this group, send email to pylons...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.
invalid http://docs.pylonsproject.org/projects/pyramid/dev/objects.inv
Hi, on a crusade to provide a full pyramid stack for openSUSE, I stumbled across an doc generation issue: intersphinx tries to download http://docs.pylonsproject.org/projects/pyramid/dev/objects.inv which in turn redirects to http://docs.pylonsproject.org/projects/pyramid/en/latest/ This results in: WARNING: intersphinx inventory 'http://docs.pylonsproject.org/projects/pyramid/dev/objects.inv' not readable due to ValueError: unknown or unsupported inventory version Consequently doc generation, that depends on this part fails later on. It's all public, too: https://readthedocs.org/builds/pyramid_zcml/728948/ https://readthedocs.org/builds/pyramid_xmlrpc/728946/ TBC. Also, this issue seems to persist since half a year at least... Is that to be expected? TIA, Pete -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.
some tests fail for pyramid_handlers 0.5
Dear Chris, don't know your favorite way to be informed about such issues: FYI, building on top of a fairly current pyramid stack, two tests of pyramid_handlers fail: [7s] + python setup.py nosetests --with-coverage [7s] running nosetests [7s] running egg_info [7s] writing requirements to pyramid_handlers.egg-info/requires.txt [7s] writing pyramid_handlers.egg-info/PKG-INFO [7s] writing top-level names to pyramid_handlers.egg-info/top_level.txt [7s] writing dependency_links to pyramid_handlers.egg-info/dependency_links.txt [7s] writing entry points to pyramid_handlers.egg-info/entry_points.txt [7s] reading manifest file 'pyramid_handlers.egg-info/SOURCES.txt' [7s] writing manifest file 'pyramid_handlers.egg-info/SOURCES.txt' [7s] running build_ext [7s] E.E. [7s] == [7s] ERROR: test_it (pyramid_handlers.tests.TestHandlerDirective) [7s] -- [7s] Traceback (most recent call last): [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 534, in test_it [7s] _execute_actions(actions) [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 603, in _execute_actions [7s] action['callable']() [7s] File /usr/lib/python2.7/site-packages/pyramid/config/views.py, line 1165, in register [7s] order = view_intr['order'] [7s] KeyError: 'order' [7s] [7s] == [7s] ERROR: test_conflict_add_handler (pyramid_handlers.tests.Test_add_handler) [7s] -- [7s] Traceback (most recent call last): [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 408, in test_conflict_add_handler [7s] self.assertEqual(c[2], 'test_conflict_add_handler') [7s] IndexError: list index out of range [7s] [7s] Name Stmts Miss Cover Missing [7s] -- [7s] pyramid_handlers 106 0 100% [7s] pyramid_handlers.tests 475 499% 409, 535-538 [7s] pyramid_handlers.zcml 26 0 100% [7s] -- [7s] TOTAL 607 499% [7s] -- [7s] Ran 36 tests in 0.233s [7s] [7s] FAILED (errors=2) Full build log is available here: https://build.opensuse.org/package/live_build_log/home:frispete:python/python-pyramid_handlers/openSUSE_12.2/x86_64 It also shows signs of the intersphinx issue reported an hour ago. Cheers, Pete -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.
Re: some tests fail for pyramid_handlers 0.5
On 8/5/13 at 11:57 PM, h...@urpla.net (Hans-Peter Jansen) pronounced: Dear Chris, don't know your favorite way to be informed about such issues: https://github.com/Pylons/pyramid/issues Ideally with a pull request that fixes it. :D Next favored would be here or in IRC. --steve FYI, building on top of a fairly current pyramid stack, two tests of pyramid_handlers fail: [7s] + python setup.py nosetests --with-coverage [7s] running nosetests [7s] running egg_info [7s] writing requirements to pyramid_handlers.egg-info/requires.txt [7s] writing pyramid_handlers.egg-info/PKG-INFO [7s] writing top-level names to pyramid_handlers.egg-info/top_level.txt [7s] writing dependency_links to pyramid_handlers.egg-info/dependency_links.txt [7s] writing entry points to pyramid_handlers.egg-info/entry_points.txt [7s] reading manifest file 'pyramid_handlers.egg-info/SOURCES.txt' [7s] writing manifest file 'pyramid_handlers.egg-info/SOURCES.txt' [7s] running build_ext [7s] E.E. [7s] == [7s] ERROR: test_it (pyramid_handlers.tests.TestHandlerDirective) [7s] -- [7s] Traceback (most recent call last): [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 534, in test_it [7s] _execute_actions(actions) [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 603, in _execute_actions [7s] action['callable']() [7s] File /usr/lib/python2.7/site-packages/pyramid/config/views.py, line 1165, in register [7s] order = view_intr['order'] [7s] KeyError: 'order' [7s] [7s] == [7s] ERROR: test_conflict_add_handler (pyramid_handlers.tests.Test_add_handler) [7s] -- [7s] Traceback (most recent call last): [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 408, in test_conflict_add_handler [7s] self.assertEqual(c[2], 'test_conflict_add_handler') [7s] IndexError: list index out of range [7s] [7s] Name Stmts Miss Cover Missing [7s] -- [7s] pyramid_handlers 106 0 100% [7s] pyramid_handlers.tests 475 499% 409, 535-538 [7s] pyramid_handlers.zcml 26 0 100% [7s] -- [7s] TOTAL 607 499% [7s] -- [7s] Ran 36 tests in 0.233s [7s] [7s] FAILED (errors=2) Full build log is available here: https://build.opensuse.org/package/live_build_log/home:frispete:python/python- pyramid_handlers/openSUSE_12.2/x86_64 It also shows signs of the intersphinx issue reported an hour ago. Cheers, Pete Steve Piercy, Soquel, CA -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.
Re: some tests fail for pyramid_handlers 0.5
actually https://github.com/Pylons/pyramid_handlers/issues On Mon, Aug 5, 2013 at 7:19 PM, Steve Piercy steve.piercy@gmail.comwrote: On 8/5/13 at 11:57 PM, h...@urpla.net (Hans-Peter Jansen) pronounced: Dear Chris, don't know your favorite way to be informed about such issues: https://github.com/Pylons/pyramid/issues Ideally with a pull request that fixes it. :D Next favored would be here or in IRC. --steve FYI, building on top of a fairly current pyramid stack, two tests of pyramid_handlers fail: [7s] + python setup.py nosetests --with-coverage [7s] running nosetests [7s] running egg_info [7s] writing requirements to pyramid_handlers.egg-info/requires.txt [7s] writing pyramid_handlers.egg-info/PKG-INFO [7s] writing top-level names to pyramid_handlers.egg-info/top_level.txt [7s] writing dependency_links to pyramid_handlers.egg-info/dependency_links.txt [7s] writing entry points to pyramid_handlers.egg-info/entry_points.txt [7s] reading manifest file 'pyramid_handlers.egg-info/SOURCES.txt' [7s] writing manifest file 'pyramid_handlers.egg-info/SOURCES.txt' [7s] running build_ext [7s] E.E. [7s] == [7s] ERROR: test_it (pyramid_handlers.tests.TestHandlerDirective) [7s] -- [7s] Traceback (most recent call last): [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 534, in test_it [7s] _execute_actions(actions) [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 603, in _execute_actions [7s] action['callable']() [7s] File /usr/lib/python2.7/site-packages/pyramid/config/views.py, line 1165, in register [7s] order = view_intr['order'] [7s] KeyError: 'order' [7s] [7s] == [7s] ERROR: test_conflict_add_handler (pyramid_handlers.tests.Test_add_handler) [7s] -- [7s] Traceback (most recent call last): [7s] File /home/abuild/rpmbuild/BUILD/pyramid_handlers-0.5/pyramid_handlers/tests.py, line 408, in test_conflict_add_handler [7s] self.assertEqual(c[2], 'test_conflict_add_handler') [7s] IndexError: list index out of range [7s] [7s] Name Stmts Miss Cover Missing [7s] -- [7s] pyramid_handlers 106 0 100% [7s] pyramid_handlers.tests 475 499% 409, 535-538 [7s] pyramid_handlers.zcml 26 0 100% [7s] -- [7s] TOTAL 607 499% [7s] -- [7s] Ran 36 tests in 0.233s [7s] [7s] FAILED (errors=2) Full build log is available here: https://build.opensuse.org/package/live_build_log/home:frispete:python/python- pyramid_handlers/openSUSE_12.2/x86_64 It also shows signs of the intersphinx issue reported an hour ago. Cheers, Pete Steve Piercy, Soquel, CA -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.