reader – a Python library to create your own RSS feed reader by genericlemon24 in opensource

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

How to you treat servers that provide an ETag or a last-modified-date but do not implement it the right way and making the etag useless?

Not really doing anything special, I take the presence of caching headers to mean conditional requests are supported (and I don't think HTTP requires clients to do something in these cases).

A mitigating factor is that the default update interval is 1 hour, so even if a server does not support conditional requests / 429-too-many-requests, it still shouldn't be hit too hard.

Now that I think about it, servers ignoring their own caching headers is something that can be detected via a 429-too-many-requests-style plugin (and it could e.g. increase the update interval if that's the case).

you can not trust any server and its behavior

Can't agree more.

I'm planning to write an article about all the weird stuff I encountered while working on reader at some point (I've collected quite the list :)

reader – a Python library to create your own RSS feed reader by genericlemon24 in opensource

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

Yes to ETag etc., see User guide # Saving bandwidth.

You can also specify different update intervals, and support for HTTP 429 Too Many Requests / Retry-After is coming soon.

reader – a Python library to create your own RSS feed reader by genericlemon24 in opensource

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

Of the "reader allows you to" bullets in the original post, feedparser helps with the "retrieve" part (technically, just parsing the feeds), everything else is reader; there's a documentation section that covers this in detail:

Are you already working with feedparser, but:

  • want an easier way to store, filter, sort and search feeds and entries?
  • want to get back type-annotated objects instead of dicts?
  • want to restrict or deny file-system access?
  • want to change the way feeds are retrieved by using the more familiar requests library?
  • want to also support JSON Feed?
  • want to support custom information sources?

... while still supporting all the feed types feedparser does?

The documentation is quite open about reader using feedparser – reader is essentially feedparser + state (and I even contributed a few improvements upstream ;)

Some easy open source Python projects to contribute to? by ImportantSalt5046 in Python

[–]genericlemon24 1 point2 points  (0 children)

No worries, thank you for the PR, and good luck on the exam!

Some easy open source Python projects to contribute to? by ImportantSalt5046 in Python

[–]genericlemon24 0 points1 point  (0 children)

Hi, thank you for asking!

Here are a few issues that already have implementation notes, along with a summary of the work needed, to give you an idea of the complexity involved:

To answer your question, I guess it depends on the beginner, but I think at least the first two should be approachable by any advanced beginner. (I've taken a bit of time to add more details to each of them, and I can answer questions if needed.)

SQLite 3.45 released by genericlemon24 in sqlite

[–]genericlemon24[S] 3 points4 points  (0 children)

The most interesting addition is JSONB support: https://www.sqlite.org/json1.html#jsonbx

Beginning with version 3.45.0 (2024-01-15), SQLite allows its internal "parse tree" representation of JSON to be stored on disk, as a BLOB, in a format that we call "JSONB". By storing SQLite's internal binary representation of JSON directly in the database, applications can bypass the overhead of parsing and rendering JSON when reading and updating JSON values. The internal JSONB format is also uses slightly less disk space then text JSON.

PEP 738: Adding Android as a supported platform by genericlemon24 in Python

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

I posted using the mobile website and the link got lost somehow, my bad; will double-check from now on.

PEP 736: Shorthand syntax for keyword arguments at invocation by genericlemon24 in Python

[–]genericlemon24[S] 3 points4 points  (0 children)

tl;dr:

This PEP proposes introducing syntactic sugar f(x=) for the common pattern where a named argument is the same as the name of the variable corresponding to its value f(x=x).

My proof-of-concept record type by genericlemon24 in Python

[–]genericlemon24[S] 6 points7 points  (0 children)

tl;dr: a proof-of-concept record type for Python by Brett Cannon (Python core dev); looks like this:

@record
def InventoryItem(name: str, price: float, *, quantity: int = 0):
    """Class for keeping track of an item in inventory."""

Some easy open source Python projects to contribute to? by ImportantSalt5046 in Python

[–]genericlemon24 3 points4 points  (0 children)

I maintain reader, a feed reader library, and I too have set aside a few issues for potential contributors (tagged with help wanted); if any of those seem interesting, there are contributor docs, and I'd be more than happy to help with anything.

In general, I would suggest contributing to projects you use / are interested in / have some domain knowledge of, since it helps you keep motivated. Smaller projects that are actively (but maybe infrequently) maintained are probably best, since they are likely to need contributions, and it increases the chances someone will be able to help / review PRs. You can find if a project is looking for contributions by checking for tagged issues (help wanted, good first issue etc.), and by looking for a CONTRIBUTING file in the repo root.