View Single Post
Old 01-17-2020, 03:02 AM   #3
Jeremy_D
Junior Member
Jeremy_D began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2020
Location: Australia
Device: kindle (very old)
Hi Kovid,

Awesome, thanks for your quick and thorough response.

Ok, I'll have a look at the plugins as you noted and follow your directions re posting on the individual plugin's thread. I assume that I should be doing the initial test of the port against the tip of the py3 branch?

Re further dev work, I really appreciate your offer of direct email communication and I may take you up on that at some point. Although as an open source developer myself, I do lean toward having discussions openly as much as possible as a general rule (for your and the project's benefit).

Do you have your code styling preferences documented anywhere? Do you use some sort of linting? E.g. pycodestyle or similar?

Should plugins be aiming to adhere to those requirements, or is it up to individual plugin devs?

Re my eventual hope of assisting with support for MySQL (and/or whatever SQL engine) as a DB backend, do you have any specific thoughts? I recall reading somewhere that you already had hopes to do something like that? If so have you made any decisions or tentative plans?

It'll be a while before I'll be in a position to look at that too much, and it's possibly wise to wait until the py3 code is rock solid before thinking about it too much (although perhaps it already is?). But I've done a little preliminary research and from where I sit, the way to go would be to implement some abstraction layer (e.g. an ORM) so that any code changes would only have to happen once and after that, it could still default to SQLite, but other SQL DBs would then also be an option; without any further code refactoring. But there are quite a few different options and I'd be interested to hear your thoughts (especially as the primary dev and especially if you've already got ideas).

Regardless, here's some ORMs I found that might be of interest:
  • SQLAlchemy - seems to be the most popular; opinions suggest that it's a bit complex initially, but pays off in future flexibility.
  • Storm - Also seems to be relatively popular, although not a lot of dev activity. It has been recently been ported to py3 recently (see here & here).
  • Pony ORM - A newer python ORM which seems to be getting a bit of traction.
  • Django's ORM - Also seems to get a lot of recommendations, apparently can be used by 3rd party apps fairly easily - I also found a nice (albeit a little dated) gist of notes.
  • web2py's ORM - Also gets a few recommendation, as per Django ORM.

Although I have no experience with any of them, on face value my inclination would be to go with the herd and use SQLAlchemy.
Jeremy_D is offline   Reply With Quote