Releases: procrastinate-org/procrastinate
1.1.0
Migrations
Yes ! For the first time in a while, there are migrations. They're mainly dropping old functions now that we're in 1.0, following our migration doc. As a reminder, you should apply the migrations listed for 1.0 (such as the one below) before you upgrade to 1.1.
What's Changed
Miscellaneous
- Apply future migrations following the release of 1.0 by @ewjoachim in #893
Dependencies
- Upgrade to upload-artifact@v4 by @ewjoachim in #891
Misc
- Update pr-labels.yml by @ewjoachim in #892
Full Changelog: 1.0.3...1.1.0
1.0.3
1.0.2
Migrations
None
Miscellaneous
- Improve release management by @ewjoachim in #889
- Static type analysis with Pyright by @ewjoachim in #887
Full Changelog: 1.0.1...1.0.2
1.0.1
1.0.0
A word from the maintainer:
This is the first major release for Procrastinate, and the 50th release of the project. The project has been moving a lot up until 2021, and has slowed down since. In the last year or so, it was almost dormant. One of the reasons was the poor state of sync vs async compatibility code, which made new contributions more complex. It took a few month to gather the motivation for solving this, but the release of the excellent
Psycopg3
, as well as the opportunity to useasgiref
's sync/async compatibility code opened the door for new solutions.This release wouldn't have existed without the help of the users who gave their opinion in #882, and especially @paulzakin and their team who tested beta versions in real-life scenarios.
I'd love for the procrastinate developer team to be bigger, as I'm the only person committing to the project these days (... except for dependency bots, of course). If you use Procrastinate in your life, and would like to give back a little bit of time now and then, please don't hesitate to come say hi (#748).
Happy new year, happy upgrading, and let us know if anything breaks :)
Cheers, Joachim
Migrations
None
Breaking changes
The following is a consequence of the merge of #753 (see also #882)
Aiopg
andPsycopg2
connectors are nowcontrib
. To use them, you'll need to import them withfrom procrastinate.contrib.aiopg import AiopgConnector
andfrom procrastinate.contrib.psycopg2 import Psycopg2Connector
. Also, the dependencies toaiopg
andpsycopg2
are now optional: usepip install procrastinate[aiopg]
orpip install procrastinate[psycopg2]
(orpip install procrastinate[aiopg,psycopg2]
for both)- The main supported connector is now the
PsycopgConnector
that uses Psycopg 3 (andSyncPsycopgConnector
). Please note thatPsycopgConnector
accepts parameters based onpsycopg_pool.ConnectionPool
, which has a slightly different signature from thepsycopg2
/aiopg
counterpart, the main difference is that the connection arguments are now passed asPsycopgConnector(kwargs={"host": "..."})
(instead ofAiopgConnector(host=...)
). Other parameters may have changed too, please check the documentation. - Actually, you probably won't need sync connectors anymore because the Async connectors are now able to derive a sync connector when called in a sync context. You should try defining a single (async) connector in your code such as
PsycopgConnector
(orAiopgConnector
), see if it works with all your existing code and don't hesitate to report potential issues. Synchronous connectors are still available in case you need it, so it should be a workaround in most cases. - Synchronous tasks are now launched asynchronously in a ThreadPoolExecutor using
asgiref.sync_to_async
. That said, because of the Global Interpreter Lock (GIL), CPU-consuming tasks will not run faster with parallelization. - The CLI parser has changed. The main differences should be around the order of arguments vs flag, and around environment variables. If you find something unexpected, please open an issue.
- Opening your app at the same time you instantiate it is now discouraged. Ideally, define your app as a module variable, and open it in the appropriate function (when your process starts). In the future, we may expose new helpers for doing this easily with django. Note that when you use the Procrastinate CLI, it takes care of opening/closing the app properly.
JobManager.check_connection
was an async method. It becamecheck_connection_async
for consistency.check_connection
was created a the sync counterpart.
Dependencies
- Update Deps with major upgrades (major) (#875)
Kudos:
@paulzakin for testing, and the folks who contributed to #882
0.34.0b2
0.34.0b1: A pre-release for testing sync/async changes to come
Migrations
None
Breaking changes
#753 :
Aiopg
andPsycopg2
connectors are nowcontrib
. To use them, you'll need to import them withfrom procrastinate.contrib.aiopg import AiopgConnector
andfrom procrastinate.contrib.psycopg2 import Psycopg2Connector
. Also, the dependencies toaiopg
andpsycopg2
are now optionnal: usepip install procrastinate[aiopg]
orpip install procrastinate[psycopg2]
(orpip install procrastinate[aiopg,psycopg2]
for both)- The main supported connector is now the
PsycopgConnector
that use Psycopg 3 (andSyncPsycopgConnector
) - Actually, you probably won't need sync connectors anymore because the Async connectors are now able to derive a sync connector when called in a sync context. So try defining a single (async) connector in your code such as
PsycopgConnector
(orAiopgConnector
). - Synchronous tasks are now launched asynchronously in a ThreadPoolExecutor using
asgiref.sync_to_async
. - Some CLI commands that used to accept parameter in any order now won't. It should be mainly mixing positional CLI args vs flags: you used to be able to do
procrastinate defer x --unknown {}
and now you'll have to put all positional arguments first and flags last:procrastinate defer x {} --unknown
. We can't guarantee that there won't be other subtle breaks around this (e.g. environment variable support). That said, if you discover a change, feel free to open a ticket, if it's easily fixable, we might fix it. - Opening your app at the same time you instantiate it is now discouraged. Ideally, define your app as a module variable, and open it in the appropriate function (when your process starts). In the future, we may be exposing helpers for doing this easily with django. Note that when you use the Procrastinate CLI, it takes care of opening/closing the app properly.
Discussion about these changes happen in #882
0.33.0: Fix import error
Migrations
None
Bugfix
- Don't throw an importError if psycopg(3) can't be imported, unless user is actually using it (#881)
Kudos:
0.32.0: Better handle BaseException in Worker
0.31.0: Same as 0.30.0
(We needed a new version number for administrative reasons)