Show newer

@pbx I missed the poll, but I think it's really an "it depends" situation.

When there is a mismatch between the best way to structure your package from a maintenance perspective and the best namespace structure from a user's perspective, you should use imports to expose symbols to the public in the best way regardless of their internal organization.

In packages with a relatively small public interface with a lot of structure or complexity behind it, collapsing the public interface into one namespace makes a lot of sense.

Last night I was thinking, "Man, you shouldn't read packaging discussions before bed, it's too upsetting", but then I realized that I didn't stop early enough and it should be amended to, "Man, you shouldn't read packaging discussions."

Wow, after 25 years of Unix experience, I learned that you can filter output in #less.

Press ampersand (&) and enter a regex to show only lines matching the regex.

Press ampersand (&) and then exclamation mark (!) to apply an inverse filter.

Anyone know what, if anything, I need to do to build an Apple Silicon wheel on Github Actions?

Planning to do a new backports.zoneinfo release soon and I'd like to throw it into this wheel building apparatus, if necessary: github.com/pganssle/zoneinfo/b

I think that the fact that the head of the `self-conflict` branch has two parents branched from a common base (with a bunch of commits in between) has something to do with it.

I guess I'm rebasing it to a single commit, which conflicts with its history.

Show thread

Wow, I've never seen this before. This repo has a merge conflict with its own base commit:

$ git rebase HEAD^
Auto-merging dateutil/test/test_imports.py
...
error: could not apply ffc4be1... Use pytest

github.com/pganssle/dateutil-m

@eric I am always sad that I'm no good at capturing them in flight, because their tail feathers and the feathers on the bottom of their wings are very striking!

@schlink I'll note that `datetime.fromisoformat()` is ~75x faster than `datetime.strptime`:

`>>> dt_str = "2021-05-18T19:00:00+00:00"`
`>>> %timeit datetime.fromisoformat(dt_str)
119 ns ± 1.28 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)`
`>>> %timeit datetime.strptime(dt_str, "%Y-%m-%dT%H:%M:%S%z")`
`8.88 µs ± 285 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)`

@schlink Alternatively, there's `dateutil.parser.isoparse`, which will parse any ISO 8601 datetime.

Hopefully before Python 3.11, we'll be able to expand `datetime.fromisoformat` to also be able to parse dates with `Z` at the end (it's a bit more complicated than just that, which is why we haven't done it yet), but until then `dateutil.parser.isoparse` should have you covered.

@schlink If it's always an ISO 8601 datetime, you can use `datetime.fromisoformat` (but it looks like you have a Z at the end). If it's always got the Z, you can do:

```
dt_str = dt_str[:-1] + "+00:00"
pub_date = datetime.fromisoformat(dt_str)
```

If it doesn't always have the Z, you can do:

```
if dt_str.endswith("Z"):

dt_str = dt_str[:-1] + "+00:00"
pub_date = datetime.fromisoformat(dt_str)
```

I'm gonna alias the shell command "lick" to touch a file and change the owner to me.

Cryptoart 

@ashwinvis Or rather, people would not believe that *other* people are willing to believe something so stupid.

In some ways NFTs make sense in some self-fulfilling prophecy way, the same way art is a complicated mix of "I actually like how that looks", conspicuous consumption and speculation (plus probably complicated tax stuff...)

Cryptoart 

@ashwinvis It seems misleading to call it "proof of ownership" when what you own is the NFT itself.

It's not like you get the copyright for the thing. It's more like when you sponsor a park and they put your name on a bench, except that you can resell the right to have your name on the bench, and also a blockchain is involved because otherwise people would immediately realize how stupid this is.

@eric Definitely dangerous for anyone who tries to head-butt me 😉

To quote @`luis_in_brief:

"Chatting with @brainwane and @joshsimmons today on Free as in Friday, 1pm Pacific, over at twitch.tv/tidelift. Back episodes with awesome folks like @`kirstie_j @`melissawm @baconandcoconut and others available at tidelift.com/subscription/podc "

Show thread

WTF ... Mozilla had always running JavaScript inside PDFs disabled by default.

But now with FF 88 this option is ENABLED by default. Which means, if a PDF file contains JS it will run without any user interaction. What can possibly go wrong?

To disable this:

about:config
pdfjs.enableScripting --> false

# FF 78.10 ESR doesn't include this option and still blocks JS in PDFs by default. Just tested.

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.