Hi,
I propose to drop the Solaris support in Python to reduce the Python
maintenance burden:
https://bugs.python.org/issue42173
I wrote a draft PR to show how much code could be removed (around 700
lines in 65 files):
https://github.com/python/cpython/pull/23002/files
In 2016, I asked if we still wanted to maintain the Solaris support in
Python, because Solaris buildbots were failing for longer than 6
months and nobody was able to fix them. It was requested to find a
core developer volunteer to fix Solaris issues and to set up a Solaris
buildbot.
https://mail.python.org/archives/list/python-dev@python.org/thread/NOT2RORS…
Four years later, nothing has happened. Moreover, in 2018, Oracle laid
off the Solaris development engineering staff. There are around 25
open Python bugs specific to Solaris.
I see 3 options:
* Current best effort support (no change): changes only happen if a
core dev volunteers to review and merge a change written by a
contributor.
* Schedule the removal in 2 Python releases (Python 3.12) and start to
announce that Solaris support is going to be removed
* Remove the Solaris code right now (my proposition): Solaris code
will have to be maintained outside the official Python code base, as
"downstream patches"
Solaris has a few specific features visible at the Python level:
select.devpoll, os.stat().st_fstype and stat.S_ISDOOR().
While it's unclear to me if Oracle still actively maintains Solaris
(latest release in 2018, no major update since 2018), Illumos and
OpenSolaris (variants or "forks") still seem to be active.
In 2019, a Solaris blog post explains that Solaris 11.4 still uses
Python 2.7 but plans to migrate to Python 3, and Python 3.4 is also
available. These two Python versions are no longer supported.
https://blogs.oracle.com/solaris/future-of-python-on-solaris
The question is if the Python project has to maintain the Solaris
specific code or if this code should now be maintained outside Python.
What do you think? Should we wait 5 more years? Should we expect a
company will offer to maintain the Solaris support? Is there a
motivated core developer to fix Solaris issue? As I wrote, nothing has
happened in the last 4 years...
Victor
--
Night gathers, and now my watch begins. It shall not end until my death.
Hi everyone,
CPython is slow. We all know that, yet little is done to fix it.
I'd like to change that.
I have a plan to speed up CPython by a factor of five over the next few
years. But it needs funding.
I am aware that there have been several promised speed ups in the past
that have failed. You might wonder why this is different.
Here are three reasons:
1. I already have working code for the first stage.
2. I'm not promising a silver bullet. I recognize that this is a
substantial amount of work and needs funding.
3. I have extensive experience in VM implementation, not to mention a
PhD in the subject.
My ideas for possible funding, as well as the actual plan of
development, can be found here:
https://github.com/markshannon/faster-cpython
I'd love to hear your thoughts on this.
Cheers,
Mark.
Hi,
first of all, I'm a big fan of the changes being proposed here since in my
code I prefer the 'union' style of logic over the OO style.
I was curious, though, if there are any plans for the match operator to
support async stuff. I'm interested in the problem of waiting on multiple
asyncio tasks concurrently, and having a branch of code execute depending
on the task.
Currently this can be done by using asyncio.wait, looping over the done set
and executing an if-else chain there, but this is quite tiresome. Go has a
select statement (https://tour.golang.org/concurrency/5) that looks like
this:
select {
case <-ch1:
fmt.Println("Received from ch1")
case <-ch2:
fmt.Println("Received from ch2")
}
Speaking personally, this is a Go feature I miss a lot when writing asyncio
code. The syntax is similar to what's being proposed here. Although it
could be a separate thing added later, async match, I guess.
> Message: 2
> Date: Thu, 22 Oct 2020 09:48:54 -0700
> From: Guido van Rossum <guido(a)python.org>
> Subject: [Python-Dev] Pattern matching reborn: PEP 622 is dead, long
> live PEP 634, 635, 636
> To: Python-Dev <python-dev(a)python.org>
> Message-ID:
> <CAP7+vJKzn+y8gqAFUr1g=
> jOCk2if496ST00Ke8Mg921Yp5ZitQ(a)mail.gmail.com>
> Content-Type: multipart/alternative;
> boundary="00000000000039e83905b2453edf"
>
> --00000000000039e83905b2453edf
> Content-Type: text/plain; charset="UTF-8"
>
> After the pattern matching discussion died out, we discussed it with the
> Steering Council. Our discussion ended fairly positive, but there were a
> lot of problems with the text. We decided to abandon the old PEP 622 and
> break it up into three parts:
>
> - PEP 634: Specification
> - PEP 635: Motivation and Rationale
> - PEP 636: Tutorial
>
> This turned out to be more work than I had expected (basically we wrote all
> new material) but we've finally made it to a point where we can request
> feedback and submit the new version to the SC for approval.
>
> While the text of the proposal is completely different, there aren't that
> many substantial changes:
>
> - We changed walrus patterns ('v := p') to AS patterns ('p as v').
> - We changed the method of comparison for literals None, False, True to use
> 'is' instead of '=='.
> - SyntaxError if an irrefutable case[1] is followed by another case block.
> - SyntaxError if an irrefutable pattern[1] occurs on the left of '|', e.g.
> 'x | [x]'.
> - We dropped the `@sealed` decorator and everything aimed at static type
> checkers.
>
> [1] An irrefutable pattern is one that never fails, notably a wildcard or a
> capture. An irrefutable case has an irrefutable pattern at the top and no
> guard. Irrefutability is defined recursively, since an '|' with an
> irrefutable pattern on either side is itself irrefutable, and so is an AS
> pattern with an irrefutable pattern before 'as'.
>
> The following issues were specifically discussed with the SC:
>
> - Concerns about side effects and undefined behavior. There's now some
> specific language about this in a few places (giving the compiler freedom
> to optimize), and a section "Side Effects and Undefined Behavior".
>
> - Footgun if `case NAME:` is followed by another case. This is now a
> SyntaxError.
>
> - Adding an 'else' clause. We decided not to add this; motivation in PEP
> 635.
>
> - Alternative 'OR' symbol. Not changed; see PEP 635.
>
> - Alternative wildcard symbol. Not changed, but Thomas wrote PEP 640 which
> proposes '?' as a general assignment target. PEP 635 has some language
> against that idea.
>
> - Alternative indentation schemes. We decided to stick with the original
> proposal; see PEP 635.
>
> - Marking all capture variables with a sigil. We all agreed this was a bad
> idea; see PEP 635.
>
> --
> --Guido van Rossum (python.org/~guido)
> *Pronouns: he/him **(why is my pronoun here?)*
>
Hi Nick and Everyone,
We had actually considered a similar idea (i.e. load sigils) during
the design phase of pattern matching. In the interest of having a
rule that is as simple as possible, we had proposed to use a leading
dot as a universal marker. Tin's example would thus have been written
as::
match r:
case (src, None): ...
case (.c, msg): ...
case (.s, msg): ...
However, this idea was met with some resistance. After briefly
looking at various alternatives again, we eventually decided to defer
this discussion entirely, allowing for the community to perhaps gain
some experience with the basic pattern matching infrastructure and
have a more in-depth discussion later on.
Paul also wrote [1]:
> Nice to hear that there're (high-hierarchy) people who want to do
> 2nd round on intent-explicitizing sigils, thanks.
While we from the PEP-622/634/635/636 team are quite adamant that
stores should *not* be marked, having a second round of discussion
about load sigils is quite exactly what we aimed for! However, we
should consider this to be a discussion about an *extension* of the
existing PEPs (634-636), rather than about modifying them:
*The introduction of a load sigil (be it the dot or a question mark or
anything else) can actually be discussed quite independently of the
rest of pattern matching.*
You might have noticed that the original PEP 622 contained a lot more
than the current PEPs 634-636. This is intentional: with the current
pattern matching PEPs, we boiled down the entire concept to the basic
infrastructure that we need in order to get it going; a basic "starter
kit" if you will. There are a lot of ideas around for extending this
basic pattern matching and make it much more powerful and versatile,
including load sigils as proposed by PEP 642. But let us perhaps just
start with pattern matching---hopefully in 3.10 :)---and then
gradually build on that. Otherwise, I am afraid we will just keep
running in circles and never get it to lift off.
Cheers,
Tobias
[[1]]
https://mail.python.org/archives/list/python-dev@python.org/message/QPYBAPO…
I vote against removal.
We have no compelling need to disrupt an entire community and ecosystem even though it it is small.
To anyone chiming in to say, yes drop the support, ask whether you've consulted any of the users — they should have a say in the matter. It is better for them to be a bit neglected than to be cut it off entirely.
FWIW, when the tracker issue landed with a PR, I became concerned that it would be applied without further discussion and without consulting users. So I asked on Twitter whether Solaris was being used. If you're interested in the responses, see the thread at: https://twitter.com/i/status/1321917936668340227 (Victor can't see it because he blocked my account a long time ago). Also take a look at the user comments on the tracker: https://bugs.python.org/issue42173 . For those who don't follow links, here's a sample:
* "Platform genocide is both unnecessary and unwarranted." -- brett3
* "Please do not drop support." -- jm650
* "I just want to lend my voice in favor of maintaining "Solarish" support as well, and offer what help I may for resolving issues."-- robertfrench
* "No no no, please don't." -- tbalbers
* "Please do not drop support for SunOS." -- mariuspana
* "Please continue support for Solaris/IllumOS! This is very important for us." -- marcheschi
* "Please don't drop Solaris support, we still use it to this day." -- abarbu
* ... and many more will the same flavor
Given this kind of user response, I think it would irresponsible to drop support.
Raymond
Here are a couple comments on the Twitter thread that warrant your attention.
Apparently, this is being used by the European Space Agency on their space craft.
-- https://twitter.com/nikolaivk/status/1322094167980466178
"To be clear I will put some money where my mouth is. If we need to invest resources either in the form of developers or dollars to keep the port alive we will. By we I mean RackTop and/or Staysail Systems." -- https://twitter.com/gedamore/status/1321959956199866369
Raymond
I have installed new python version 3.9, I wanted to move all the site-packages that I have used in 3.8 to 3.9 lib. Is it possible?
I also wanted to know why we need to have lib under every specific version, it would be nice if we have common lib in which I can configure those based on the version I use. Is that available already if not is that something we can implement in future version this will help most of the developers in not moving the site-packages from one version to another every time we upgrade the version.
Regards
Rajesh Narasimhan
On behalf of the steering council, I am happy to announce that as
BDFL-Delegate I am
accepting PEP 626 -- Precise line numbers for debugging and other tools.
I am confident this PEP will result in a better experience for debuggers,
profilers and tools
that rely on tracing functions. All the existing concerns regarding
out-of-process debuggers
and profilers have been addressed by Mark in the latest version of the PEP.
The acceptance of
the PEP comes with the following requests:
* The PEP must be updated to explicitly state that the API functions
described in the
"Out of process debuggers and profilers" must remain self-contained in
any potential
future modifications or enhancements.
* The PEP states that the "f_lineno" attribute of the code object will be
updated to point to
the current line being executed even if tracing is off. Also, there were
some folks concerned with
possible performance implications. Although in my view there is no
reason to think this will impact
performance negatively, I would like us to confirm that indeed this is
the case before merging the
implementation (with the pyperformance test suite, for example).
Congratulations Mark Shannon!
Thanks also to everyone else who provided feedback on this PEP!
Regards from rainy London,
Pablo Galindo Salgado
TLDR: In os.scandir directory entries, atime is always a copy of mtime
rather than the actual access time.
Demo program: Windows 10, Python 3.8.3:
# osscandirtest.py
import time, os
with open('Test', 'w') as f: f.write('Anything\n') # Write to a file
time.sleep(10)
with open('Test', 'r') as f: f.readline() # Read the file
print(os.stat('Test'))
for DirEntry in os.scandir('.'):
if DirEntry.name == 'Test':
stat = DirEntry.stat()
print(f'scandir DirEntry {stat.st_ctime=} {stat.st_mtime=}
{stat.st_atime=}')
Sample output:
os.stat_result(st_mode=33206, st_ino=8162774324687317,
st_dev=2230120362, st_nlink=1, st_uid=0,
st_gid=0, st_size=10, st_atime=1600631381, st_mtime=1600631371,
st_ctime=1600631262)
scandir DirEntry stat.st_ctime=1600631262.951019
stat.st_mtime=1600631371.7062848 stat.st_atime=1600631371.7062848
For os.stat, atime is 10 seconds more than mtime, as would be expected.
But for os.scandir, atime is a copy of mtime.
ISTM that this is a bug, and in fact recently it stopped me from using
os.scandir in a program where I needed the access timestamp. No big
deal, but ...
If it is a feature for some reason, presumably it should be documented.
Best wishes
Rob Cliffe