#off-topic

1 messages · Page 1 of 1 (latest)

hexed briar
#

Well... While I agree on the later... I'd prefer pip-tools doing a subprocess call to pip instead of hacking into its APIs. :)

onyx sphinx
#

How about a new package named something like "pip-api" that provides access to select internals

#

And then you can have a lite compatibility policy on that

hexed briar
#

I take it that you haven't ever looked up that exact name.

#

:P

onyx sphinx
#

I've not

hexed briar
onyx sphinx
#

Yeah I saw it now

junior narwhal
#

what's the benefit/use case now that pip can do more things like resolve?

hexed briar
#

pip-compile generates a lockfile and pip-sync matches an environment with the lockfile.

#

You can't do either with pip directly.

onyx sphinx
#

Is pip resolve deterministic when you only install wheels?

#

iff deleting artifacts were banned and you had a timestamp of the resolution you could rebuild a lock file from an .in file and some sdist deltas

#

Then that gets you multi-environment lock files

boreal bramble
#

there's also a pip-compile like app that uses poetry to generate requirements files instead

#

and can generate those properly with cross-platform environment markers using metadata

onyx sphinx
#

Yeah I've got one of these as a bash script

#

But ideally I'd just keep an index timestamp and then store deltas from a deterministic resolution

junior narwhal
#

does anyone know what this is referring to? I can't find much https://groups.google.com/g/django-developers/c/_bublVB5dcw/m/v20wW_4sAQAJ

I am referring to the multiple occasions on which black's approach to packaging caused installation of the package, via pip, to fail in often mysterious ways.

This is something that's documented in the history of their issue tracker, and that the maintainers have since apologized for and adopted policies to try to prevent in the future.

boreal bramble
#

maybe something to do with the setuptools-scm extension?

#

There were some bugs related to that due to lack of pins of setuptools-scm version in the build-system.requires on black's side

#

and it's really annoying because user cannot do anything about faulty version of build tool being pulled

#

or maybe there is a way (I honestly don't know) but it is not easy to find

#

Technically a non-issue as long as you use wheels but I guess there can be scenarios where you have to use sdist and therefore actually build during instalation? I don't know.

#

There's also another thing with Black being lenient about its own dependencies such as click which makes it possible for it to not work properly once a major update is released. This is done because while Black is an app, it's often installed as part of dev requirements of the package and so it has to be compatible with package's own requirements.

#

But I don't know if that really applies to the problem they're describing

west basin
#

black uses setup.py configuration so the whole premise that black is an early adopter of new packaging "things" is bogus

silk jungle
#

I think they're referring to the fact black was an early adopter of the pyproject.toml file which caused pip to enable the new build flow which caused some breakage for projects using black

#

black was never particularly modern in terms of how it's packaged though so not sure what they mean either

desert verge
boreal bramble
#

Things like that happen sometimes. It's not feasible to make a new release any time new version of a dep comes up so that you can mark Black as compatible with it.

#

And this was not even a major version bump for which the often used restrictions on major versions would work because it broke due to usage of some private attribute in click.

#

Truth is that the user is the one that should be locking requirements if they want to ensure that their thing continues to work.

fierce horizon
# boreal bramble Truth is that the user is the one that should be locking requirements if they wa...

Doesn’t help that there’s no lockfile standard. I wonder what can get that discussion unstuck: https://discuss.python.org/t/pep-665-take-2-a-file-format-to-list-python-dependencies-for-reproducibility-of-an-application/11736/143

dreamy hatch
onyx sphinx
#

how do you all manage your 2FA recovery keys? I've always just put them in my password manager but that strikes me as defeating the point? But now I don't know where else to put them

ionic tulip
#

depending on the password manager, putting them into a different location/vault may be a option

onyx sphinx
#

does the recovery key work without a password reset email?

upper hill
#

Rust is to modern for me

#

I'm bash boring

silk jungle
#

I'm finally learning C

upper hill
#

I've actually learnt rust

#

Hurt my old ass head

silk jungle
#

Rust is for next year 😄

junior narwhal
#

Rust makes me excited again

upper hill
#

And lots of rust for $work

vast wren
#

you don't need to learn rust to use starship FWIW

#

it's just written in rust

silk jungle
upper hill
#

Why do you want to learn C?

silk jungle
#

I'm bad at finishing projects 😅

upper hill
#

Just interested

#

Not saying it's bad etc. etc.

vast wren
#

C is bad, but it's useful to know 😛

silk jungle
#

I've been contributing some minor patches to mypyc, but I haven't contributed anything major yet, would like to change that eventually

#

C CPython Extensions are cool

junior narwhal
#

every new hire, embed, or intern on my team I have install Rust then use Cargo to get ripgrep, bat, tokei, etc.

#

& we don't use Rust lol

vast wren
#

I mostly refuse to use cargo as a generalized package manager, I use Brew Linux for the most part lol

silk jungle
#

I just stick with ubuntu's apt

#

and manually compile CPython, I am yet to use pyenv 😅

junior narwhal
#

seeing successful builds produce a cli on PATH makes ppl happy though

silk jungle
#

I'm still annoyed we didn't catch the busted try except

junior narwhal
#

pyenv

that one tool has caused me so much grief over the years debugging others' issues

silk jungle
#

I've heard of lots of happy users ¯_(ツ)_/¯

vast wren
#

I switched to use asdf and direnv

#

asdf uses pyenv under the covers, but with direnv it doesn't pollute your path

#

which is mostly the problem with pyenv/asdf, is the swrapper scripts are really slow

north basalt
#

*asdf uses python-build

silk jungle
#

I just stick to a single virtual environment name venv and then have a actenv shell alias

north basalt
#

that being said what pyenv does is very simple and issues relating to it are usually user error

#

(granted the mental model is not 100% what people intuit which is where a lot of pyenv confusion comes from)

silk jungle
#

I'm one of those people who likes to keep things quite simple

vast wren
#

uh, I don't remember numbers, it was really noticeable if you used python in your prompt afterwards

#

the problem is the stubs do a bunch of work to determine what version of python should be used, including abunch of stat calls

north basalt
#

that's fair

#

in my prompts I go to major efforts to use built-ins and very fast to start binaries only (e.g. tmux-cpu-mem-load)

vast wren
shadow zealot
#

I’ve been looking into Zig. Still quite unstable (you basically always want to use HEAD instead of an actual release…) and lacks a dependency management story, but pretty easy to learn and still useful in certain contexts (e.g. writing CPython extension)

boreal bramble
#

pyenv is pain in the ass when it comes to installing it and that caused us so many grievances in support channels 😄

#

probably not the best case for using pyenv, the upside of it is that it streamlines the build process

#

I've never personally used it because it doesn't really solve any problems for me, I prefer to just use Python shipped with apt

shadow zealot
#

pyenv is overkill (and just brings trouble) if your just want a Python somewhere

boreal bramble
#

along with Anthony's great deadsnakes repo

shadow zealot
#

It contains a command called python-build that is extremely useful for this use case though, it’s unfortunate very few people know about it

boreal bramble
#

Hmm, that's standalone?

shadow zealot
boreal bramble
#

I don't think it's probably worth my effort to switch the remaining documentation to use that but good to know in case I need it in the future 😄

#

like, the only remaining documentation that uses it is CentOS 7 and Debian/RPi OS 10

#

hopefully there are not many users running those OSes nearing their EOL

shadow zealot
#

A lot to worry about for those systems, installing Python is probably the easy part hah

boreal bramble
#

I mean, once you have Python, you just run the app so

shadow zealot
#

Yeah I meant they probably have more pressing issues than to run a Python app :p

boreal bramble
#

a lot of our users are not very technical so they might not even be aware of those pressing issues though 🙃

#

but yeah, you're right

#

I like my current setup which is .venv being a symlink to .venvs/3.7 or whatever Python is the the minimum supported version

#

I also am curious what tools I'm going to break by using a symlink

shadow zealot
#

Likely none, virtual environments (on POSIX systems at least) rely a lot on symbolic links in the first place

#

Your .venvs/3.7/bin/python is a symbolic link

boreal bramble
#

I know, doesn't mean that there can't be tools out there that wouldn't expect the dir to be a symlink :P

#

I guess symlinks are pretty transparent so maybe nothing will break but it is a bit untypical setup so I sort of expect there will be some tools that did not handle such edge case lol

vast wren
#

I don't use apt based Python because apt is for packages I don't care about, and also it's very useful to have the ability to test spefici patch versions

boreal bramble
#

yeah, I don't have a use for that myself but testing specific patch versions definitely is a very good feature

#

For me apt is for packages where I don't care about having all the latest features. Python technically doesn't fall into that but deadsnakes mostly solves this

#

though the Python shipped in Canonical's repos generally doesn't have the latest patch

#

they only cherry-pick some fixes

silk jungle
#

I've moved #pycon-us-2022 and #resources into their own "archive" (read-only; reactions still allowed tho) category since a) they aren't needed anymore and shouldn't get new messages, and b) for #resources specifically, it got pretty off-topic and the name is kinda meaningless now 😅

#

We could delete / hide them to normal users fully, but I didn't want to delete message history without asking for input so that's why I just chose to move them down and mark them as read-only.

lofty nexus
#

Hello! I'm looking into an alternative solution for mirroring pypi in an offline development environment. Bandersnatch has worked for us for the last 4 or so years but lately it's been more difficult for us to maintain. I'm wondering if there is an avenue to purchase a harddrive(s) that contain the mirror and who I could get in contact with?

quartz yew
#

I'll be in london next week (flying in tomorrow), if anyone wants to have a beer/coffee, let me know

hexed briar
#

Oh hey, I'll be around.

hexed kindle
#

Has anyone managed to redeem the titan promo code?

#

google just tells me the code isn't valid

quartz yew
#

you need to order 2 IIRC

hexed kindle
#

indeed, that works, thanks

#

it still wants a credit card though, and I don't have one

#

oh well..

onyx spindle
#

try normal debit card

hexed kindle
#

that requires the official banking android app, which doesn't work on lineageos sadly (but thanks for the tip)

#

got it working with a different phone now

#

thanks everyone

silk jungle
#

I'll file a PEP 541 request if I don't get a response in a few days I guess, I don't believe I should have to actually wait six weeks so the (lack of) reachability requirement is fulfilled given the circumstances here.

junior narwhal
#

is this just for CI?

silk jungle
#

i.e. I'm upstreaming the mypyc wheel workflow I've been running in a personal repo for the past few months

junior narwhal
#

I just switched to devpi in ci

silk jungle
#

Well I want to be able to download after the fact too since I don't have access to a machine running macOS

vast wren
#

devpi lets you download too 😛

#

testpypi is terrible at everything people use it for

junior narwhal
silk jungle
#

Uh, presumably I'd have to host my own copy of devpi somewhere?

vast wren
#

Yea, or run it in CI and attach the final artifacts to the CI job

junior narwhal
#

use artifacts ^

silk jungle
boreal bramble
vast wren
#

what case is that

#

because it's probably bad for that too 😛

boreal bramble
#

Making your first package or sth like that

#

That's like the only time I used test pypi

silk jungle
vast wren
#

I would just teach pypi to understand name spaces or something and just let people use that, or maybe a ephemeral flag you can pass when you create it that'll auto destruct it in 12h or something

#

or both

silk jungle
#

I was hoping to use TestPyPI to also host the experimental wheels so I could bug the rest of the core team to test out the wheels

boreal bramble
#

The problem is that you can't re-upload using the same version number

vast wren
#

TestPyPI's original purpose was a staging environment for PyPI, because PyPI had no tests and didn't really run locally at all, we don't use it for that anymore though

#

so it's just kind of there

#

being bad at things

silk jungle
#

like I was planning to use 0.0.1 or something

boreal bramble
#

That was actually to Donald

#

Like, when I first made a package i didn't really know how all that works so I needed to upload my 0.1.0 a few times probs

silk jungle
#

this is technically what post-releases are for, but yeah testpypi sucks right now lol

boreal bramble
#

You can't reuse numbers on test pypi either but once you figure it out, you can just do it cleanly instead of already having alpha number 5

#

I also have no clue what my password on test pypi is, I literally only used it for my first package ablobsweats

#

I'm surprised to learn it's not in my password manager, maybe it was before I started using it

vast wren
#

It's also near impossible to use testpypi safely unless you're super careful, since there's no guarentee that a name on testpypi maps to a name on pypi, and lots of people just do stuff like pip install --extra-index-url https://test.pypi.org/simple/

#

hope whoever has urllib3 or something else fun on test pypi is nice :V

boreal bramble
#

That seems overly optimistic

#

This Seth guy must be shady /s

silk jungle
vast wren
#

you can kind of get around it using uh

#

--find-links https://test.pypi.org/simple/black/

boreal bramble
#

Isn't that what extra index url option is for

#

Like, the primary index is still the main one

vast wren
#

the problem with that is you're just hoping that all your deps are registered by people who aren't malicious

shadow zealot
#

There is no such thing as the “main” index, all indexes are equal

silk jungle
vast wren
#

yea

#

I agree

boreal bramble
vast wren
#

test pypi bad

silk jungle
#

I guess it's a tiny bit more streamlined

vast wren
#

let's get rid of it

#

🙂

silk jungle
#

lol

boreal bramble
#

The idea that is lmao

#

Not the test pypi

shadow zealot
#

The ordering logic is probably not what you expect

vast wren
silk jungle
#

ah supply-chain attacks, our good ol' pal

vast wren
#

pretty much test pypi still exists because there is still some use cases that it's slightly better than nothing for

boreal bramble
#

Time to rewrite packaging tutorial to use the simple pypi server package

vast wren
#

and people yell a lot when we delete things

shadow zealot
vast wren
#

it should

#

pretty sure the only thing we check is no local versions and valid pep 440

shadow zealot
#

So at least an attacker can’t release 1!0.0.0 and trump any version on PyPI

vast wren
#

they can do that

#

unless you mean permanetly trump

#

or something

#

I wonder if anyone has ever actually used epochs

#

to psql!

shadow zealot
#

Yeah I mean it wouldn’t cause as big a problem as… well something else

boreal bramble
#

Welp, at least the packaging tutorial uses --no-deps

shadow zealot
#

My employer (Astronomer) uses epoch to ensure our commercially maintained Airflow fork is distributed to the customers

silk jungle
#

'cause people already do that on the main pypi

vast wren
#
warehouse=> SELECT COUNT(*) FROM releases WHERE version LIKE '%!%';
 count
-------
   210
#

neat

boreal bramble
#

In general, not with test pypi specifically

silk jungle
#

they seem like the sort of people who'd yell the most if testpypi got rm-ed

shadow zealot
silk jungle
#

fair counter-point :p

boreal bramble
vast wren
boreal bramble
#

Okay, I don't actually know if black on test pypi is junk lol

silk jungle
#

it's not, just really outdated lol, 18.9b0 or something

vast wren
#

amazing

silk jungle
#

ah the joys of versioning😆

vast wren
#

reminds me of TeX

#

In his seminal text layout system, TeX, and his equally brilliant typeface design system, METAFONT, Donald uses a versioning number system that asymptotically approaches perfection. The version numbers of TeX approach π (the current version is 3.14159265) and the version numbers of METAFONT approach e. It has been prophesied that the last change not be made until after the day Donald ascends to heaven on a shining cloud. At that point, Donald will make one last ssh connection down from heaven to his server at Stanford University and set the version number unto π exactly. At that point all remaining bugs will be declared features, and the output from TeX will remain the same for all eternity.

#

(Donald Knuth obfc, not me)

silk jungle
#

what the-

silk jungle
#

TIL GHA runners come with pipx pre-installed, such a nice little QOL improvement 😄

onyx spindle
#

They also have gh CLI installed, but I guess it’s more common knowledge than pipx (makes me wonder if they detect languages of the project or just throw tooling for every language they can)

onyx spindle
#

So basically they just have it all. Makes sense

junior narwhal
#

my goal is after 2 more features to get Hatch on there so OOTB you have building, env management, publishing, etc.

desert verge
#

honestly, i'm not sure that's a great decision

#

these versions are typically pinned, not updated often

#

nvm i'm wrong

timber sphinx
#

How much do you trust software maintainers? 😆

junior narwhal
#

a lot actually! maybe too much

silk jungle
#

turns out compiling CPython with -O3 and LTO while trying to answer SO questions is not a great idea, my laptop has turned into a potato

muted whale
#

@vast wren @onyx sphinx @fierce horizon @boreal bramble @shadow zealot @onyx spindle @quartz yew Continuing the discussion over here as requested by @hexed briar ...

FWIW, I know @fierce horizon will disagree, but I'm actually not personally into the "all config in one file" approach myself (though I certainly respect why others do), nor do I actually disagree with Anthony on many of his other more controversial design decisions—I'm actually a big fan of many of his projects. However, what does deeply trouble me his long, repeated and unrepentant history of hostile, even vengeful interactions toward others in the community, not only people like us but the many newer contributors who may never return at all because of it, and the fact that behavior is condoned and rewarded (e.g. PSF fellowship) which normalizes it and encourages other maintainers to behave likewise.

I haven't had any direct interactions with them personally, so take this with a grain of salt, but I have heard from a number of other people that they've had very negative experiences with Sigma, and I also recall them being banned from another org due to repeated CoC violations, but unfortunately I can't recall the exact details. However, they seem very like-minded to Anthony.

At the end of the day, if the keyholders of the PyCQA and the community disagree on what's reasonable, there's not much that can be done except for the community to stop using PyCQA projects and create their own alternatives, and stop providing space for them.

@vast wren I've actually considered this myself, as have others, but the problem with this is that when people have tried to fork his projects in the past and maintain them separately under a different name, with appropriate licensing and attribution, Anthony has resorted to legal threats, bullying and a coordinated smear campaign to intimidate them into not doing so.

onyx sphinx
#

Oh this is the before-commit fork?

#

Well now I'm blocked on Twitter I think for liking @hexed briar message

#

I also didn't know how many people were being blocked by sigmavirus24 and Anthony from the pycqa

boreal bramble
#

Since this is off-topic channel anyway, I'd like to state I don't really care about all config in one file that much either 😄 I don't agree with all of Anthony's takes but in this case I certainly find it a compelling reason against supporting pyproject.toml as the only format if it forces the build isolation on you. I'm not saying pip should be doing it differently but I understand why flake8 doesn't want to switch to it due to this.

#

I only joined in the conversation because I was surprised to see getting blocked by Anthony on Twitter

onyx sphinx
#

I think the config thing is a red herring

hexed briar
#

It's not forcing build isolation on users -- it's users who already have that, who'd like to keep configuration in the same file. Besides, the plan is for pip to enforce build isolation always. The only blocker is that I've not finished the build isolation cleanup yet, that would let me make that unconditional in pip.

quartz yew
#

FWIW I completely understand the flake8 config issue, and think his position is reasonable. IMO pip shouldn't be switching the build process by the mere presence of the pyproject.toml file, only if the build backend table is set. So yeah, I have no problem with that. As I said before, the actual issue is how he interacts and deals with people, which IMO is kinda toxic and is definitely not creating an open and respectful community.

boreal bramble
hexed briar
#

(FWIW, I agree that presence of pyproject.toml shouldn't force this either, but the ship on that sailed... years ago -- and I pushed for it to be different even then)

boreal bramble
#

if it were about adding it as second format (which is maintenance burden they don't want and that also seems reasonable) then that would be a different argument

#

but yeah, the config thing is a red herring but it's #off-topic so I off-topiced the off-topic

#

:)

hexed briar
#

touché

vast wren
#

not forcing build isolation means that flake8 would have to support 2 locations indefinitely

#

but I agree it's a red herring 😛

onyx sphinx
hexed briar
#

Well, I'm pretty sure we'll force build isolation on everything sometime in the near future. 🤷🏻‍♂️

onyx sphinx
#

@kindred pivot cc

onyx spindle
hexed briar
onyx spindle
hexed briar
#

Ah, right. There's a bunch of folks who've written these at various points.

boreal bramble
#

It's always interesting to see tools so close to Python but written in non-Python languages. pyright surely comes to mind

vast wren
boreal bramble
#

I mean, Python AST parser written in TypeScript!

hexed briar
boreal bramble
#

I find it fascinating

hexed briar
#

I know Donald and Nathaniel had worked on Rust-based Python packaging tools, at different points in time.

vast wren
#

I have a half done reimplementation of pip in rust 😛 well, not exactly a reimplementation of pip, but something in the same space

boreal bramble
#

I honestly think that pyright needs more community awareness

#

because when you think of Python typing you think mypy

hexed briar
hexed briar
vast wren
#

it's attractive to write it rust less for speed, and more because it produces a static binary that operates independently of python

boreal bramble
#

I mean that Python community should be made more aware that it exists

#

and is actually a very good tool

onyx spindle
hexed briar
#

Which would be great, if Python freaking had a good upstream distribution story, where you could just unpack and use it. :)

vast wren
#

pyoxidizer is pretty cool

muted whale
# boreal bramble because when you think of Python typing you think mypy

Well, that's good, because its a non-Python tool specifically built for a particular corperate-backed non-Python IDE that already gets plenty of use built right in. Versus MyPy is the only community-developed alternative in that space (the other three are all built by the big tech giants) and is seriously constrained by lack of resources.

hexed briar
boreal bramble
muted whale
#

Because it doesn't have a big corporation backing it that can use it as leverage to monopolize the editor/IDE space, and then extend and extingiush with the proprietary-only Pylance

#

(/rant)

boreal bramble
#

I don't have a better way of phrasing this but it can make people think Python typing in general is worse than it is. I know there are mypy maintainers here so I just want to say that this is not your fault, you don't have the funding that Microsoft can offer.

hexed briar
#

There's a lot of well-justified skepticism toward pyright.

#

Not least because it's a corporation-backed OSS project.

muted whale
#

Each of the big giants funds their own tool instead, leaving MyPy with the crumbs. Corperate-backed tools are an important part of a healthy ecosystem, but so is a viable community alternative. Same thing with community FF vs Big Tech-controlled Chrome, Edge and Safari

boreal bramble
#

my problem is that people are simply not aware that anything but mypy exists

onyx spindle
boreal bramble
#

or dismiss pyright outright because it's not written in Python

muted whale
#

Its simply not healthy for anyone if one tool leverages integration with others to become a monopoly/monoculture, e.g. Windows with IDE, Google with Chrome, Windows with Word, VSCode with Pyright

boreal bramble
#

pyright is a standalone tool. VS Code ships pylance which uses pyright.

onyx spindle
boreal bramble
#

pyright is OSS too

#

pylance is not

muted whale
#

VScode is by far the most popular editor/IDE in Python, see the latest survey. Only PyCharm, with their own proprietary type checker, even comes close. Therefore, Pyright already has a big built-in userbase without users even knowing it

hexed briar
#

Besides, it's an important bootstrapping concern. pip install pyright isn't owned by Microsoft, and... it's readme has this wonderful snippet:

This project works by first checking if node is in the PATH. If it is not, then we download node at runtime using nodeenv and then install the pyright npm package using npx.

#

(granted, that's how sphinx-theme-builder works)

silk jungle
hexed briar
#

Yup.

silk jungle
#

nodeenv or whatever it's called

hexed briar
#

pre-commit uses nodeenv as well.

muted whale
#

The reason MS created Pyright when Pytype, Pyre and MyPy already existed was so they'd have control over it and be able to bundle it with VSCode, and by extension Pylance, which is proprietary and they can then lock people in to and upsell. If one tool, especially corperate backed has dominient marketsthare, they can dictate standards by fiat rather than communiy consensus. Just like IE in the old days, and Chrome now. Pyright already has a massive built in advantage over every other type checker, we don't need to give them free advertising to push them even harder.

#

Anyway, I rest my case

hexed briar
# muted whale VScode is by far the most popular editor/IDE in Python, see the latest survey. O...

Yup, and last I checked, pylance is built on top of pyright because they wanted something that they could pull into a VS Code extensions more easily and make changes in a codebase they control unilaterally.

Pyright is an open source project with it's license. It's not a project that has multiple stakeholders deciding its directions though -- just one: Microsoft. They have, somewhat famously, pulled amazingly stupid things around what they provide in a proprietary tooling vs OSS code.

hexed briar
muted whale
onyx spindle
#

I wonder how much better mypy could be if instead of competing with it, companies like Microsoft would put people to work on it

boreal bramble
# muted whale VScode is by far the most popular editor/IDE in Python, see the latest survey. O...

I'm looking at it from the angle of people that are looking to type everything. Especially library devs who often have more complicated code bases to allow user's codebase to be simpler. Typing in general has some shortcomings already but then you get more of those piled on as you try to get your to be fully typed and compliant with mypy. Very often you'll end up on a bunch of issues that have been unresolved for a long time (not mypy's fault but it doesn't change how user will perceive it) and then you get the general opinion of "Python typing sucks".

muted whale
#

I don't mean to bad-mouth the Pyright devs at all, and I'm sure its a great tool, but I'm concerned about the externalities and the long term effects on the ecosystem. Just like we all saw with IE, and just like we can see right now with Chrome

hexed briar
hexed briar
muted whale
hexed briar
#

But there's no incentive for a for-profit corporation to do that.

muted whale
#

Exactly. Whereas they know how much even a relatively small investment in Faster CPython (just a couple devs) will save them millions of dollars of server time, plus generate a lot of goodwill

#

Without having to maintain their own fork like cinder, nogil, e tc

boreal bramble
hexed briar
#

re Faster CPython: It's a team of 5+ people and a manager, and the entire chain above that -- it's a decent number of people, not "a couple"

boreal bramble
#

lol

muted whale
boreal bramble
#

but this is not the problem of not following standards

muted whale
#

The free market only works if you are free to choose alternatives

boreal bramble
#

pyright follows standards

#

mypy just doesn't have the capacity

#

funding, funding, funding :(

vast wren
muted whale
#

The limitation with MyPy is not will, its simply developer resources. But the risk is if any one corporate backed type checker, like Pyright, gains a critical mass, they can simply ignore standards deliberately and there will be little incentive to follow them

vast wren
#

Which the supreme court has upheld multiple times

muted whale
onyx spindle
boreal bramble
#

pyright already goes out of its way to make standards rather than do plugins like mypy for example

#

e.g. dataclasses typing PEP

#

I could just be naive though, perhaps they would simply ignore standards if they gained critical mass

muted whale
#

Again, I'm not arguing that they aren't doing so now, just like Chrome was at the forefront of pushing standards for a long time, but if any one tool gains too much of the market, especially a corporate backed one, there is the serious risk of them not seeing the value in doing so in the future. Not only that, but there's a strong incentive for other tools, applications, plugins, etc. to interoperate only with that tool, and not with the standards, if doing so is easier in the short term. We've seen exactly that happen with WebRTC, using Chrome's bespoke implementation rather than following standards, which is why stuff like Slack and many others only work with Chrome (and Chromium-based engines).

muted whale
vast wren
# muted whale I greatly simplified terminology, but a publicly held corporation does have a fi...

There's no law that requires "maximizing value to shareholders" either, corporate law states that CEOs and company directors must "act in the interest of the business itself", which is just about vague enough to mean anything at all (and in fact the business judgement rule pretty much means that as long as there wasn't a conflict of interest and the directors/ceo made a reasonable attempt to stay informed, that the courts will assume they were acting in the interests of the business itself).

hexed briar
vast wren
#

This is mostly important because I think letting companies hide behind "but the law say...." lets them scape goat the law 😛

#

They're making a choice to do X, there's no legal compulsion forcing them to

hexed briar
#

@muted whale I have a bone to pick with you -- why do I see that every conversation you're involved in ends up having a discussion about legality of things, or correctness of processes, or something like that? 😛

onyx sphinx
onyx sphinx
silk jungle
#

@onyx sphinx re. #general message what happened? I'm happy to chat in DMs if it's better that way. Curious since isidentical is a maintainer of black

#

(if we chat here, I'd suggest a thread as to not derail the main convo here)

boreal bramble
#

I'm still not convinced Wayland will outlive X11

west basin
# muted whale I don't mean to bad-mouth the Pyright _devs_ at all, and I'm sure its a great to...

funnily enough, I was discussing Pyright with attrs' devs earlier today: https://github.com/python-attrs/attrs/issues/996#issuecomment-1210715336

GitHub

The latest release introduced the AttrsInstance protocol with one attribute, attrs_attrs, which replaced Any in the signature of various core functions. The attrs_attrs attribute is &qu...

boreal bramble
#

plugins are a workaround, not a proper solution

#

they're specific to each type checker

#

I'm actually surprised at the "nobody uses mypy" bit, it really feels to me like the opposite is true.

#

I guess collectively with pylance that makes sense though

onyx spindle
west basin
#

well, creating a plug-in for attrs is a lot cheaper than extending the type system

#

to do it properly you are gonna need intersections for class composition and mapped types for the attributes, and I don't know what else

#

it's a process that's gonna take years

#

and that no one in their right mind is gonna take on without funding

muted whale
muted whale
muted whale
vast wren
#

plus it tends to be easier to make it look like you're doing something good if the share prices go up

muted whale
vast wren
#

(and then those priorities end up filtering down through the org)

muted whale
#

CAM Gerlach9960 I have a bone to pick

ionic tulip
#

IMHO Pyright upstreaming dataclass transforms has done immense damage

It's one of those working solutions that prevent good solutions

It added at least a decade to better programmatic type annotation lifting

ionic tulip
onyx sphinx
#

Ah markshannon's hygienic macros?

ionic tulip
junior narwhal
#

yay I finally got access to DALL·E 2

junior narwhal
#

trying to generate a logo for #hatch

silk jungle
#

that's adorable awwww :)

fierce horizon
#

yesssss 🐍

#

maybe also try to generate a more stylized version for favicon and similar uses

muted whale
timber sphinx
#

Cute!

junior narwhal
muted whale
# junior narwhal opened https://github.com/pypa/hatch/issues/419

There's one major barrier to this: the copyright/legal situation is very tricky https://www.technollama.co.uk/dall·e-goes-commercial-but-what-about-copyright . The actual copyright status of AI generated works is unclear and varies by jurisdiction; in some jurisdictions (like the US) it seems they may likely be public domain but there is no clear precedent yet; in others (UK and most EU) it seems they likely are copyrightable with the copyright falling to the image creator. However, on top of that, DALL E's ToS and policies attempt to use contract rather than copyright law to enforce themselves, and furthermore assert that if the images are copyrightable, copyright is assigned to them , but DALL E's ToS then assigns that copyright to them, with no clear (much less FOSS-compatible) license.

Therefore, this results in a potentially problematic situation using it with a FOSS project like this. If its included in part of a larger FOSS work, like a website, docs or particularly Hatch itself, it makes the license situation for the combined work more complicated, as its legal status varies across jurisdictions and there is no clear FOSS license terms, with OpenAI's contract law mechanisms being an additional potential problem for you (but not your users). Yet, in many jurisdictions others may be able to use it as their own with no attribution or even permissive license.

Note that the colored boxes on the bottom right is a watermark and must be kept I think.

I couldn't find any policy referring to the watermark in their various policies, and this thread https://www.reddit.com/r/dalle2/comments/wl4fwu/how_to_remove_the_dalle_watermark_guide/ states that they have explicitly stated that it is allowed. Furthermore, not being able to do so would be a very serious problem for using the image, since it would prevent you from knocking out the huge white BG, which would make the image useless as a logo in most contexts.

#

However, I myself am not a licensed copyright attorney, so I suggest getting some actual legal advice here from one familiar with open source

#

On a technical note, if you use it I also suggest palettizing it to ≈64 colors—this will avoid any fingerprinting they may be doing, and also massively reduces file size by nearly 20 times (!) (480 -> 26 kB, and that's not counting optipng optimization) with minimal visible quality loss except on the shell, which you could either accept or flatten to fit with the flat tone of the rest of the logo

dreamy hatch
hexed briar
#

@quartz yew Where does Arch Linux store its patches to pip and Python?

#

Or are there none?

quartz yew
#

we don't patch python, there's just a minor thing but that looks to me like an upstream bug

#

the only patch in pip is setting the debundled variable

hexed briar
#

Neato.

#

What's the rationale for Arch debundling pip again?

quartz yew
#

the guidelines say we should debundle dependencies if we can

#

there are many reasons I think, but one of the most relevant is to allow us to keep track of CVEs and be able to deploy security patches easily

undone sinew
#

Same rationale as Debian. After doing that for several years, we came to the conclusion that it wasn't true that "we can" (without a lot more volunteer time than it was getting)

onyx sphinx
#

What's the best way for a project to send a message to debundlers and vendorers

#

Also I've noticed a significant step change in communications from debundlers (distributors? What's the preferred name) in dealing with issues caused by running our test suites incorrectly

#

Like y'all now hide the tracebacks in little html Twistie buttons (which I didn't know you could do) and put a nice bit of flavor text and solutioneering

boreal bramble
#

I use Refined GitHub chrome extension which adds a lot of QoL improvements one of which is adding the button for this to the editor (unless that's a part of regular GitHub?)

onyx sphinx
#

And now it's like "hey we ported your project to 3.11.a2 and it sprayed an endless stream of tracebacks from the test suite, it seems to be an interaction with x and y" and followed by a per category series of tracebacks hidden in Twistie buttons

#

Then I can just say "oh that's a 3.11 bug" and rage close the ticket 😉

onyx sphinx
#

But still didn't know about this as like "a thing you could do". It's just plain html so I did know really I just didn't make the connection

boreal bramble
#

Huh, I didn't know this is just part of html

#

Maybe I thought it's a custom XHTML tag styled by GitHub's stylesheet? Idk lol

#

I never really thought about it

undone sinew
onyx sphinx
#

Yeah I guess that makes the most sense

hexed briar
#

Oh, Refined GitHub is awesome.

muted whale
#

Refined GitHub FTW...though to be fair, it has so many features it can do a ton of things I don't know about, and GitHub has also been (eventually) adding a lot of them to regular GitHub, like move tracking (finally).

onyx sphinx
#

It does freeze Firefox sometimes

#

Like it does a huge amount of crunching to make the blame view work correctly

#

But when you're looking at 10yo+ project that's been ported between 3 VCS it just grinds to a halt

muted whale
# onyx sphinx It does freeze Firefox sometimes

I have seen this, though on a pretty old downclocked laptop and on very large commits/PRs—though I can always temporarily stop it if nessesary, and I probably don't need all of several hundred individual features turned on, heh

onyx sphinx
#

Yeah don't avoid it because of the odd freeze

#

Just prepare for it and know it's worth it

shadow zealot
#

Hmm haven’t noticed it freezing up my Firefox. Maybe you could try turning off some of the features (I only have a small number of them turned on)

onyx sphinx
#

😦 but what if I miss a feature I didn't know I needed

boreal bramble
#

they have a cool find feature button

#

so you can just use that to figure out which feature is causing freezes

#

a'la git-bisect

hexed briar
#

The bisecting is somewhat fun too. :)

onyx sphinx
#

Ah great

boreal bramble
#

it used to not be under show debugging tools button and just shown without having to click

muted whale
#

It seems there isn't a #meta / etc. channel, so I'll ask here — <@&815744082823348274> s, have you thought about role tags for the PyPA project users are a developer of? That would be super helpful IMO for keeping track of who's who, who's the expert at what, and what perspectives people are bringing to the table in a discussion

silk jungle
#

I've thought of doing that and I'm in favour, but it felt wrong to just assign a role to someone without them knowing at all

#

I don't know why I didn't think to ask/let them know afterwards ¯_(ツ)_/¯

west basin
#

We have that, it’s just not been applied consistently

nocturne swallow
#

any admins can do that and I do encourage people to do so

#

currently any maintainer of a project is also admin, if I omitted someone let me know

west basin
#

Go for it @silk jungle :P

silk jungle
#

annnnd now the audit log is like 50% me 😄

#

anyway, I went down the list of PyPA projects that have a channel here and created a role for the project (maintainers) if there's at least one maintainer in this server. (i.e. I didn't make a role for #pyproject-hooks )

#

I cross-referenced the PyPA GitHub teams to figure out who is a maintainer of what, please holler if I got something wrong!

#

actually I went ahead and made a role for packaging too even though there's no channel for it here because I felt bad leaving Brett uncoloured :p

arctic copper
#

here is something I implemented for a single guild bot in a different community.

The roster gets updated if any role on the server changes (some gets a role, someone loses one, one is created), so it is always up to date.

Just to give you ideas maybe

Edit: Exporting messed up the formatting so I also grabbed a screenshot directly

silk jungle
#

are you suggesting a #info channel or something?

arctic copper
#

in the other guild it is a channel called Team-Roster under the Information-category, where no one except the bot has write privileges

muted whale
#

FWIW I'm not sure it would be necessary, since folks can just scroll the memberlist and see the colors, no? My original request was more about interacting with people in a discussion, when I can see their role directly. But that's just my personal take

silk jungle
#

I guess that could be useful for other PyPA members, but they should already have access to this information via GH (tbf they'd have to know/guess the discord account). For other users, I mean meh? It sounds like something that'd turn into regular users pinging maintainers for support

arctic copper
arctic copper
silk jungle
#

fair counter-argument :)

#

and fwiw we don't even have a bot for this server

west basin
arctic copper
#

you actually made me go through the image to find messed up chars, I guess you mean the anonymization 🙂

west basin
#

yeah, that character is Korean k

#

or were you referring to the blurred text?

#

I meant the ㄱ

arctic copper
#

ohhh, no, I actually played around with unicode chars, and must have selected a korean one.

I mostly used that char because it gives the impression of a isometric cube border in the discord UI.

You can see in the first image (the screenshot) how it looks in the app and not exported

#

Kind of ignorant of me, should probably change that, but interesting that this is up for a year now and no one said anything

silk jungle
#

YES 😛

hexed briar
muted whale
arctic copper
# muted whale Yeah...that would seem to be the main obstacle, unless someone makes a bot like ...
# via pygithub library
import github
from pprint import pprint

org_identifier: str = "I AM THE LAST PART OF THE URL OF THE ORG PAGE"

token = "GET ME FROM ENV-VARS AND DONT REALLY STORE ME HERE IN THE SCRIPT"

client = Github(token)

org = client.get_organization(org_identifier)
all_write_permission_per_repo = {}
for repo in org.get_repos():
    try:
        contributors = repo.get_collaborators()
        # get_collaborator_permission() just returns a string, which is in my opinion funny in an library like pygithub that has a million classes.
        all_write_permission_per_repo[repo.name] = [user for user in contributors if repo.get_collaborator_permission(user) in {"write", "admin"}]
    except github.GithubException:
        continue
pprint(all_write_permission_per_repo)
def get_all_discord_user_with_role(bot,guild_id:int, role_id:int)->list:
    guild = bot.get_guild(guild_id)
    role = guild.get_role(role_id)
    return role.members

# to assign a role
await member.add_roles(role_id, reason="For the discord logs")

# unassign
await member.remove_roles(role_id, reason="For the discord logs")

Only problem would be to associate the GitHub user with a discord user, but this could be handled, by having the bot just ask an Admin via DM for the users Discord-ID if the bot encounters someone he does not know.

Then store the GitHub identifier and discord identifier in a simple key-value thing (SQLite, json, maybe even just csv) and also use that thing to check if the bot already knows the user.

Then the discord part, get all user with that specific role, every user that has the role on discord but not on GitHub, loses the role on discord and vice-versa, if you want a snippet for the discord role assignment, I can post it, just let me know.

EDIT: added the discord interaction snippet, how to correlate a github user to a discord user is something that can be done in a lot of ways, so I did not add it here

silk jungle
#

good catch @errant spade , I somehow missed CIBW when assigning project roles 😅

junior narwhal
junior narwhal
#

he said as far as he understands it is actually fine 🎉

#

https://openai.com/blog/dall-e-now-available-in-beta/

Starting today, users get full usage rights to commercialize the images they create with DALL·E, including the right to reprint, sell, and merchandise. This includes images they generated during the research preview.

Users have told us that they are planning to use DALL·E images for commercial projects, like illustrations for children’s books, art for newsletters, concept art and characters for games, moodboards for design consulting, and storyboards for movies.

junior narwhal
#

someone from design ops at work is helping with logo checklist 🙂

hexed kindle
#

now I don't feel bad anymore that I disabled 2FA temporarily to get a free key 😛

junior narwhal
#

or rather, approve it says

quartz yew
#

it makes sense for people who had 2FA with an hw key, but not for just regular 2FA

muted whale
# quartz yew it makes sense for people who had 2FA with an hw key, but not for just regular 2...

Yeah, I don't really either. Like I said on the Discourse thread: https://discuss.python.org/t/fishing-attempt-pypi-package-validation/18450/8

How come maintainers of critical projects who have previously gone to the effort to enable 2FA (like myself) aren’t eligible for the free hardware security key, only those who have haven’t yet bothered to not do so? I know that wasn’t the intent, but it feels like it penalizes maintainers who take the effort to proactively implement good security practices while rewarding those who haven’t.

Additionally, especially if simply disabling 2FA after already having it enabled made the code show up as reported here (which I naively assumed it wouldn't), it actually created a perverse incentive for people to disable 2FA in order to work around the system and get a hardware key, which actually weakens security overall.

Also, the brings up a related concern of people just claiming the free keys and then selling them, giving them away or letting them collect dust and eventually enabling TOTP instead. Perhaps users who claimed that offer should be required to use 2FA with a hardware key once it starts being required, after a couple months or so, to ensure they actually use their key for their intended purpose?

boreal bramble
#

I don't think that's a good idea, I think it's great that PyPI managed to allow more people to see for themselves whether security keys are right for them but if it turns out they're not then not allowing to switch to TOTP would be annoying

muted whale
boreal bramble
#

I think it's possible someone will do this, I don't think it's that big of an issue

#

If someone already has a hardware key, they can claim another here too and then your solution wouldn't help either

#

and there must be some way to emulate a hardware key, right

#

people will always find a way to game the system

#

hurting fair players in the process is not great

boreal bramble
#

PyPI supports WebAuth so you can just use your phone as your security key

vast wren
#

we had a finite number of keys to give away, so prioritizing the people they'd have the biggest impact on (for some definition of biggest impact) was the motivation

#

since going from no key to u2f is a much bigger security win then going from TOTP to u2f

quartz yew
#

I suspect the people who didn't had any 2FA at all wouldn't care that much

boreal bramble
#

I think that getting free stuff is great way to convince people

#

people who didn't have any 2FA might not have known they can set up 2FA on PyPI too

vast wren
#

Maybe they wouldn't have cared, maybe not

#

it was a strategic decision to ensure the biggest impact first

quartz yew
#

I guess, but if they hadn't TOTP which is essentially free I think it is fair to assume they either don't care or think it's too much of a burden 😅

#

the jump to 2FA is big

vast wren
#

Dustin had been talking about relaxing it for a bit now, since we had plenty of token codes left over, and the phishing attack was just the final straw

quartz yew
#

that makes sense

#

and anyway, thank you so much for doing all that work

#

I was just nitpicking 😅

vast wren
#

(I had almost nothing to do with it besides shitposting on Twitter after the fact)

junior narwhal
#

would it be useful for PyPA members to have a 1Password team account?

vast wren
#

maybe on a per project level? I cant' think of any pypa wide secrets

nocturne swallow
#

API keys and role accounts kinda removed the need

boreal bramble
#

Ruff currently implements a small subset of flake8 rules

shadow zealot
#

I’ve never understood how those tools written in foreign languages (as in not the language used by the community they serve) sustain. Python tools already have few enough contributors.

boreal bramble
#

This project specifically is fresh out of the oven (like a month old) so I don't know if it will sustain. But tbh,as long as people don't burn out, you don't necessarily need that many, I guess.

onyx spindle
#

Flake by itself is not enough, real power is in plugins

boreal bramble
#

Rust is the next big thing so people using all kinds of languages are interested in it, I don't know how long that will work though :)

boreal bramble
#

I once looked through a lot of flake8 plugins but a lot of them are just wrappers of other tools and I don't need that

#

there seems like there's only a few that offer lint rules

#

flake8-bugbear

#

I feel like most people that use flake8 don't actually use any plugins aside from the default ones (pyflakes, pycodestyle)

#

not to say the plugin system isn't great, I just don't think it's required for most people to consider the new tool as a replacement

shadow zealot
#

as long as people don't burn out
Not something I’d bet my money on tbh. Implementing fast tools with foreign languages is definitely not a bad idea and I’d encourage anyone to try it out, but I’d caution against overexcitement.

boreal bramble
#

Well, I'm partially posting it here because of the debate we had about flake8 and its authors here not so long ago :P

#

and hey, gotta be excited about something

#

I do also wonder how some tools written in foreign languages sustain but to be fair, parts of the Python community have to know other languages anyway to say, write CPython, pyodide. These are of course much bigger projects so it's easier to find people interested but I don't want to cross it out just because of the language it's written in not aligning with the language it's written for

shadow zealot
#

I have high hopes in Zig, it seems like a language Python programmers can pick up fairly easily. But their packaging story is… well they have the excuse of being new.

boreal bramble
#

There's a lot of projects that go public too early and that's honestly my bigger fear for projects like this.

shadow zealot
#

Yeah same, I kind of sense some said overexcitement from the early publication which worries me

boreal bramble
#

A lot of Rust projects specifically suffer from this too 😄

analog oyster
#

ooo relevant convo. im building a package manager with rust hehe. but for fun really more than anything else.

analog oyster
silk jungle
#

k

#

guess who pressed Ctrl late >.<

west basin
#
$ black src/build/
No Python files are present to be formatted. Nothing to do 😴
$ ls src/build
__init__.py  __main__.py  __pycache__/  env.py  py.typed  util.py
#

I guess "build" is in Black's default excludes

dreamy hatch
junior narwhal
west basin
#

the new ideas forum on the Python discourse is even less pleasant than the mailing list it replaced

#

quite the feat

boreal bramble
#

I need to start following it lol

#

I'm only subbed to python-ideas mailing list

ionic tulip
west basin
#

does pylint have anything like eslint's shareable configs, or rule categories you can manipulate? It's got a horrific amount of rules and a lot of them are just noise. You could disable=all and then enable the rules which aren't purely stylistic one by one but I don't think there's enough hours in the day month

boreal bramble
#

You could enable all Fs and disable everything else for starters

#

And then go from there as the time goes

west basin
boreal bramble
#

Oh yeah, I meant all Es

#

my bad 😄

#

I confused the naming

#

Es are errors Ws are warnings, everything else is at least partially a convention

#

some of those conventions make more sense than others depending on what you're looking for really

boreal bramble
west basin
#

thanks 🙂

silk jungle
junior narwhal
#

so, I'm embedding on one of our Vector (Rust) teams for 4 weeks

#

is pure magic

#

puts everything else to shame

#

c++ in visual studio, pycharm, goland, everything

hexed briar
#

Oh yea, I love the IDE experience with Rust.

junior narwhal
#

ppl have been asking for monorepo support in Hatch

#

my plan now is to simply copy Rust's workspace concept

vast wren
#

rust workspaces are pretty good

junior narwhal
#

also I'm quite impressed by Clap (the Rust version of Click)

devout elbow
#

or use maven for inspiration. maven is boring tech but it just works.

silk jungle
#

This new GitHub search and file view UI is nice, but it's such a pain to get used to

#

I'm used to using the search box to jump to other repos, but now the command pallet is the only usable option

#

Also the new file view header consumes a lot of vertical space, wish I could hide it

junior narwhal
#

I shrink github with ublock origin custom css/js

#

filter:

github.com#$#body{ max-width: 1280px !important; margin-right: auto !important; margin-left: auto !important; }
junior narwhal
junior narwhal
desert verge
#

scroll down to the bottom of the left pane:

boreal bramble
#

They should add a way to hide it in the new code view

desert verge
#

oh wait, the vertical space

#

i got confused and was thinking of the sidebar

#

and the sidebar is hideable anyways (as i just learned)

boreal bramble
#

Opting out is meh solution if you enjoy at least some of the improvements

desert verge
boreal bramble
#

Sticky file header bothers me somewhat on mobile

#

But in general I like it

desert verge
#

but i like the new top header, its quite nice on long files to be able to see what file I'm currently viewing, or press blame/raw/copy raw

boreal bramble
#

I don't entirely like the new ctrl+f experience

#

I like the features but it feels slow

#

Anyhow, those kind of things should really be sent as feedback to GitHub

#

So they can improve some of this at least

desert verge
boreal bramble
#

The one built into browser?

kind moon
desert verge
#

no, there was a regexish search they had built in which it would default to when i used ctrl f

boreal bramble
#

That's in the editor

#

And is still a thing

desert verge
#

i swear it wasn't always the editor 🤔

boreal bramble
#

Pretty sure it was

#

But yeah, the code view's new search isn't as fast as the browser's one which annoys me but it does have cool features

#

I just wish it would somehow postpone loading them all until the base search happens to make it smoother or sth like that

#

I know I can still use browser search but I would prefer if I didn't have to do that for smooth experience

desert verge
#

fair

silk jungle
#

@cold estuary Is organisation billing for GitHub Codespaces enabled on the psf organisation? I'll probably try out Codespaces on psf/black, but I don't want to accidentally incur a charge on PSF's dime.

boreal bramble
#

hmm, I'm surprised they don't tell you who's going to be billed for the codespace you create, like at all

silk jungle
#

I guess this means my personal account will be billed?

kind moon
silk jungle
#

Would the organisation be billed if I simply create one without doing anything else?

kind moon
silk jungle
#

I'm just hesitant and prefer playing it safe since I am an (outside) collaborator on the repository.

kind moon
#

Ah, yeah, you guys are actually excluded by default

silk jungle
#

Also how does billing for forks of repos owned by an org?

kind moon
#

But this is all just my orgs, I have no idea what y'all've setup
If you want to be sure, then no harm in just waiting a bit

silk jungle
kind moon
# silk jungle Also how does billing for forks of repos owned by an org?

Usage of codespaces created from a forked repository will be billed to your personal account unless the upstream (or parent) repository is in an organization that has allowed you - as a member, or outside collaborator, of the organization - to use codespaces at the organization's expense.

silk jungle
#

There's no rush, my laptop is more than powerful enough, but I'm curious if I could use codespaces for when I'm not home.

kind moon
silk jungle
#

I initially read that as in anyone, member / outside collaborator or not, can incur charges at the org's expensive if the repo is owned by it

#

... which makes no sense now I think about it since that'd be highly problematic for public repos

boreal bramble
#

does it at least show that it will bill the org if you do it from here?

#

or is it inconsistent too

silk jungle
#

Damn, even the dual-core machine is 50% faster than my laptop (this takes a minute locally).

junior narwhal
#

Codecov has had so many issues for years. reduces my trust in Sentry tbh

boreal bramble
#

Immediately? They've just acquired it.

junior narwhal
#

it's the choice to acquire a team that hasn't been able to make their core product less buggy

onyx spindle
#

Maybe they plan on reworking the team? Add other people, shift focus?

junior narwhal
#

hopefully it improves 🙂

ionic tulip
#

I'm currently of the impression that sentry can turn it around, but it's going to be a tough pill of debt

west basin
west basin
#

But there hasn’t been a Python release with that change yet, it’ll be in 3.11.1

#

So someone who’s browsing the docs today will be misled (as I was)

dreamy hatch
#

ah right, I see the confusion. it even says 3.11.0 at the top

west basin
#

I think this is definitely worth a versionchanged note, people often browse the latest docs and will happily assume that it works in earlier (minor and major) versions

muted whale
west basin
#

well, I was mostly surprised that the change would be published, without realising that the Python docs aren't versioned that way.

muted whale
west basin
#

yeah, that's why my suggestion was to add a version note, unless you can think of a better way to handle this, without changing the docs "regime"?

fierce horizon
#

regarding coverage: per release notes, PEP 657 (improved error locations) will add the necessary info to get subexpression location into coverage data. That’ll make code coverage so much better once it’s implemented!

hexed briar
#

OK, color me impressed.

#

It's objectively wrong, but it did get the PEP number right.

#

And, it's possible to spoof it.

#

But still, that's cool.

#

(and it's not build metadata, though I understand the confusion)

muted whale
#

Is that GitHub Copilot or something?

#

Whatever it is, that's...pretty cool. But also a little creepy...

silk jungle
#

ChatGPT

muted whale
#

Ah, I actually tabbed over here to ask if it was ChatGPT instead

#

Had a brain fart there

#

That's very impressive, but that's the scary part—with human answers, you can often tell just by skimming it that an inaccurate answer is low-quality, as there are other signals that tend to correlate strongly with it—short, bad writing, wonky formatting, obvious mistakes, poor tone, and just overall pattern. But those written by ChatGPT tend to mostly lack those obvious signals, and the clues that they are likely inaccurate or generated by an AI are much more subtle, and I expect to see a proliferation of such misleading content on Stack Overflow and across the web on blogs and content farms that are already bad enough already. Which it seems is already happening on SO https://meta.stackoverflow.com/questions/421831/temporary-policy-chatgpt-is-banned?cb=1 .

The challenge is how to actually detect that an answer is written by ChatGPT...you almost need another NLP model for that, which could breed an AI arms race between generators and detectors.

hexed briar
#

Yea, I saw the ban and the most upvoted answer to that is a bit... eerie in terms of how good the generated responses are.

muted whale
#

Yeah, lol...

hexed briar
muted whale
#

Where I could see it potentially having value is partially automating the ceaseless task of asking issue reporters for more information and to try some basic troubleshooting steps, to then be escalated to a human

muted whale
hexed briar
#

We've seen increasing use of ChatGPT, a new chatbot, in our help channels. The use of automated tools is not allowed for producing answers in our help system. This includes chatbots, code generation tools, and copy/pasting answers from search engines (as an answer itself, obviously it's fine to include external sources as part of your answer). Our help system is not intended to be an intermediary between help seekers and an external platform.

We would also encourage people not to use chatbots on their own as an educational source; they are a text extrapolation tool and the semantics of their responses are only meaningful insofar as they're correlated with the semantics of the texts they've seen. We've observed answers from ChatGPT that are inaccurate, but which are presented as authoritative.

As always, our help system is intended for questions that benefit from dialogue. Rapidly responding to questions with links to Stack Overflow or documentation pages, without any question-specific guidance, is also a misuse of the system and will be considered spam.

#

(formatting was lost, and I dropped a couple of lines above and below)

muted whale
hexed briar
#

Yea. XD

muted whale
#

😂

hexed briar
#

I love how SO meta bubbles up an equal mix of (a) really smart replies or (b) really funny jokes.

muted whale
#

That, or if its a post about company stuff, like Articles™ or Collectives™ , everyone just goes to town on it.

west basin
silk jungle
#

It's terrifying in a way tbh

frank path
#

AI destroying civilization not with guns and bombs, but by dissolving our ability to rely on the accuracy of our written knowledge.

#

(And, to be clear, that's hyperbole, to serve the point)

junior narwhal
#

music is next

frank shore
#

I hope not! I wasn't impressed with ChatGPT's ability to help me write lyrics

ionic tulip
#

not sure if im relieved or terrified that country music will be the first victim hides

junior narwhal
#

when I have free time I wanna set up OpenAI's Whisper to increase my productivity (typing without auto-complete like here or Slack is really taxing on me)

ionic tulip
junior narwhal
#

woah their social card renderings are slick

ionic tulip
#

@junior narwhal nah. only medium, its accurate enough and the larger they are, the slower they run as far as i understood

junior narwhal
#

my entire life I've been frustrated with the accuracy of Dragon NaturallySpeaking

#

so just refused

ionic tulip
#

i can understand that, someone in a similar position onc showed me his frustrations in person, most infurating

junior narwhal
muted whale
# junior narwhal > music is next https://www.riffusion.com/about

To be fair, computers were doing that 65 years ago...https://en.wikipedia.org/wiki/Illiac_Suite

Illiac Suite (later retitled String Quartet No. 4) is a 1957 composition for string quartet which is generally agreed to be the first score composed by an electronic computer. Lejaren Hiller, in collaboration with Leonard Isaacson, programmed the ILLIAC I computer at the University of Illinois at Urbana–Champaign (where both composers were profe...

silk jungle
#

Technology is doing a 180 for artists. It removed the requirement to work a major enough label to help you produce and promote your track, with YouTube/SoundCloud/Spotify/TikTok kickstarting new artists left and right. Now it might be soon stealing the attention of consumers...

silk jungle
junior narwhal
silk jungle
#

for a second I thought you were saying I messed up really badly- 😅

onyx spindle
silk jungle
#

Black has no branch protection if you can believe it

#

I always worry when I push to main locally. I always run git push -u origin main to avoid pushing to upstream, but yeaa

kind moon
kind moon
#

Even I've done it
Get the protection rejection and oops, let me make a branch real quick

muted whale
# silk jungle Black has no branch protection if you can believe it

Is there a reason for that? I can totally see that different projects have different opinions on some of the different branch protection settings—some projects don't require checks to pass, some don't require at least >=one approval and some don't even require PRs at all and allow devs to push directly to main, which is outside the norm of what I'd be comfortable with personally either as a contributor or maintainer, but I could still potentially see some justification for it on a small project where it's the familiar workflow.

But I'm not sure I'm aware of any reason to not enable at least basic branch protection on your main branch, given all it prevents without enabling any of the individual options is force-pushing main or deleting it, which I cannot imagine you'd ever want to do (and you could always temporarily allow it if you did), and it only takes a few seconds to set up—click this link: https://github.com/psf/black/settings/branches , click Add rule, type in main and click Save at the bottom.

silk jungle
#

I've mentioned it before and the general sentiment from the others was that it wasn't necessary /shrug

muted whale
silk jungle
#

Last time it was discussed: #846434317021741086 message. In general I would be in favour of locking down access to potentially dangerous actions (setting up a branch protection rule and setting up GH environments for our release CD to require a review)

#

I was going to do a security posture assessment for Black earlier this year, but that fell off my radar.

muted whale
silk jungle
#

Currently anyone with write access to the Black repository can effectively publish a release to PyPI.. which isn't ideal

silk jungle
muted whale
# hexed briar Wait, I'm curious!

Unfortunately, I can't find a good unique search query that brings up any of the particular issues and discussions I was thinking of, but I seem to recall when they released v2 of I think awscli they completely stopped doing Git tags for releases for a while which made a lot of people frustrated, and also they decided to completely stop publishing PyPI packages and requiring that people download their binary installers, which a lot of folks were very unhappy with, and some other things I can't remember off the top of my head.

hexed briar
#

Ah, fun.

hexed briar
#

AHAHAHA, even AI bots know.

#

Oh god, did someone write this blog post already?

muted whale
hexed briar
#

I didn't expect it to auto-complete the URL tho, that was creepy.

#

I wonder if it's picking it up from another draft post I have?

#

OpAqUe SyStEmS

junior narwhal
frank shore
#

One big family 😄

fierce horizon
vast wren
#

AWS paid me to work on PyPI part time for 2 years or so

hexed briar
#

I've heard bad things about their culture and don't like how their sales strategy interacts with open source either; but... like... as a C corporation in the US where the only thing they're supposed to care about shareholder value, I don't see any way that their behaviour is "wrong" given the incentive structure the broader org operates with. 🤷🏻‍♂️

muted whale
hexed briar
#

In other news... [Python Packaging Authority]’s Technical Steering Group was something that GitHub Copilot suggested to me today.

#

I... chuckled uncomfortably. 😅

fierce horizon
fierce horizon
# hexed briar I've heard bad things about their culture and don't like how their sales strateg...

Oh for sure! Capitalism will always make a farce of any moral commitments that companies pay lip service to, as long as there's no legal obligations to uphold it. That's why the only structure (which I know and) that I can possibly trust is Mozilla's “nonprofit entity owns/directs for-profit entity”. And of course that's also far from perfect.

Luckily some companies have understood that happy, motivated software engineers do a better job, and that allowing them to contribute to open source on the side helps with that.

I just didn't expect AWS to allow that, since their business model is so clearly based on selling open source products as a service.

junior narwhal
#

I respect Hashicorp's model a lot

junior narwhal
#

also tbh Microsoft's mission nowadays seems to totally align with open source, public interest esp. for research, etc.

#

e.g. afaik they're donating most of OpenAI's compute

ionic tulip
#

M$ still has a lot of dark patterns, that Minecraft vs Minecraft for window (which runs on android but not desktop Linux) really got to me

muted whale
#

Don't forget Pylance and the whole ..NET 6 hot reload fiasco...

west basin
#

any idea why they might have chosen not to open source Pylance?

#

or what they are using ONNX for for that matter

#

I suspect the two are related

muted whale
#

For everyone who celebrates something this time of year, merry christmas and happy holidays!

silk jungle
#

the temptation to add :this: as as emoji here because I'm too used to it from the Python Discord server ... >.>

onyx spindle
silk jungle
#

I don't have nitro okie?

kind moon
#

Then add it

dew it

silk jungle
kind moon
silk jungle
#

I may have been struggling a little bit, the audit log is a bit embarassing haha

kind moon
#

Too embarrased?

#

||(/s)||

silk jungle
#

to those on the east coast best coast, happy new year's!

ionic tulip
#

anyone aware of tools to make zipapps from a set of wheels ? i want to ship a set of python libraries (pure pytohn) a a single application that runs on anything that has the required python versions

frank shore
ionic tulip
junior narwhal
frank shore
#

pex inspired shiv. We used pex for a long while but wanted something more modern and without the baggage so one of our devs wrote shiv. The cache improves hot performance considerably and as you know you have to unpack zipapps to the fs if they have any shared libraries. (I still can't understand why dlopen() doesn't support loading from memory, esp. given that Google contributed that to glibc ages ago).

vast wren
ionic tulip
#

that one is a bit overkill, im trying to create sometihng that given a minimal python can ease the bootstrap/startup of execnet on remotes in a more viable manner (aka push minimal wheels to some type of cache, then bootstrap into them instead of doing the dance with python scripts via cmdline args and stdin) instead of the rest

ionic tulip
frank shore
#

There are definitely solutions if you don't need extension modules. And even if you do, something like PyOxidizer might fit the bill for you. I actually played around with that a few years ago for $work, but had trouble integrating it into our workflows. I'm sure it's much improved since then.

junior narwhal
#

yes I can confirm it's quite good now

#

whenever I have time in the next few months I plan on making a Hatch builder plug-in for PyOxidizer

vapid kite
#

@junior narwhal hope you don't mind a random ping on some issue I see you on --

#

or can I just literally not figure out how to do what it's recommending

#

i.e. how do I tell mypy "good lord stop complaining about return without return None

#

warn_no_return = false doesn't seem to do it, which one of the last commenters I think was also pointing out, so it seems this still doesn't work?

junior narwhal
#
[tool.mypy]
warn_no_return = false

seems to work for me… or at least I have that configured 😅

vapid kite
#

weeeeeeird

#

I still get

#

referencing/jsonschema.py:22: error: Return value expected [return-value]

#

which is wrong

#

but ok bleh I basically give up

junior narwhal
#

well I trust you then, it must not actually be working for me either

vapid kite
#

such a weird thread

#

(thanks for the confirmation at least)

junior narwhal
#

jeez I'm in that thread too lol but I don't remember

vapid kite
#

I think they only "half fixed it"

#

they fixed implicit returning

#

but they didn't fix ```
def test() -> int | None:
if stop_telling_me_how_to_write_code():
return
return 12

#

which still complains on the return

#

and tries to force you to write return None

#

or at least that's the behavior I observe

nocturne swallow
#

I don't mind writing there return None in spirit of explicit better than implicit 😄

vapid kite
#

sure, I don't doubt some people don't mind doing so

#

but it's dumb that mypy tries to enforce one

nocturne swallow
#

we'll need to agree to disagree there to 😄

junior narwhal
#

it's true I was so against that I just was not using types

vapid kite
#

that was the comment that made me ping you 🙂

#

since I sympathized (I'm always close to throwing mypy away anyhow, so every papercut is always fun)

junior narwhal
#

if Mypyc didn't exist I actually would use the one that Microsoft uses in VSCode

#

but I like performance...

vapid kite
#

hm, maybe I should give pyright another shot

#

I couldn't use it for other existing projects but this one is from-scratch so maybe...

shadow zealot
#

I wish typing could distinguish between return None and return (maybe -> Void?)

boreal bramble
#

-> None means you should just do return, -> None | other_type means you should do return None

#

I don't know if it's part of any PEP but type checkers seem to enforce that, no?

#

it definitely makes sense since explicit return None makes sense when you can return something else while return makes sense if you never return anything

muted whale
boreal bramble
#

looks like mypy enforces the latter case, pyright doesn't enforce either

west basin
#

Not the type checker’s job to enforce code style, pyright got it right

fierce horizon
#

Exactly. return and return None are and always will be semantically identical, therefore I agree completely.

boreal bramble
#

It does give the type checker the opportunity to detect when one forgets that the function is supposed to return something

vapid kite
#

Saying something returns None is saying it can return None even in a union IMO, the type checker has no way of knowing you didn't return to return None, so it should say nothing, it's purely a code style thing, which the type checker shouldn't have any opinions on

#

But yeah I'm gonna try pyright out, glad to hear it does this better

vapid kite
junior narwhal
#

have you noticed any difference in how fast it executes?

west basin
#

you probably wanna turn on strict type checking since you had that for mypy

vapid kite
#

I considered turning on strict

#

But it seemed to spit out lots of spurious errors

#

Will try it again, thanks for the rec

vapid kite
junior narwhal
#

also be aware that this switch might preclude the use of Mypyc fully because the type checking is different (as you've seen) in some cases

vapid kite
#

I am quite likely to re-rewrite this lib in rust at some point

#

So I'm perhaps less worried there

#

But we shall see if I bite my words

onyx spindle
#

I guess in few years, Python devs will have to know Rust too if they want to help in open source

shadow zealot
#

Substitute Rust with C and that prediction was reasonable ten years ago. I suspect in a few years a new language would emerge and the cycle starts all over again.

onyx spindle
#

yeah, probably. However, Rust seems to be more widely adopted than C

shadow zealot
#

There are also like two orders of magnitude more Python packages now

junior narwhal
#

I suspect in a few years a new language would emerge and the cycle starts all over again
I would bet heavily against that notion. I think Rust is actually "the end"; I don't see anything surpassing it in terms of performance, ease of use/learning, safety guarantees, Python FFI interoperability, etc.

quartz yew
#

there will be innovation, new (somewhat better) languages will show up

#

the question is how much they'll stick

nocturne swallow
#

Perhaps an AI language 😅

vapid kite
#

If Rust is the end of the line, I hope it gets easier over time, since I (in 3-4 tries) have seemed to not be smart enough to write it for sufficiently complex programs :D, or at least not sufficiently motivated to really learn about how the borrow checker works.

#

It's slightly fun though in a nostalgic Pythonesque way.

quartz yew
#

I am in the same boat

#

most of the stuff I write doesn't need a low level language though

#

and the ones that do, are mostly microntroller related, where using rust is very annoying due to lack of support

#

and me not having the enough knowledge to just add the missing pieces to the ecosystem

#

so I haven't progressed much in learning rust

shadow zealot
#

I actually feel the borrow checker is arguably an easy part of Rust, but Rust in general is indeed already too hard as a non-primary language

quartz yew
#

yeah, I agree

shadow zealot
#

And it is literally getting harder by the day

vapid kite
#

But I get stuck on silly things like "I have a serde_json value as an instance variable on some other type of object, and now everything's unhappy and wants me sprinkling lifecycle parameters everywhere, and trying to get the right ones

#

and then reading long pages trying to explain to me how to do so correctly

ionic tulip
#

I had hopes for rust, i don't atm

junior narwhal
#

I guess I'm the odd one out here but I find Rust to be much easier than C or Java

fierce horizon
#

You're not. I prefer 1000× to use a language that doesn't randomly blow up with a cryptic segfault. Rust has a steep learning curve, but once you're past the hump it's really enjoyable. You write something and it either works immediately or after fixing like
1-2 logic bugs. That's just not something you get anywhere else.

vapid kite
junior narwhal
silk jungle
#

C memory errors are quite fun annoying to debug, I haven't touched Rust but being able to trust the borrow checker so completely sounds really nice.

#

ASAN and UBSAN exist among other sanitizers. They've made C a lot nicer to work with and debug, but they are reactive. They don't help you prevent memory violations or UB.

onyx spindle
#

people complain that Rust takes more time to compile, but hell, if I can trust the compiler to catch all the places that could explode in runtime, let it be 100x slower than other compilers.

junior narwhal
#

also I find error handling quite pleasant

#

especially compared to Go

onyx spindle
#

Go is a modern mistake

#

I really can't get that language

junior narwhal
#
if err != nil

nightmare inducing ^

#

I have a hotkey that types that because you have to use it so frequently, no joke

#

and although it is bad practice it's not entirely uncommon from what I've seen to ignore errors

silk jungle
onyx spindle
#

Go is "what if we made C in 2010s" language

#

I would say it's the same

junior narwhal
#

also the entire ethos of Go is incredibly off-putting to me, I'll try to find the quote from one of the creators...

#

The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

silk jungle
#

That is an awful way to design a language that's memory unsafe. Want a language for those developers? Use Python. It won't blow up nearly as much in a security risky way.

onyx spindle
ionic tulip
# junior narwhal why not?

It's more and more turning into something that feels c++ ish

Slow, excessive complicated, but still hard with certain low level details while high level is subject to pain from lack of language features

silk jungle
#

C-like memory management is not as easy or simple as that quote makes it sound, luring developers with a false sense of security memory-safety-wise is not going to end well.

junior narwhal
#

I've personally seen so many segfaults in software written in Go by extremely competent engineers e.g. at work, almost all tools from Hashicorp, etc.

ionic tulip
#

Go is a failed experiment

silk jungle
#

It was really popular for a failed experiment

onyx spindle
#

still is

#

to add to the pile of WTF of Go, the repository URLs as imports are another thing I don't get

silk jungle
#

is it possible to import from the filesystem?

onyx spindle
#

don't know, never worked with Go past "hello world"

silk jungle
#

fair enough haha

junior narwhal
#

I also dislike the VCS as dependency model but it actually makes sense if it was written "for Google" since they have a monorepo

silk jungle
#
Found 83 errors in 2 files (checked 109 source files)

thanks mypy.

#

tbf, I need to merge in main, I'm working on a 1.5 years old checkout of mypy 👀

vapid kite
#

solve all ur mypy probs with this 1 cool trick: put all ur code in 1 module so you can type: ignore comments just in one place

silk jungle
#

y'know what's funny, 99% of the errors are these:

mypy/visitor.py:363: error: Missing return statement  [empty-body]
        def visit_mypy_file(self, o: mypy.nodes.MypyFile) -> T:
ionic tulip
#

@junior narwhal i partially wish non faang languages had more resources, experiments like factor, zig, nim, do look interesting, but they move in slow motion and lack integration

onyx spindle
#

people: use mypy in their code
mypy: points out mistakes
people: 😱

silk jungle
#

ignoring the spurious errors that are my fault for refusing to merge in main, mypy did catch a few errors

onyx spindle
vapid kite
#

I mean clearly I was shitposting 😛

#

But more seriously, I indeed have never had mypy (or any type checker) find a real problem

#

So if/when it does, I may convert!

ionic tulip
#

Mypy found real problems in all pytest core projects we applied it to

vapid kite
#

Nice

#

(Legitimately. Glad to hear it.)

onyx spindle
#

feel free to steal this 😄

onyx spindle
vapid kite
#

you run into some slightly non-trivial typing thing

#

an expert basically tells you "yeah add type: ignore"

#

the one I keep coming back to personally is how difficult it seems to be to properly document public API types

#

which for me is literally the top (only?) thing I care about

ionic tulip
#

Wtf, that's where you refractor and find bugs, shitty experts are a pain

vapid kite
#

and which potentially/often leads to types which differ between the annotation of some parameter and what you internally treat the type as

#

and the solution to that from what I heard is indeed "yeah use type: ignore"

ionic tulip
#

Type ignores are a red flag 🙂

onyx spindle
#

honestly, I find typing more difficult for pre-existing code than for new code. when writing code with typing in mind, you automatically think about code differently

vapid kite
#

(also probably I've had enough typing complaining for one day, so I may go have a beer instead :D, but will read whatever your comments are telling me I'm wrong later.)

silk jungle
#
mypyc/test/test_run.py::TestRun::run-sets.test::testPrecomputedFrozensets PASSED

wrote a new test and it worked on second attempt (I forgot a not in the test data), feels good 🎉

silk jungle
#

no one puts a frozenset in a set literal, right? I'm using GitHub code search to find any instances, but honestly it feels like the sort of thing no one but CPython itself would do

onyx spindle
#

you mean like

s = {frozenset(['a', 'b', 'c'])}

?

silk jungle
#

I wasted too much time trying to add in optimization support for nested frozensets in set literals to mypyc lol

silk jungle
#

It's rare enough that mypyc doesn't need to optimize for that

onyx spindle
#

I mean, I can see a reason to use this kind of data structure, but I agree, it would be rare

silk jungle
#

ah well I already deleted the extra code that handles nested sets

onyx spindle
#

on the other hand, if you already did the leg work to implement it, why remove it? it's rare, but can happen

#

oh

silk jungle
#

it's also broken, I forgot you have to use frozenset() inside of a set literal and the patch assumed nested set literals are fine (eg. {{"a", "b", "c"}}) which is invalid Python!

#

I'm sure I could get mypyc to recognize nested frozenset calls as frozenset literals when appropriate, but that sounds overkill

onyx spindle
#

well, I guess there are many other more important things to do in mypyc

silk jungle
#

yeah

silk jungle
#

This has become quite involved and I'm still not done 😅

onyx spindle
#

impressive

junior narwhal
#

@silk jungle were you the one who said/wrote to never do -> Generator[T, None, None]? if so, what should the return type of generators be?

silk jungle
#

I don't remember saying that, but it does sound like something I'd say :)

#

In general you shouldn't type return types as Generator[...] because the fact your function is a generator becomes part of that function's contract / the API. Iterator[T] works the most of the time (although IIRC Asottile did bring an edge case typing a generator function w/ Iterator[T] in the typeshed repo)

junior narwhal
#

cool ty, will change

silk jungle
#

typing APIs is a mix of being as accurate as possible but also formally stating the contract/expectations your users can have about the function, often times it's better to give yourself some wiggle room and keep the specified type more flexible (and less specific)

silk jungle
# silk jungle This has become quite involved and I'm still not done 😅

before:

running in_set
..........
interpreted: 0.491995s (avg of 5 iterations; stdev 1.7%)
compiled:    0.815844s (avg of 5 iterations; stdev 1.5%)

compiled is 0.603x faster

after:

running in_set
..........
interpreted: 0.509823s (avg of 5 iterations; stdev 4%)
compiled:    0.341116s (avg of 5 iterations; stdev 0.28%)

compiled is 1.495x faster

well at least the first part of the patch paid off 🎉

silk jungle
#

now I need to fix one more bug and optimize for ... in <set-literal>: ...

kind moon
#

I still don't like it
I feel like it loses some of the semantics

silk jungle
#

That's the point. If these are internal APIs then Generator is fine. The advice to prefer Iterator is mostly applicable to libraries and those who write them :)

kind moon
#

Am library writer

silk jungle
#

It's about trading specificity for flexibility, your call.

kind moon
kind moon
silk jungle
#

You can really overthink this. If you're the only user of this library, maybe you'd prefer specificity more than if you were writing a library for general consumption. However, I can't make that decision for you.

#

Yes.

ionic tulip
#

anyone aware on shared work on composite build/deploy pipelines for simple pure python projects (stuff like generating python version matrixes based on metadata, testing the artifacts that will go to pypi, token based upload as a all in one)

dreamy hatch
ionic tulip
#

@dreamy hatch i want to enable having something like that as reusable workflow and/or action (so that most simple python projects that use tox or hatch can have a massivley trimmed down ci pipeline)

dreamy hatch
ionic tulip
#

that one looks pretty neat, but im avoiding tox on gha these days (my ideal would be something that installs build artifacts and runs tests againstthem in some sensible manner using shallow checkouts, but its a pain to set up

#

@nocturne swallow can to be passed a dist to use instead of one it builds in isolation?

dreamy hatch
ionic tulip
#

@dreamy hatch atm im jsut being a bit nitpicky - the pain point i still havent spend time is stuff like effectively mapping requires-python to github python versions and making fi matrixes/dependenc graphs/cache usage

silk jungle
#

sometimes I hate computers :)

#

CI is great, but fixing failures is can be slow.

onyx spindle
#

"is can be"? 🤣

#

computers strike again 😄

silk jungle
#

I'm bad at typing. Cooper can confirm :p

onyx spindle
#

did you try import typing?

#

master of humour

silk jungle
junior narwhal
#

you're better than me... when debugging I either force push to PRs or commit message is .

silk jungle
#

This is a public PR now so I try to avoid force pushing. However when I'm on a private branch, I set new records for the number of times I run git fix && git push -f

#

git fix is an alias to git commit -S --amend --no-edit

onyx spindle
#

however I would make it git fuck => git fix && git push -f 😛

silk jungle
#

I also have git amend (drops the --no-edit flag so I can edit the message too) and git reword

junior narwhal
#

I do git add --all && git commit --amend --no-edit

silk jungle
#

:)

onyx spindle
muted whale
silk jungle
muted whale
silk jungle
#
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    .diff
    .vimrc
    bm.py
    boom.py
    check-build/
    crash.cpython-38-x86_64-linux-gnu.so
    crash.py
    exercise_ops.py
    fwdref.py
    fwdref_stress.py
    mod.py
    profile.pstats
    profile.svg
    set.cpython-38-x86_64-linux-gnu.so
    set.py
    test.py
    unary.py
    wat.c
muted whale
#

A reading from the first book of Linus:

And the LORD said "Let there be .gitignore"...

kind moon
silk jungle
silk jungle
muted whale
#

Heh, well I have a temp.py in my global .gitignore just to dump stuff like that in since I do it so often, heh

silk jungle
#

I might create a temp folder and gitignore that. Smart idea.

kind moon
silk jungle
#

I know where I came from 🦮

#

Python ahem Rust Discord

muted whale
#

I would drive myself nuts having to manually add stuff all the time and inevitably make a mistake, though I have gotten in the habit of always using git add instead of -a as I would often add the latter habitually after spending 10 minutes carefully curating my commits with git add -p

#

Personally, I was always a believer in R lord and savior

silk jungle
#

I almost never use --patch. I just let my commits suffer and banish atomic commits to the shadow realm :P

muted whale
#

Funny enough, at the lab I was at literally everyone used Python except for me and we were always bantering about Python vs. R. Now look at me, defected to the dark side..."You were supposed to destroy the Python, not join them!"

kind moon
#

I need to learn to use patch
I either just make smaller edits, and commit them one at a time, or just dump them all together like @silk jungle

silk jungle
#

I make too many mistakes to make clean atomic commits, okay?

#

I also have a habit of forgetting about cleaning up my "[wip] i did something" commits

muted whale
#

I don't do it as much now that I'm contributing mostly to repos that squash merge everything anyway (which was not the case back in the day), but still even have a bit of a Sienfield-like obession with commit hygene.

silk jungle
#

My only saving grace is that I try to write good commit messages. Although even here I'm inconsistent...

#

Yea, most repos use squash merges these days, although a rebase merge can be nice if you have a really clean commit history.

silk jungle
#

What did rebasing do to you?

kind moon
silk jungle
#

huh, interesting how remote got a new commit while you were fixing your branch locally

silk jungle
#

I so remember reading that oh my gosh that was a good read. I can't promise I read the whole thing though.

onyx spindle
kind moon
#

Woah
@Robin get in here
You thought mine was a lot? Check this out

kind moon
muted whale
#

For me git rebase was very intimidating until I got used to using it regularly, at which point it becomes a breeze. It's just that getting to that point is...not. Especially since its a really bootstrap problem.

onyx spindle
#

Rebase is great once you understand how git actually works

silk jungle
#

I approve a love of NTSB accident reports. Haven't read any but I have seen way too many Air Crash Investigations episodes.

muted whale
#

It also helps that once I did slowly start to figure it out, I became the go-to CAM for helping other devs fix their git problems, which greatly accelerated my own learning and made it much easier to recognize others' problems quickly (and my own). But it's just that getting to that starting point that can be a challenge.

kind moon
#

Oh - CAM is a title?

silk jungle
#

This checkmark only cost me 30 minutes ... >.>

#

Finally it's green though 🎉

muted whale
kind moon
muted whale
#

You'd be surprised (and horrified) how many CAM puns there are

#

It's actually an acronym for my first three initials (first name and middle names)