Skip to content

Conversation

@Vizonex
Copy link

@Vizonex Vizonex commented Jul 11, 2025

What do these changes do?

I used to actually attempt to make these back in my early days of programming although I was unsuccessful, seeing this inspired me to try and get it to work with the current version of python that I was using, in doing so I wanted to mimic the behaviors of the newer Queue Objects and I've added a backport for the BaseExecptionGroup Object.
Sometimes my own library aiothreading can sometimes turn out to be too aggressive, one example might be a website deciding to throw a 429 if a program runs too fast.

Some stuff is incomplete and I may need to transform this PR to a Draft

  • Currently some unittests choose to freeze, hang or choke on me in which case I've chosen to label as skippable. I've transformed a decent majority of these tests into context managers so that if I were to hit CTRL+C on my keyboard the tests will remember to close.

Are there changes in behavior for the user?

With older versions before 3.13 now being supported this library is not locked to newer versions of python which means more people will likely end up using it. Please be aware that I have a lot of tests skipped as some portions might need a bit of rethinking to work with older versions of python.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

pyproject.toml Outdated
{name = "Martin Jurča", email = "[email protected]"}
]
readme = "README.md"
requires-python = ">=3.13"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would have to be adjusted if we want the project to be installable in older runtimes.

@Vizonex
Copy link
Author

Vizonex commented Jul 11, 2025

I'm going to be changing a few internals since I know of a safer route since I worked on aiothreading so I know a bit about preventing deadlocks. Vizonex/aiothreading#1 I'll probably see if x42005e1f would like to join in or provide us with some tips and feedback as well.

pyproject.toml Outdated
Comment on lines 10 to 11
'exceptiongroup==1.3.0; python_version<"3.11"',
'backports-asyncio-queues==0.1.2; python_version<"3.13"'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core packaging metadata mustn't use pins. Lower bounds are acceptable, and occasional known broken version exclusions.
Also, backports-asyncio-queues doesn't have any provenance metadata. So we should be careful. I think I've found potential source for it on GH. It must be verified and the project persuaded to at least start using trusted publishing and have other verifiable links to the source. The patch below also makes specs sparse, which is more readable.

Suggested change
'exceptiongroup==1.3.0; python_version<"3.11"',
'backports-asyncio-queues==0.1.2; python_version<"3.13"'
'exceptiongroup; python_version < "3.11"',
'backports-asyncio-queues; python_version < "3.13"'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, fix the file encoding to be UTF-8.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Vizonex
Copy link
Author

Vizonex commented Jul 13, 2025

@webknjaz I'll move the Queue Library to utilize Janus for now until aiologic gets a new update with a shutdown method for us to use and gets trusted publishing in place. I was shown some benchmarks for aiologic and they look promising for a future update with this library and I think moving to aiologic's SimpleQueue in a later update will be something to look forward to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants