factor out getter/setters in the base sqlite class
This should pave the way for reusing this class in a caching backend like cachecontrol.
View Articleimplement thread-level locking
This is not absolutely necessary as we don't do thread-level parallelism. But if we every want to switch back to doing that, this is an elegant way of supporting that. Inspired by cachecontrol-sqlite.
View Articleenforce commit in context manager unless explicitely disabled
This makes sure we never, ever forget to commit unless we *explicitely* disable it. This is also inspired by cachecontrol-sqlite, except the latter uses False as a default for the autocommit, which...
View Articlefirst attempt at using cachecontrol, failing
It seems we need to provide the timestamp, and it doesn't store it in the database, so it doesn't send if-modified-since headers, so it fails. Maybe we are better off implementing this on our own?
View Articlefix broken cache adapter support
We did not need to pass the if-modified-since header. All that was needd was that we lookup (and return!) the cache value properly. So also remove that from the database. The way things were setup,...
View Articleforcibly preset the builtin feed session
Without this setting, the wrong session gets initialized in the new Feed object. Before the caching layer was implemented, this didn't matter much because those sessions were never called. But since...
View Articleinstall python3-dev, required for compiling regex
Not sure why all that junk is necessary, but I want to fix the build.
View Articleavoid newer feedparser versions
feedparser 6.0+ removed the FeedParserDict which we depend on: https://github.com/kurtmckee/feedparser/issues/197 Until we refactor the Feed class, stick with older versions of feedparser.
View Articlemove session and fetching to the feed manager
Having the session and the network code in the "model" makes no sense: that stuff belongs in the "controller". Having it there made it particularly difficult to implement the caching layer, as I had...
View Articleremove class-level sticky session parameter
This cleans up a lot of stuff. Now we can treat the session as a normal feed_manager parameter. Since there is usually only one feed_manager in operation at any time, it is basically a static member....
View Articlemake test suite pass again
This was failing because hooking up the cache into the session completely obliterates our poor old betamax cache. Instead of doing that, we politely queue the cache layer behind it... ... except that...
View Articlerename feeds to feed_manager in main
The "feeds" appelation is an old remnant of the previous data structures. Now we do use a FeedManager everywhere and we should name it as such. It will be easier to grep for it and will more obviously...
View Articlereuse feed_manager object in fetch as well
I see no reason why we need to construct a different object in this specific class, let's just reuse the one already created. This should make a tiny improvement on the startup latency, but hasn't...
View ArticleDRY: refactor common requirements out of tox and setup.py
Requirements are now stored only in setup.py. Before, we were telling tox to delegate the test runs to setup.py, but this made it impossible to pass arguments to pytest. By calling pytest directly, we...
View Articleexplicitely override the feed, not the session
This gives us a single override point that is more cohesive and cleaner. It will also make other run tests much easier to call, but that's for a later commit.
View Articleremove useless --config and --database and override instead
By passing the feed_manager, we have complete and coherent control over those parameters, without having to pass along the arguments. The downside is we create empty cassettes for all of those, but...
View Articleadd empty test cassettes artifacts
Those seem to be created now that we use the betamax session everywhere, but they are probably harmless.
View ArticleREADME: don't let the example config create a folder named '~/Mailbox/'
I was confused that feeds didn't show up in my usualy location, but on further investigation, I found out that I now had a new subfolder in my home folder, literally named '~: $ find ./"'~"...
View ArticleMerge branch 'master' into 'master'
README: don't let the example config create a folder named '~/Mailbox/' See merge request !7
View Articlerecover from feedparser exceptions (Closes: #964597)
In the aforementionned bug report, feed2exec crashes brutally (with a backtrace, and not completely done) on the following feed: http://www.agendadulibre.org/events.rss?region=12 The full backtrace...
View Articlerun tox on whatever python environment is available
This removes a duplicate source of information about where to store Python versions. The classifiers remain, however. This makes the `tox` command (ran locally on my laptop) work without errors too.
View Article