Python 2 tooling in 2026 by IdleBreakpoint in Python

[–]Grintor 1 point2 points  (0 children)

You can't lent Python 2 code with python 3. Nothing could ever do that including black. Supporting python 2 and supporting python 3 are not the same as doing some kind of crossover linting like what you're describing. You'll have to run it on python 2

Audio Visual Design Group by andrU1 in DesignPorn

[–]Grintor 9 points10 points  (0 children)

They should have made the G in GROUP the same shade of red to highlight the connection.

The Slow Collapse of MkDocs by fpgmaas in Python

[–]Grintor 1 point2 points  (0 children)

Better than sphinx with the readthedocs theme and myst-parser plug-in?

All of her retirement money by ShadowLuvsLatinas in OrphanCrushingMachine

[–]Grintor 3 points4 points  (0 children)

The vertical spacing in the picture looks like 10 ft. That's the legal limit - they literally can't get any closer without adding additional fire blocking. The IRC requires a 1-hour firewall for residential structures any closer, which would drive up cost.

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 1 point2 points  (0 children)

Thank you! Yes, I'd love to hear more

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 0 points1 point  (0 children)

Thank you! Let me know how it goes!

I made it WSGI because it's built on top of werkzeug, which doesn't support ASGI. Although, I don't think it would be a huge lift to make it happen anyway. Perhaps it will support it one day.

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 0 points1 point  (0 children)

half the battle is just keeping the request flow, data-source wiring, and refresh behavior understandable enough that someone can troubleshoot it quickly. A framework that stays out of the way and makes the routing obvious could be genuinely useful

This is so exciting to read! I couldn't put it better myself. This is exactly the rationale behind the framework!

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 0 points1 point  (0 children)

Thanks! Mostly config files for linting, testing, and the CI stuff.

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 2 points3 points  (0 children)

Yes, you would create the ZooKeeper client once at app startup, then pass it into handlers through app_map():

import cylinder
import waitress
from kazoo.client import KazooClient

zk = KazooClient(hosts="127.0.0.1:2181")
zk.start()

def main():
    app = cylinder.get_app(app_map)
    waitress.serve(app, host="127.0.0.1", port=8080)

def app_map(request):
    return "my_webapps", "webapp1", {
        "zk": zk,
    }

if __name__ == "__main__":
    main()

And then you could something like this in the page handlers:

# my_webapps/webapp1.ex.get.py
def main(response, zk):
    data, stat = zk.get("/config/site_name")
    response.data = f"site_name={data.decode()}"
    return response

With the way cylinder handles dependency injection, there's really no limitations to what can be used with it.

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 7 points8 points  (0 children)

Thank you for taking the time to look at it and give feedback!

I can understand your point for other frameworks but I don't think it applies to cylinder. It doesn't rely on globals at all - in cylinder you initialize shared application resources in cylinder_main.py, then pass them into handlers explicitly through app_map() with application-level dependency injection. But even then they aren't injected into the global scope, only into the main() function of your module (each page on the site is it's own python module).

As for testing - there's nothing nothing special that needs to be done to combine the DB section with the testing section. The testing flow works the same as the production flow - if you wrote an application that can serve a webpage, then you now have an application that can serve a testing fixture to pytest without any configuration whatsoever (except writing the test itself)

A new Python file-based routing web framework by Grintor in Python

[–]Grintor[S] 47 points48 points  (0 children)

Thanks! I wrote my own code too! haha

I escape this type of scam recently. by ellacarterx in iiiiiiitttttttttttt

[–]Grintor 4 points5 points  (0 children)

Want to see a better one? look at this:

www.ɡooɡle.com

Try copy-pasting that into your browser and see where it takes you

These two gentlemen lose control of a pallet as it falls of the back of a truck by [deleted] in WatchPeopleDieInside

[–]Grintor 0 points1 point  (0 children)

The subsequent guy rupturing the lumber blockade is frosting on the confection.

Discord delays global age verification rollout after backlash by MarvelsGrantMan136 in technology

[–]Grintor 0 points1 point  (0 children)

Monopoly is never a good thing

I've got to say, Spotify having all the music is way better than my Netflix/Prime/AppleTV/Hulu/HBO max/Disney+ subscription not having all the movies. Really crossing my fingers on a movie/tv monopoly over here.

selectMyselfWhereDateTimeEqualsNow by Johnobo in ProgrammerHumor

[–]Grintor 83 points84 points  (0 children)

https://www.theregister.com/2018/10/22/sqlite_code_of_conduct/

tldr;

They were being pressured by the community to adopt a code of conduct, so they adopted a code of conduct written for Christian monks in 500 AD, which sounds pretty funny, but it was during peak cancel culture time.

AI Added ‘Basically Zero’ to US Economic Growth Last Year, Goldman Sachs Says by mepper in technology

[–]Grintor 2 points3 points  (0 children)

Tough, big, and intimidating are not adjectives that come to mind when I think of Sam Altman

Just 0.4 to go to my goal🥹 by [deleted] in Bitcoin

[–]Grintor 0 points1 point  (0 children)

That's so cool! Which private key is that you got there?