Their continuing practice exercises seem to emphasize the smallest tripping factors, but I guess that will be useful if I'm ever paid to use these languages for data analysis.
That's a frequent thing on their courses, but I've never encountered it with #Coursera or #Udemy or #Udacity or #Linda.com / #LinkedInLearning. It feels like they're intentionally tripping me up with gotchas.
#Raku is a descendant of #Perl (same creator; indeed Raku was originally Perl6, but by the time it was released, most people were aware it was a completely different language, so they eventually changed its name).
I've pretty much not used Perl in twenty years (I used it once in a project at work about 18 years ago, as part of a report processing pipeline, alongside #Python, Windows #Batch, and #KiXtart), so the demo programs seem to have purposes that are too large for language starters. I feel like it is supposed to glue itself onto "oh, I know that from Perl!" memories, but I don't remember Perl.
What I remember most was that I liked it a lot when I learned it (college class), but as soon as I started trying to use it in real life I found that "there's more than one way to do it" equals "write once, read never". I used it in that pipeline because it excels at what I needed it to do (text processing) which helped take an ever-growing log file and find relevant events from the past day ... and because I knew the script would never need to be edited.
Worked like a charm, except it's called DefaultMeta now.
from flask_sqlalchemy import DefaultMeta, SQLAlchemy
db = SQLAlchemy()
Model: DefaultMeta = db.Model
And then import this Model and replace db.Model with Model everywhere.
With this mypy keeps working as you upgrade from flask-sqlalchemy 2 to flask-sqlalchemy 3. I haven't verified that the typechecking still detects type violations, only that it passes on our existing valid code.
ChatGPT devs discovered a vulnerability in the redis python library that could confuse query replies between connections, leaking ChatGPT history and ChatGPT Plus subscription data between users.
A fix was issued which would instead accidentally break connections. A partial fix for the fix has been issued.
Back in June pip-tools v6.8.0 added support for the 2020 pip resolver with pip-compile --resolver backtracking and today we had a thorny dependency issue that needed it.
> Changelog (cryptography.io/en/latest/chanβ¦): * Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.0.7, which resolves CVE-2022-3602 and CVE-2022-3786.
Physically present #PyConHK is tomorrow, October 29th 9:30β17:30, in North Point, The Hong Kong Federation of Youth Groups Building.
Tickets start at 148 HKD for students and academic staff, 398 HKD for the rest of us. Free tickets available for those who cannot afford a ticket, but it's not clear what the criteria are.
The reported DoS "vulnerability" is in pylib's 18 year old SVN handling (py.path.svn*), which is not used in pytest, nor anywhere else to our knowledge.
Instagram's concept of strict Python modules and strict functions allows modules to be reloaded in a safe way and reduces startup times in a complex codebase, in addition to just the enhanced ability to understand the code because you know there is nothing fishy going on when you're simply importing a module.
Yes! Finally moving one of our applications to Python 3.8.
We're encouraged to by CVE cve.mitre.org/cgi-bin/cvename.β¦ , as the numpy versions that still support Python 3.7 are all affected.
Luckily for this application it's a smooth upgrade. We have a bigger project where I want Python 3.8 for Protocol support, and that one is not as smooth. We need to figure out a few things that break in Python 3.8.
It's super weird to me why it works to have a `--constraint requirements.txt`in your requirements-dev.in, but not to call pip-compile with a `--pip-args "--constraint requirements.txt"`. The two should be equivalent.
We just moved our stuff from .in files to pyproject.toml and we're retaining a silly stub file with just the constraint argument due to this.
setuptools 60.9 vendors importlib-metadata and it may clash with the importlib-metadata you have installed because apparently it does monkeypatching (eww, is this python or ruby??).
If you are running into errors like:
.../site-packages/setuptools/_vendor/importlib_metadata/__init__.py:886: in find_distributions
found = self._search_paths(context.name, context.path)
E AttributeError: 'str' object has no attribute 'name'
that's because the installed importlib-metadata calls a method on the vendored importlib-metadata (why??) that has a breaking change in the argument types.
Your fix is to bump the version of your installed importlib-metadata.
The most interesting feature included is PEP 622 -- Structural Pattern Matching https://www.python.org/dev/peps/pep-0622/ , similar to Scheme's (match), but a bit less powerful and spelled in Python. That's worth an #HPREp.
The most interesting feature *not* included was PEP 563 -- Postponed Evaluation of Annotations https://www.python.org/dev/peps/pep-0563/, which was slated for inclusion but was pushed to 3.11 to sort out some details regarding libraries like Pydantic that rely on reflection on declared types.
Looking for a hostable #pastebin for longer-term pastes. #PHP or #Python preferred. Definitely not Node.JS (so Hastebin is out, even though it otherwise looks impressive).
We already have a PrivateBin for short-term pastes, but it has no concept of membership, and I really want this one to be primarily for !fnetworks members' use.