« first day (4730 days earlier)      last day (438 days later) » 

05:37
Is that different from using backticks for interpolation?
 
2 hours later…
07:53
@Aran-Fey importlib.resources.as_file(traversable) might be what I'm looking for
If I understand the module correctly, you only need that if you need it to be an actual file on the file system. Reading the contents of the file with python should be possible with with traversable.open() as file:
08:19
Neat, I wasn't aware they updated the importlib.resources interface in 3.9.
08:47
@Arne What was the manual solution?
I'm trying to track down how this happened in the code. If there's an existing flag in poetry then maybe it's a non-issue but I'm curious about how it counted CPUs
Might be relevant to folks with similar issues: Our first-level defence is setting environment variables for a load of known offenders to the correct CPU count. Our base list of env variables comes from our batch system plus MAMBA_EXTRACT_THREADS.
Aha, I found it. It might be worth raising on their github to consider moving away from os.cpu_count() as a sensible default
09:06
@MisterMiyagi Dat number of config params for HTCondor, tho :O You must be rivalling NginX/Apache if not beating them!
09:17
The real challenge is not to fiddle with all of those shiny knobs. 🤩
09:54
@MisterMiyagi but big red buttons to press! :)
 
2 hours later…
11:36
@JonClements It's been %d days since I pressed the big red button., 0
 
2 hours later…
13:46
I'm back to fiddling with logging again and just totally confused...
So Handler takes a level argument to pre-filter messages. Yet... none of the actual Handler implementations actually take the argument. D:
@MisterMiyagi Python logging will remain forever confusing
Makes you wonder why it's still a thing...
Surely the few backends can't be that hard to reimplement, can they?
 
1 hour later…
14:57
I (who has never logged anything in his life) assumed it's about adoption? Say you have dependencyA logging with structlog and dependencyB logging with loguru, but you can still configure everything easily because they both respect the configuration of logging
15:15
"configure everything easily" umm
How about "in a standardized way"? (:
2
Ha, nice dodge
15:44
@Aran-Fey I'm keeping that one :D It applies so often :D
Well, I've just had structlog choke on me because I tried to trust its promise that it's loggers are drop-in replacement for the stdlib loggers. :/
But the guess is a good one, even if I don't like the standard.
16:21
What is special about logging for you here?
In my hobby project that I've sadly parked again, I've got it set to just throw everything into postgres. I remember using Splunk over text files years ago and I hated its syntax. As long as I don't get billions of user interactions, postgres should hold for me
I should clarify, by logging I meant logging, the module. There could be other ways to collect the data in the way you want with a custom helper/extension?
@roganjosh Well, it just keeps creeping in. No matter which nice and shiny high-level library I've tried, in the end I have to fiddle with logging to have a proper backend to actually push stuff to where I need it.
Like for structlog, they don't support multiple destinations and god forbid at different levels per source.
17:05
We could add it to Aran's backlog to simultaneously feel like we did something and not give him any more work? :P
That’s practically my number one reason for complaining here. ^^
I just said I don't do logging and you're talking about adding something to my log >_>
C'mon, where's your spirit gone? The whole thing needs rewriting!
Ok fine, I'll get on it once I'm done with my GUI framework
Hurray!
17:13
(No, I'm not joking. At least not about the GUI framework)
freeze-frame-high-five
I had to delve into logging fairly deeply in a project this past summer. I learned about the extra argument that you can pass in as part of your log.info(), etc. function calls. Also got to discuss with Martijn Peters the strange privacy of Formatter's _fmt attribute, which warns you off of changing the format for an existing Formatter (which attaches to a Handler, which attaches to a Logger).
I had to tweak format strings after-the-fact, sort of a logging monkeypatch, to inject dd.trace_id and dd.span_id placeholders for Datadog logging.
Change of topic, but apparently there was recently an exploit in libwebp, allowing for arbitrary code execution through pretty much any app that displays webp images? How have I not heard of this before?
17:28
judging by the news results on "webp" because it's been outed in the last 24 hours?
Hmm, these guys apparently already knew about it 2 weeks ago
 
2 hours later…
19:56
What's the best plugin to make pytest run async tests nowadays? I'm currently using alt-pytest-asyncio, but it's cancelling my tests after 10 seconds even if the debugger is active
 
3 hours later…
23:05
I almost asked if there was a Stack Overflow question that explains what exactly pass as a class body does...but then I figured out that the piece I was missing is that constructors (okay, fine, initializers) are inherited in Python. That's very surprising, coming from Java/Kotlin.
The context was trying to figure out how on earth the first code block in this answer defines a constructor that takes a string.

« first day (4730 days earlier)      last day (438 days later) »