MagicStack / MagicStack/asyncpg
TypeError: can't set attributes of built-in/extension type 'asyncpg.Record'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I am trying to monkey patch the Record class (the getter) to get an history of every column that got accessed in the record (to only query what the user really need for the next n queries). However I cant do that, I got the error of the title.
I am pretty sure this is related to https://github.com/MagicStack/asyncpg/issues/451 and the strange nature of Record object.
I would like to know why Records are made like that and if you will change that. Right now I think I will re implement my driver class with another library if you dont have any workaround
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the asyncpg.Record class and its getter behavior, then read the related asyncpg issue #451. Determine whether supporting attribute changes or exposing access tracking is in scope; done would be a maintainer decision and a documented supported approach or explicit explanation of the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100