Hello list.
I'm trying to understand the contents of Wheel files. I was reading
https://peps.python.org/pep-0491/ specifically the paragraph that
states:
Install-Paths-To is a location relative to the archive that will be
overwritten with the install-time paths of each category in the
install sch
Sorry, I found that this... documentation continues, but it doesn't
make anything better. Here's what this PEP has to add (text in square
brackets are my questions):
If a package needs to find its files at runtime, it can request they
be written to a specified file or files [does this mean a singl
Thanks. I tried asking there.
On Sun, Dec 24, 2023 at 11:53 PM Barry wrote:
>
>
>
> On 24 Dec 2023, at 00:58, Left Right via Python-list
> wrote:
>
> I'm trying to understand the contents of Wheel files
>
>
> There are lots of packaging experts that hang o
;
> Thanks. I tried asking there.
>
> On Sun, Dec 24, 2023 at 11:53 PM Barry wrote:
> >
> >
> >
> > On 24 Dec 2023, at 00:58, Left Right via Python-list
> > wrote:
> >
> > I'm trying to understand the contents of Wheel files
> &
> On Fri, 29 Dec 2023 at 13:04, Left Right via Python-list
> wrote:
> >
> > Wow. That place turned out to be the toxic pit I didn't expect.
> >
> > It's a shame that a public discussion of public goods was entrusted to
> > a bunch of gatekeepers with
> Yeah, because you have the God-given RIGHT to be able to say anything
> you like, on anyone's web site, and nobody's allowed to delete
> anything you say! That's how it goes, right?
I don't believe in god, and I don't believe he / she can give me
rights. What I believe in is that Python is a pu
Previously you wrote:
> Here is the discussion referred to:
https://discuss.python.org/t/what-is-install-paths-to-in-wheel-file/42005
This illustrates you had no idea what the discussion was about and now
you write:
> Oh trust me, I saw the discussion previously.
Both cannot be true at the same
> Then your understanding is flat-out wrong. Encouraging participation
> by everyone DOES mean deleting what is unproductive, offensive, and
> likely to discourage participation.
I haven't written anything unproductive or offensive. I offered
constructive criticism with a detailed plan on how to f
> You are conflating several different groups of people. The PyPA are
> the people who currently maintain the code for various
> libraries/tools. That is very often not the same as the people who
> originally wrote the code for the same libraries/tools or for
> preceding ones. Neither group is the
> others do not and so your notion of what is "accepted"
> is not universally shared.
Why should I or anyone else care about what "others" think? The
important question is whether what I do is right. And the answer is
"yes". That's why there are rules in the first place instead of
polling.
> if
By the way, in an attempt to golf this problem, I discovered this,
which seems like a parser problem:
This is what Python tells me about its grammar:
with_stmt:
| 'with' '(' ','.with_item+ ','? ')' ':' block
| 'with' ','.with_item+ ':' [TYPE_COMMENT] block
| ASYNC 'with' '(' ','.with_
Ah, nevermind. I need to be more careful, there isn't an "'as'
star_target" after the first rule.
On Thu, Jan 11, 2024 at 10:33 PM Left Right wrote:
>
> By the way, in an attempt to golf this problem, I discovered this,
> which seems like a parser problem:
>
> This is what Python tells me about i
To people discussing BNF:
The grammar language Python uses is *very* far from BNF. It's more
similar to PEG, but even then it's still quite far. Python's grammar
is just its own thing, which makes it harder to read, if you are
already familiar with other more popular formats.
I've also found bug
> surprising for me:
Surprise is subjective, it's based on personal experience. Very few
languages allow arbitrary complex expressions in the same place they
allow variable introduction. The fact that "i" is not defined is
irrelevant to this example. Most programmers who haven't memorized
Python
Actually, after some Web search. I think, based on this:
https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-augtarget
that in Python you call this "augmented assignment target". The term
isn't in the glossary, but so are many others.
On Sat, Jan 13, 2024 at 1:45 AM
> What do you mean?
>
> for x in lambda: ...:
> ...
>
> Perfectly grammatical.
1. You put the lambda definition in the wrong place (it should be in
the left-hand side, or as Python calls it "star_targets", but you put
it into "star_expressions", which would be where the right-hand side
is drawn
> What do you mean by this? Most languages I've worked with allow
> variables to be initialized with arbitrary expressions, and a lot of
> languages allow narrowly-scoped variables.
I'm talking about the *left* hand side of the assignment, not the
right hand side. Initialization with arbitrary exp
> Second time to ameliorate wording-dispute in this thread! The original
> phrase was: "[modified] BNF". Some of us have worked with various forms
> and evolutions of BNF since back in the days of COBOL-60 proposals, and
> know it when we see it!
OK, here are the conceptual differences between wha
> You said function. I made a function. You said "head of a for loop
> clause". I put it there. Problem was underspecified.
I also wrote a lot of letters, if you combine them very liberally,
without any regard to the order in which they were written or the
context in which they were used, you may
So, here's some info about how to see what's going on with Python's
memory allocation: https://docs.python.org/3/library/tracemalloc.html
. I haven't looked into this in a long time, but it used to be the
case that you needed to compile native modules (and probably Python
itself?) so that instrumen
In order for the "splat" operator to work, the type of the object must
populate slot `tp_as_mapping` with a struct of this type:
https://docs.python.org/3/c-api/typeobj.html#c.PyMappingMethods and
have some non-null implementations of the methods this struct is
supposed to contain.
I can do this i
> Looks like it can simply be done in Python, no tp_as_mapping needed.
It's not that it isn't needed. You've just shown a way to add it using
Python code.
But, more to the point: extending collections.abc.Mapping may or may
not be possible in OP's case.
Also, if you are doing this through inheri
I believe that the name "Wheel" was a reference to "reinventing the
wheel". But I cannot find a quote to support this claim. I think the
general sentiment was that it was the second attempt by the Python
community to come up with a packaging format (first being Egg), and so
they were reinventing th
It sounds weird that symbols from Limited API are _missing_ (I'd
expect them to be there no matter what library version you link with).
But, I haven't done this myself, so, what do I know? It would help
though to see the actual error.
That aside: why do you want to do this? One side effect of doi
From a practical perspective: not all values are printable (especially
if printing a value results in an error: then you'd lose the original
error, so, going crazy with printing of errors is usually not such a
hot idea).
But, if you want the values: you'd have to examine the stack, extract
the val
Let me try to answer this properly, instead of "simply".
The "problematic" part of your question is "with my Anaconda
distribution". Anaconda distribution comes with the conda program that
manages installed packages. A single Anaconda distribution may have
multiple NumPy versions installed at the
There are several independent problems here:
1. Very short release cycle. This is independent of the Python venv
module but is indirectly influenced by Python's own release cycle.
Package maintainers don't have time for proper testing, they are
encouraged to release a bunch of new (and poorly test
Most Python objects aren't serializable into JSON. Pydantic isn't
special in this sense.
What can you do about this? -- Well, if this is a one-of situation,
then, maybe just do it by hand?
If this is a recurring problem: json.dumps() takes a cls argument that
will be used to do the serialization.
Hi.
Just FYI, I use Erc (in Emacs). I'm not a very advanced user, perhaps,
but I never felt like I miss anything. That's not to stop you from
making your own, but if you just need a decent text client for IRC,
then there's already at least one.
On Thu, Jul 4, 2024 at 11:30 AM inhahe via Python-li
If resource usage isn't an issue, then the _easy_ thing to do, that
would also be easily correct is to have a server doing all the
h/w-related reading and clients talking to that server. Use for the
server the technology you feel most confident with. Eg. you may use
Python's http package. I believe
Hahah, as someone with extensive experience of being banned by various
CoC-waving Python online communities' authorities I really enjoyed the
saga. Watching little men grasp for power on the Web to squash their
opponents never stops to amuse me.
On Tue, Aug 13, 2024 at 4:56 PM Michael Torrie via P
> Why do you have to belittle other people?
Who says I have to? I like to! I like to see people driven by all
sorts of low and reprehensible motives being punished for it. I don't
know if I need to explain this motivation further. I think it's a very
natural feeling. Human nature if you will. The
> it became simple and straightforward to
> download and install packages.
I think the right word for this is "delusional". But people get
offended when other people use the right words. Instead they want a
grotesque round-about way of saying the same thing...
So, the grotesque round-about way of
Hi. The advice here is from a perspective of someone who does this
professionally, for large, highly loaded systems. This doesn't
necessarily apply to your case / not to the full extent.
> Debian (or even Python3 itself) doesn't allow to pip install required
> packages system wide, so I have to
> whereas I am quite sure that program flows do not overlap.
You can never be sure of this in Python. Virtually all objects in
Python are allocated on heap, so instantiating integers, doing simple
arithmetic etc. -- all of this requires synchronization because it
will allocate memory for a shared
From reading the code where the exception is coming from, this is how
I interpret the intention of the author: they build a list (not sure
why they used list, when there's a stack datastructure in Python)
which they use as a stack, where the elements of the stack are
4-tuples, the important part ab
> The stack is created on line 760 with os.lstat and entries are appended
> on lines 677 (os.rmdir), 679 (os.close) and 689 (os.lstat).
>
> 'func' is popped off the stack on line 651 and check in the following lines.
>
> I can't see anywhere else where something else is put onto the stack or
> an e
There's quite a lot of misuse of terminology around terminal / console
/ shell. Please, correct me if I'm wrong, but it looks like you are
printing that on MS Windows, right? MS Windows doesn't have or use
terminals (that's more of a Unix-related concept). And, by "terminal"
I mean terminal emula
> Windows does now. They implemented this feature over the last few years.
> Indeed they took inspiration from how linux does this.
>
> You might find https://devblogs.microsoft.com/commandline/ has interesting
> articles about this.
I don't have MS Windows. My wife does, but I don't want to both
Poor error reporting is a very common problem in programming. Python
is not anything special in this case. Of course, it would've been
better if the error reported what file wasn't found. But, usually
these problems are stacking, like in your code. Unfortunately, it's
your duty, as the language
> > > The stack is created on line 760 with os.lstat and entries are appended
> > > on lines 677 (os.rmdir), 679 (os.close) and 689 (os.lstat).
> > >
> > > 'func' is popped off the stack on line 651 and check in the following
> > > lines.
> > >
> > > I can't see anywhere else where something else
> What is the probability of replacing os.lstat, os.close or os.rmdir from
> another thread at just the right time?
If the thead does "import os", and its start is logically connected to
calling _rmtree_safe_fd(), I'd say it's a very good chance! That is,
again, granted that the reference to os.ls
> I am not entirely convinced by NB2. I am, in fact, a sort of sysadmin
> person and most of my programs write to a log file. The programs are
> also moderately complex, so a single program might access a database,
> query an LDAP server, send email etc., so potentially quite a lot can go
> wrong
That's one of the "disadvantages" of threads: you cannot safely stop a
thread. Of course you could try, but that's never a good idea. The
reason for this is that threads share memory. They might be holding
locks that, if killed, will never be unlocked. They might (partially)
modify the shared state
Whether and to what degree you can stream JSON depends on JSON
structure. In general, however, JSON cannot be streamed (but commonly
it can be).
Imagine a pathological case of this shape: 1... <60GB of digits>. This
is still a valid JSON (it doesn't have any limits on how many digits a
number can
> What am I missing? Handwavingly, start with the first digit, and as
> long as the next character is a digit, multipliy the accumulated result
> by 10 (or the appropriate base) and add the next value. Oh, and handle
> scientific notation as a special case, and perhaps fail spectacularly
> instea
> Streaming won't work because the file is gzipped. You have to receive
> the whole thing before you can unzip it. Once unzipped it will be even
> larger, and all in memory.
GZip is specifically designed to be streamed. So, that's not a
problem (in principle), but you would need to have a stream
to sync _everything_ (and it hurts!)
On Tue, Oct 1, 2024 at 5:49 PM Dan Sommers via Python-list
wrote:
>
> On 2024-09-30 at 21:34:07 +0200,
> Regarding "Re: Help with Streaming and Chunk Processing for Large JSON Data
> (60 GB) from Kenna API,"
> Left Right via Python-lis
> One single IP packet is all you can parse.
I worked for an undisclosed company which manufactures h/w for ISPs
(4- and 8-unit boxes you mount on a rack in a datacenter).
Essentially, big-big routers. So, I had the pleasure of writing
software that parses IP _protocol_, and let me tell you: you
> You can't validate an IP packet without having all of it. Your notion
> of "streaming" is nonsensical.
Whoa, whoa, hold your horses! "nonsensical" needs a little bit of
justification :)
It seems you don't understand the difference between words and
languages! In my examples, IP _protocol_ is th
> By that definition of "streaming", no parser can ever be streaming,
> because there will be some constructs that must be read in their
> entirety before a suitably-structured piece of output can be
> emitted.
In the same email you replied to, I gave examples of languages for
which parsers can be
> On any Unix system this is untrue. Rotating a log file is quite simple:
I realized I posted this without cc'ing the list:
http://jdebp.info/FGA/do-not-use-logrotate.html .
The link above gives a more detailed description of why log rotation
on the Unix system is not only not simple, but is, in
I just tried this:
>>> import subprocess
>>> subprocess.run('which audacity', shell=True)
/usr/bin/audacity
CompletedProcess(args='which audacity', returncode=0)
>>> proc = subprocess.Popen('/usr/bin/audacity',
stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PI
What would be the intended use? If this is for other Debian users,
then why not make a Debian package? If it's for yourself, why do you
need to automate it?
To be fair, I don't see a point in tools like pipx. Have never used
it, and cannot imagine a scenario where I'd want to. It seems like
th
I wouldn't trust pip to install anything into my system. It's not a
reliable program that I'd recommend anyone to use for things that they
might depend on.
My typical course of action is to create a virtual environment for the
package I need. Install the package into that virtual environment
usin
HI Vincent.
You need the sources of the OpenSSL library, not the compiled library.
On Ubuntu, the packages with sources are typically named xxx-dev where
xxx is the package that provides the library. I don't have a Ubuntu
currently, but try looking for something like openssl-dev or
libopenssl-dev
So, this is how I know where my SSL headers are found, for instance:
➜ cpython git:(3.12) gcc -I. -I./Include -H ./Modules/_ssl.c 2>&1 | grep evp.h
.. /usr/include/openssl/evp.h
(this was executed from the repository root).
Can you see if you get something similar?
Also... just for sanity chec
I think Python compiles with fPIC by default. Something else had
happened to the OPs checkout that caused these errors. OP needs to
better describe what they were doing to properly understand the
problem.
On Sun, Mar 2, 2025 at 10:10 PM Lew Pitcher via Python-list
wrote:
>
>
> First off, this isn
58 matches
Mail list logo