Comments (4)
I can only speak in general terms as someone trying to learn ATProto who is using your library as a tool to do this and hasn't yet released anything but may do so shortly.
Since ATProto is still evolving I need the tool to evolve with it. I don't consider anything I write to be something that can be forgotten and expected to work if ATProto changes. Any process that can be done to gracefully manage changes so there is less breakage would be great but not too much at the expense of your time as the developer of the library. If I have to code extra steps now to facilitate this process and know there will eventually be a one time change (?) when ATProto is finalized that's fine by me.
from atproto.
new note. if we allow extra fields it will not help to detect such bugs of bsky #205. probably that's why this bug wasn't reported because they ignore "detailed" fields. and our SDK helps the third time to bsky team to fix bugs related to lexicon
from atproto.
Lexicons are allowed to change over time, within some bounds to ensure both forwards and backwards compatibility. The basic principle is that all old data must still be valid under the updated Lexicon, and new data must be valid under the old Lexicon.
- Any new fields must be optional
- Non-optional fields can not be removed.
- Types can not change
- Fields can not be renamed
From here: https://atproto.com/specs/lexicon#lexicon-evolution
the first item confirms that we should make extra fields optional; the other 3 items confirm that other strict checks must be still enabled
from atproto.
Okay, I decided to do it. #207 brings:
- Allowing additional fields with access to it
- Warn on found additional field(s) with explanation why it could happen
- Ability to disable warn via env var (for now, maybe in the code later)
- Unit tests that cover lexicon evolution from official docs. tests
- DotDict is only for unknown record types now
what is not included: access to extra fields using snake case (protocol uses camelCase)
upd. warns have been disabled because it gives false positives due to the way pydantic works
from atproto.
Related Issues (20)
- Python Version Depency Issue HOT 2
- Would you recommend any specific gunicorn settings for a feed? HOT 1
- AtUri.from_str() returns invalid host for some AT uri's (Fix included) HOT 2
- Implement autogenerated Record Namespaces HOT 1
- Add the ability to submit posts that include labels
- Delete deprecated "subject" argument of .like() and .repost() methods
- Delete deprecated record models called "Main" instead of "Record"
- Auth token handling improvements HOT 10
- Delete deprecated SessionString class
- Parsing Alt Text HOT 2
- decode_dag_multi does not decode fully HOT 4
- Misspelling in get_author_feed HOT 3
- Subscribing to feed? HOT 4
- Add support for event stream HOT 8
- get_blob errors on redirects HOT 2
- High memory usage: from atproto import Client HOT 3
- Failing on authentication HOT 2
- IpldLink model validation fails HOT 8
- delete_post not work HOT 3
- 'py_type' | '$type' is not fully backward and forward compatible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atproto.