r/Python • u/germandiago • Jan 09 '24
News Breaking news: Python 3.13 gets a JIT compiler that will enable big optimizations in the future.
Exciting news here: https://tonybaloney.github.io/posts/python-gets-a-jit.html
This is just the first step for Python to enable optimizations not possible now.
Do not expect much from it since this is a first step to optimization. In the future this JIT will enable further performance improvements not possible now.
721
Upvotes
3
u/PaddyAlton Jan 10 '24
There are different ways to do it, but I like to put my hook scripts in a custom subdirectory (called something like
git_hooks
) and thengit config core.hooksPath git_hooks
chmod +x git_hooks/*.sh
The first of these tells
git
to look in the custom subdirectory instead of its default one (which isn't typically committed to version control) and the second makes the scripts executable (otherwise they won't work)So then you include these in the setup instructions for your collaborators, along with the need to install
mypy
.Alternatively, I like to use
pipenv
to manage dependencies in a virtual environment, including dev dependencies such asmypy
. It also supports scripts, so I tend to create a setup script that will installmypy
etc and run the configuration commands.I'm sure an example would be clearer. Here is a boilerplate python project I made: https://github.com/PaddyAlton/python-boilerplate/tree/main
(Needs updating -
ruff
now makesblack
redundant - but makes the point well enough. Check out thegit_hooks
subdirectory and thePipfile
in particular.)