Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 06 22:18

    brondsem on master

    Set all DeprecationWarning's st… (compare)

  • Feb 06 22:18
    brondsem closed #53
  • Feb 06 19:09
    brondsem edited #53
  • Feb 06 17:58
    brondsem synchronize #53
  • Feb 06 17:56

    brondsem on master

    drop python 3.6 support, fixes … (compare)

  • Feb 06 17:56
    brondsem closed #55
  • Feb 06 17:56
    brondsem assigned #53
  • Feb 06 16:07
    brondsem opened #55
  • Feb 03 22:32
    dill0wn ready_for_review #53
  • Feb 03 22:30
    dill0wn synchronize #53
  • Jan 29 23:21

    amol- on development

    disable logging and cleanup (compare)

  • Jan 29 23:11

    amol- on development

    Use development version of TG (compare)

  • Jan 29 21:08

    amol- on development

    Fix on Python 3.10 and 3.11 (compare)

  • Jan 29 20:58

    amol- on development

    Stop CI on first failure (compare)

  • Jan 29 17:17

    amol- on development

    Adapt to pytest (compare)

  • Jan 29 15:42

    amol- on development

    Fix generated app_cfg (compare)

  • Jan 29 15:40

    amol- on development

    Upgrading guides from 2.4 to 2.5 (compare)

  • Jan 29 15:29

    amol- on development

    Address some auth_backend lefto… (compare)

  • Jan 29 15:08

    amol- on development

    Switch test suite from nose to … (compare)

  • Jan 28 16:19

    amol- on development

    Further tweaks to make tests pa… (compare)

Alessandro Molina
@amol-

tgext.crud 0.9.0 was released with support for sorting over related entities in the CRUD Table and a few bugfixes.

See https://github.com/TurboGears/tgext.crud/releases/tag/0.9.0 for the release announcement

tgext.pluggable 0.8.0 has been released.

This version adds support for pluggable applications in TurboGears 2.4, most pluggable applications have been tested and ported to 2.4, if you need to update check their github repository for latest changes.

samjustice
@samjustice
So with webfaction being absorbed into godaddy, does anyone know of another turbogears, developer friendly host without having to go with an unmanaged VPS?
Alessandro Molina
@amol-

@samjustice

There is a guide on how to run TG on Google App Engine: https://turbogears.readthedocs.io/en/latest/cookbook/deploy/appengine/

And I know a few people using PythonAnyWhere: https://www.pythonanywhere.com/

Heroku also works pretty well: https://www.heroku.com/
I used it for a bunch of minor projects

I also used OpenShift a few years ago, but I don't know how it evolved: https://www.openshift.com/
samjustice
@samjustice
@amol- Thanks for the suggestions!
Joe Knapka
@jknapka
Hello all. I've been using TG for a while now. I'm wondering what the current status of development is. I found that the 2.3 release of gearbox is unable to correctly load CherryPy or gevent WSGI servers. I've submitted a pull request to fix that.
Joe Knapka
@jknapka
I've also had a problem building the documentation due to a syntax error in docs/code_ext.py. This is under Python 3.x. I have a fix for that as well but I'm wondering whether TG2 is a going concern.
Alessandro Molina
@amol-
@jknapka there were probably new releases of gevent that broke it, I usually pin the version in my projects so I never noticed.
For the documentation a patch is appreciated, it's currently a non-concern as it's built on readthedocs using Py2, so Py3 support wasn't a need so far.
TG2.4 was just made available on PyPi as a pre-release btw ( https://medium.com/@__amol__/welcome-turbogears-2-4-6f5f9f0a47a0 ) so the project just made a new major release that took most of the time.
Alessandro Molina
@amol-

TG has always supported many different libraries and backends, and it's hard to deprecate them because there are people using them out there, but without third parties help it's hard to maintain them all because it's hard to notice breakages (I never used CherryPy for TG for example, always Waitress).

So any help on that is greatly appreciated!

Joe Knapka
@jknapka
Excellent, I'm glad to see things moving forward! I've noted your comments on my pull request, and will make appropriate changes today.
Alessandro Molina
@amol-
:+1:
Joe Knapka
@jknapka
Since Google+ is going away in the near future, what will become the main channel for TG development forum activity and announcements? Will that happen here?
Alessandro Molina
@amol-
Twitter will be https://twitter.com/turbogearsorg
Still thinking of a proper place where to add longer posts btw, as Google+ was convenient because it allowed long posts. For releases changelog the "Release" tab in GitHub might be the proper place
Joe Knapka
@jknapka
I'm ready to help with whatever needs work. I should mention that while I have many years of Python experience, it's mostly with 1.x and 2.x. I just recently ported my pet TG app (a conference event registration service) to Python 3 (3.7 actually) and that is the only notable thing I've done with Py3. Also the whole WSGI ecosystem is new to me so figuring out how to do development on TG itself (rather than my app) is a bit of a challenge. I was thinking about publishing a set of TG developer notes as I figure all that out.
Alessandro Molina
@amol-
@jknapka I released gearbox 0.2.0 with your changes: https://github.com/TurboGears/gearbox/releases/tag/0.2.0
about developer notes, if you find useful things, feel free to contribute them in https://turbogears.readthedocs.io/en/latest/cookbook/cookbook.html#contributing-to-turbogears
Joe Knapka
@jknapka

Hey Alessandro, I'm trying to do a thing that I'm not sure how to do. I am processing form results in (say) MyController.form_handler(). If the form doesn't validate, I want to pass the form object back to the original exposed MyController.form_start(self,form=None) method. That method uses @expose('form_template_name') to return a page that renders the form.

So I try doing

return self.form_start(form=erroneous_form)

but this does not work because the form_handler() method lacks the @expose('form_template_name') annotation -- since form_handler() is merely a POST handler it normally ends with a redirect rather than returning a result, and therefore uses the @expose() annotation.

Obviously I could add @expose('form_template_name') to the form_handler() method, but that seems wrong/inelegant. Is there a way to return the result of an exposed method and tell that method what template to use to render its results? Eg something like:

return self.form_start(form=erroneous_form,template_name='form_template_name')

?

Alessandro Molina
@amol-
@jknapka Isn't that what you already achieve if you have @validate(YouForm, error_handler=form_start) as a decorator for form_handler? That's how validation for forms is expected to work: https://turbogears.readthedocs.io/en/latest/turbogears/widgets_forms.html#validating-fields
Joe Knapka
@jknapka
I wasn't aware of this annotation, I guess because I don't use Tosca forms. When I updated my app from TG1 to TG2, converting my Tosca forms to TW2 was frustrating so I switched to WTForms. WTForms has (IMO) much clearer documentation than TW2.
Alessandro Molina
@amol-

TW2 had nearly zero documentation. But I started rewriting it a few weeks ago. So there is now a newdoc branch ( https://github.com/toscawidgets/tw2.core/tree/newdoc/docs/source ) where I'm doing all the work of rewriting it.

But if you are using WTForms I guess you have to adhere to WTForms way of doing things. You should still be able to use the error_handler to switch action of the controller in case of errors, but you will have to roll your own validator as WTForms forms aren't supported as validators by tg out of the box.

I suggest you have a look at https://turbogears.readthedocs.io/en/latest/turbogears/validation.html?highlight=validation#the-error-handler so that you can pass the errors back to the error handler and display the form with the errors.
Nils Philippsen
@nphilipp
@amol- Do you mean that you rewrite the docs, or TW?
Alessandro Molina
@amol-
the docs
:D
Nils Philippsen
@nphilipp
phew
Alessandro Molina
@amol-
TW itself does its job if you know how to use it, it's just that you have to read the source code every time you don't use for more than a week :P
Nils Philippsen
@nphilipp
BTW, how alive are the TW2 related projects -- tw2.jquery, tw2.dynforms and the like? I've submitted PRs there long ago (ex. to update to a current jquery version) but haven't gotten responses.
Alessandro Molina
@amol-
tw2.jquery, tw2.dynforms etc are pretty dead. I don't think anyone is using them nowadays. At least personally I usually do things with different JS libraries
Nils Philippsen
@nphilipp

I don't think anyone is using them nowadays.

Hmm. I do. shrug

Alessandro Molina
@amol-
I think that the original authors are not using them anymore
so if you want to step up and claim maintainership it's a good time to do so
Nils Philippsen
@nphilipp
I think at least one of them was done by Ralph Bean, right? He's a colleague of me so that should be easy enough.
Out of curiosity, what alternative JS libs do you use?
Alessandro Molina
@amol-
I personally still contribute to tw2.core and tw2.forms because they still have a value in modern apps, but tw2.jquery given the standard nowadays is to use webpack or similar and for dynforms I usually go with Vue or React
but we recently used the Growing table for a project and we had to copy the widget into the project to make a fix to the template
but I think it happens once a year or so that we use something from dynforms
Nils Philippsen
@nphilipp
Yeah, I only use dynforms for a set of emails, phone numbers in a "personal data" form in an app of mine. But it does its job, more or less (albeit the UI looks a little dated).
Alessandro Molina
@amol-
Ok, new TW2 documentation is at a fairly decent point. As soon as I can get access to readthedocs.io from Ralph I'll make it available to everyone
Alessandro Molina
@amol-
nvm, got a reply from him :D
Alessandro Molina
@amol-
https://tw2core.readthedocs.io/en/develop/ <- here is the new documentation
Aditya Padwal
@adityap31
Guys, just wanted to know. How big will be TurboGears in next 2 years ?
Alessandro Molina
@amol-
are you asking in terms of LOC or in terms of which part of the world will be ruled by TurboGears if it gains self conscience and declares war against humanity?
Aditya Padwal
@adityap31
Oh! Wrong gitter lobby, I guess 😊
Hey @amol- I am a Django Developer and was thinking of creating something with TG.
Alessandro Molina
@amol-
That would be great, I'm always eager to hear feedbacks about the framework and what can be improved
Joe Knapka
@jknapka
Hey guys! I have run into a problem with TG24 and nosetests that I don't understand and have been wrestling with for several hours. Specifically, this test case run in a newly-quickstarted TG24 app, which raises a "This transaction is closed" exception from SQLAlchemy:
import testapp.model as model

from testapp.tests import TestController

from nose.tools import eq_, ok_

class TestBreakage(TestController):
    ''' What the actual... '''

    def setUp(self):
        super().setUp()
        u = model.User(user_name="what",email_address="what@where.whatever")                                        
        model.DBSession.add(u)

        u = model.DBSession.query(model.User).first()
        # Crash, because querying causes a transaction commit. But...
        # which transaction? Why does this seem to cause the second
        # test (only) to fail?.

    def test_broken_1(self):
        ok_(True)

    def test_broken_2(self):
        ok_(True)
Alessandro Molina
@amol-
@jknapka Is that all you need to reproduce it?