[Python-Dev] Possible py3k io wierdness
Hey,
I noticed that the call pattern of the C-implemented io libraries is as
follows (translating from C to Python):
class _FileIO(object):
def flush(self):
if self.__IOBase_closed:
raise ...
def close(self):
self.flush()
self.__IOBase_closed = True
class _RawIOBase(_FileIO):
def close(self):
# do close
_FileIO.close(self)
This means that, if a subclass overrides flush(), it will be called after
the file has been closed e.g.
>>> import io
>>> class MyIO(io.FileIO):
... def flush(self):
... print('closed:', self.closed)
...
>>> f = MyIO('test.out', 'wb')
>>> f.close()
closed: True
It seems to me that, during close, calls should only propagate up the
class hierarchy i.e.
class _FileIO(object):
def flush(self):
if self.__IOBase_closed:
raise ...
def close(self):
_FileIO.flush(self)
self.__IOBase_closed = True
I volunteer to change this if there is agreement that this is the way to go.
Cheers,
Brian
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Bluetooth 4.0 support in "socket" module
On Mon, Jul 14, 2014 at 10:30 AM, Skip Montanaro wrote: > On Mon, Jul 14, 2014 at 8:57 AM, Tim Tisdall wrote: > > Is there some online documentation with guidelines on how to contribute? > > http://lmgtfy.com/?q=contribute+to+python This response is unacceptable. Tim: check out https://docs.python.org/devguide/ and perhaps look at the core-mentorship[0] mailing list while coming up with your first contributions. It's a good first step to getting some guidance on the process and getting some eyes on your early patches. [0] https://mail.python.org/mailman/listinfo/core-mentorship/ ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Sad status of Python 3.x buildbots
On Tue, Sep 2, 2014 at 5:53 PM, Nick Coghlan wrote: > > On 3 Sep 2014 08:15, "Victor Stinner" wrote: > > > > x86 RHEL 6 3.x: TestReadline.test_init() fails, issue #19884. I don't > > have to this platform, I don't know how to fix it. > > Sorry, I haven't been a very good maintainer for that buildbot (the main > reason it never graduated to the "stable" list). If you send me your public > SSH key, I can add it (I think - if not, I can ask Luke to do it). > Alternatively, CentOS 6 may exhibit the same problem. > > From a completely different perspective, does anyone have experience with > using BuildBot with OpenStack hosted clients? We may be able to take > advantage of the PSF's new(ish) Rackspace infrastructure to provide more > stable test VMs. > Is this a Buildbot feature (as in Buildbot master spins up VMs fresh for a test run, or something), or do you just want to spin up a bunch of VMs, give access, and we configure them the same as we do today? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Status of C compilers for Python on Windows
On Thu, Oct 9, 2014 at 7:29 PM, Victor Stinner wrote: > Hi, > > Windows is not the primary target of Python developers, probably > because most of them work on Linux. Official Python binaries are > currently built by Microsoft Visual Studio. Even if Python developers > get free licenses thanks for Microsoft, I would prefer to use an open > source compiler if it would be possible. So *anyone* can build Python > from scatch. I don't like the requirement of having a license to build > Python. The free version (Visual Studio Express) only supports 32-bit > and doesn't support PGO build (Profile-Guided Optimizations, which are > disabled if I remember correctly because of compiler bugs). > > I know that it's hard to replace Visual Studio. I don't want to do it > right now, but I would like to discuss that with you. Although I'm not very active around here much anymore, I was primarily working on Windows things within the last few years. While we have a lot of Windows users, we don't have a lot of Windows contributors. The huge amount of churn necessary to make a change away from VS, or the more likely move to make it possible to support both VS and , seems like a large amount of work that doesn't turn up much of a benefit. Especially for a platform with constrained developer availability, working software trumps all, so I don't expect that a project like this is going to see the regular contributors shifting their focus away from improving Python as it is. With that said, I do see the benefit of being able to build Python with a free compiler. It would be great for us to be able to say it's always built with free tools, but I'm not sure who's going to make this happen... ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [IPython-User] proper animation in notebook?
On Sat, Oct 11, 2014 at 4:07 AM, Steve Holden wrote: > I found the following code appeared to work without any issues: > > %matplotlib inline > import numpy as np > import matplotlib.pyplot as plt > > import sys > import time > from IPython.display import display, clear_output > > x=np.linspace(0,6,100) > for t in np.linspace(0,20,100): >clear_output(wait=True) >f=plt.figure(figsize=(10,10)) >plt.plot(np.sin(x)*np.sin(t),'-o') >plt.gca().set_ylim([-1,1]) >display(f) >plt.close() > > Further queries should be sent to the python-dev list, as this one is being > phased out. > Running this code makes a working animation, but watching the memory usage of the python2.7 process it is clear there is a memory leak - it starts around 150 M and climbs to 300 M. Running for longer keeps this going. I think the figures are being generated, cleared in the notebook, but still existing somehow in the background. Is there a way to determine if this is happening? Is there a proper way to write the animation to avoid this? thanks! Brian Blais - [email protected] http://web.bryant.edu/~bblais ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Move selected documentation repos to PSF BitBucket account?
On Sun, Nov 23, 2014 at 5:57 PM, Steven D'Aprano wrote: > On Sun, Nov 23, 2014 at 08:55:50AM -0800, Guido van Rossum wrote: > >> But I strongly believe that if we want to do the right thing for the >> long term, we should switch to GitHub. > > Encouraging a software, or social, monopoly is never the right thing for > the long term. > > http://nedbatchelder.com/blog/201405/github_monoculture.html > > >> I promise you that once the pain of the switch is over you will feel >> much better about it. I am also convinced that we'll get more >> contributions this way. > > I'm sure that we'll get *more* contributions, but will they be *better* > contributions? > > I know that there are people who think that mailing lists are old and > passe, and that we should shift discussion to a social media site like > Reddit. If we did, we'd probably get twenty times as many comments, and > the average quality would probably plummet. More is not necessarily a > good thing. If we need to ensure that we're getting better contributions than we are now, then we should be interviewing committers, rejecting newcomers (or the opposite, multiplying core-mentors by 100), and running this like a business. I've written some crappy code that got committed, so I should probably be fired. Enabling our community to be active contributors is an important thing. Give them a means to level up and we'll all be better off from it. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
On Tue, Dec 16, 2014 at 2:15 PM, Skip Montanaro wrote: > > On Tue, Dec 16, 2014 at 1:58 PM, Marko Rauhamaa wrote: >> >> IMO, you should consider forking your library code for Python2 and >> Python3. > > > I don't get the idea that Brett Cannon agrees with you: > > http://nothingbutsnark.svbtle.com/commentary-on-getting-your-code-to-run-on-python-23 > > While he doesn't explicitly say so, I got the distinct impression reading > his recent blog post that he supports one source, not forked sources. > > In the absence to evidence to the contrary, I think of Brett as the most > expert developer in the porting space. I'm a few inches shorter than Brett, but having done several sizable ports, dual-source has never even on the table. I would prefer the "run 2to3 at installation time" option before maintaining two versions (which I do not prefer at all in reality). ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Compile Python on Windows (OpenSSL)
On Tue, Jan 13, 2015 at 4:04 PM, Victor Stinner wrote: > Hi, > > To compile Python on Windows, there are a few information in the > Developer Guide: > https://docs.python.org/devguide/setup.html#windows-compiling > > Python 3.5 now requires Visual Studio 2010 *SP1*, or newer Visual Studio: > http://bugs.python.org/issue22919#msg233637 > > I found PCbuild\readme.txt which is not mentionned in the devguide :-/ > https://hg.python.org/cpython/file/56f717235c45/PCbuild/readme.txt > (at least not on the Windows section of the setup page) > > I found some clues to build OpenSSL to be able to build the Python ssl > module, but I still have issues. > > Is there a more complete documentation? > > I found how to install svn.exe, perl.exe and nasm.exe, but not how to > install nmake.exe. I don't know the command to build OpenSSL. For nmake, are you running this in a regular Command Prompt or in the Visual Studio Command Prompt? The latter sets the right environment to point you to some tools that VS installs, including nmake. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Compile Python on Windows (OpenSSL)
On Tue, Jan 13, 2015 at 4:36 PM, Victor Stinner wrote: > 2015-01-13 23:18 GMT+01:00 Steve Dower : >> Technically, Python 3.5 requires Visual Studio 2015 > > For me, it's *very* difficult to find how to install Visual Studio. > There are many different websites and web pages which mention Visual > Studio with a lot of versions and "flavors" (Express, Community, > Ultimate, etc.). > > Visual Studio 2015 was not released yet :-/ > > My VM has only a disk of 40 GB. Only 12 GB are free. I already have VS > 2008 Express and VS 2010 Express installed. I understood that > "Ultimate" includes a *lot* of things, not only a C compiler. > > I found a "free" Visual Studio which is in fact Visual Studio 2013 > Community and I read that it's not free. > > I sent an email to Brian Curtin to ask to renew my MSDN account. He > didn't reply yet. I saw that and will send it on, but it's still going to take some time to process - usually a week or so. In the meantime, the first result searching for Visual Studio 2015 came up with http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx, which seems to give you VS2015. I haven't tried to run it since I'm not on Windows at the moment, but it looks correct. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] development
On Wednesday, January 28, 2015, Alan Armour wrote: > can you guys develop an audio kit that works around jackd or on windows > directx? and tutorials to write synthesizers. and drum machines like a > tr-606 with triggers ( I want to trigger a drum synth like the March > UDS(Soviet) Coolest drum synth EVER. > > > Also, I think you should have a way to write assembler functions to really > optimize speed and have a table and stuff for assembler learning for all > cpus and stuff. even asm graphics and audio would be super useful in some > instances. > That's not how this works. If you would like to write all of that code and allow it to mature in the wild while building a following around it and ensuring it is the best of its kind and a general enough solution to be included in the Python standard library, inclusion of that could be discussed in the future. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Why does pip upgrade to a random version?
On Wed, Feb 4, 2015 at 1:04 PM, Martin Thoma wrote: > Could somebody please have a look at the following SO question? It seems as > if I might have found a bug in pip: > http://stackoverflow.com/q/28282671/562769 > > TL;DR of the SO question: > I executed `$ sudo pip install hwrt --upgrade` mutiple times and got a - > seemingly random - version of hwrt installed. Try the pip mailing list: https://groups.google.com/forum/#!forum/pypa-dev ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] pep 7
On Fri, Mar 20, 2015 at 7:54 PM, Neil Girdhar wrote:
> If ever someone wants to clean up the repository to conform to PEP 7, I
> wrote a program that catches a couple hundred PEP 7 violations in ./Python
> alone (1400 in the whole codebase):
>
> import os
> import re
>
> def grep(path, regex):
> reg_obj = re.compile(regex, re.M)
> res = []
> for root, dirs, fnames in os.walk(path):
> for fname in fnames:
> if fname.endswith('.c'):
> path = os.path.join(root, fname)
> with open(path) as f:
> data = f.read()
> for m in reg_obj.finditer(data):
> line_number = sum(c == '\n'
> for c in data[:m.start()]) + 1
> res.append("{}: {}".format(path, line_number))
> return res
>
> for pattern in [
> r'^\s*\|\|',
> r'^\s*\&\&',
> r'} else {',
> r'\ ]:
> print("Searching for", pattern)
> print("\n".join(grep('.', pattern)))
>
> In my experience, it was hard to write PEP 7 conforming code when the
> surrounding code is inconsistent.
You can usually change surrounding code within reason if you want to
add conforming code of your own, but there's little value and high
risk in any mass change just to apply the style guidelines.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] pep 7
On Fri, Mar 20, 2015 at 10:02 PM, Neil Girdhar wrote: > The code reviews I got asked me to revert PEP 7 changes. I can understand > that, but then logically someone should go ahead and clean up the code. > It's not "high risk" if you just check for whitespace equivalence of the > source code and binary equivalence of the compiled code. The value is for > people who are new to the codebase. There are a lot of areas of the C code that aren't explicitly or directly tested, so yes, a lot of changes are high risk, especially in bulk. While a one time change while checking binary equivalence would do it, it's also a huge amount of churn just to follow a guideline. Without an automated checker for the guidelines, if things get in they just get in, and sometimes you can modify them while making improvements to the code, but sometimes it depends on what exactly you're doing as well. On top of this, we already disallow mass PEP 8 changes to avoid the churn there as well, and it took a good bit of convincing for another semi-recent mass change (although I can't remember the topic, but it was deemed safe enough to make). Another common issue with mass code churn like this is that it affects tooling, such as `hg blame` ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] pep 7
On Fri, Mar 20, 2015 at 10:57 PM, Guido van Rossum wrote: > Neil, you have no idea. Please back off. I wouldn't go that far. Wanting a quality code base certainly isn't a bad thing, but there's a lot more progress to be made by working with what's there and being as mindful as possible of the guidelines moving forward. After all, they're guidelines, not rules. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] version of freshly built 2.7 python
On Thu, Apr 2, 2015 at 10:19 PM, Ethan Furman wrote: > On 04/02, Alexander Walters wrote: >> On 4/2/2015 21:29, Ethan Furman wrote: >>> >>> I just built the latest version of Python 2.7 on my development machine -- >>> or so I thought. When I invoke it, I get: >>> >>>Python 2.7.6+ (2.7:1beb3e0507fa, Apr 2 2015, 17:57:53) >>> >>> Why am I not seeing 2.7.9? >> >> Are you building from mercurial or a source tarball? > > Mercurial: > > ethan@code:~/source/python/python2.7$ hg parent > changeset: 90450:1beb3e0507fa > branch: 2.7 > parent: 90434:b428b803f71f > user:Zachary Ware > date:Thu Apr 24 13:20:27 2014 -0500 > files: Lib/test/test_itertools.py > description: > Issue #21346: Fix typos in test_itertools. Patch by Brian Kearns. That's almost a year old. Update it? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [python-committers] Do we need to sign Windows files with GnuPG?
On Fri, Apr 3, 2015 at 7:25 AM, Paul Moore wrote: > On 3 April 2015 at 10:56, Larry Hastings wrote: >> My Windows development days are firmly behind me. So I don't really have an >> opinion here. So I put it to you, Windows Python developers: do you care >> about GnuPG signatures on Windows-specific files? Or do you not care? > > I don't have a very strong security background, so take my views with > a pinch of saly, but I see Authenticode as a way of being sure that > what I *run* is "OK". Whereas a GPG signature lets me check that the > content of a file is as intended. So there are benefits to both, and I > thing we should continue to provide GPG signatures. (Disclaimer: I've > never in my life actually *checked* a GPG signature for a file...) I haven't been on Windows in a bit, but this is my understanding/expectation as well. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reorganize Python categories (Core, Library, ...)?
On Wed, Oct 4, 2017 at 5:52 AM, Victor Stinner wrote: > Hi, > > Python uses a few categories to group bugs (on bugs.python.org) and > NEWS entries (in the Python changelog). List used by the blurb tool: > > #.. section: Security > #.. section: Core and Builtins > #.. section: Library > #.. section: Documentation > #.. section: Tests > #.. section: Build > #.. section: Windows > #.. section: macOS > #.. section: IDLE > #.. section: Tools/Demos > #.. section: C API > > My problem is that almost all changes go into "Library" category. When > I read long changelogs, it's sometimes hard to identify quickly the > context (ex: impacted modules) of a change. > > It's also hard to find open bugs of a specific module on > bugs.python.org, since almost all bugs are in the very generic > "Library" category. Using full text returns "false positives". > > I would prefer to see more specific categories like: > > * Buildbots: only issues specific to buildbots > I would expect anything listed under buildbot to be about infrastructure changes related to the running of build machines. I think what you're getting at are the bugs that appear on build machines that weren't otherwise caught during the development of a recent change. In the end those are still just bugs in code, so I'm not sure I would group them at such a high level. Wouldn't this be a better use of the priority field? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [edk2] Official port of Python on EDK2
Thiebaud: Thank you. I have started discussions within Intel for updating the UEFI CPython implementation to Python 3.x. The TianoCore community would appreciate contributions by people with Python experience to bring this code up to current standards. Please review the contribution guidelines for TianoCore and let me know if you have any questions. http://www.tianocore.org/contrib/ Thanks ... br --- Brian Richardson, Senior Technical Marketing Engineer, Intel Software [email protected] -- @intel_brian (Twitter & WeChat) https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson -Original Message- From: edk2-devel [mailto:[email protected]] On Behalf Of Thiebaud Weksteen Sent: Wednesday, November 1, 2017 5:07 AM To: [email protected] Cc: [email protected] Subject: [edk2] Official port of Python on EDK2 Hi, UEFI has become the standard for firmware (BIOS) interface. Intel has provided an open source implementation under the name EDK2 (part of the TianoCore initiative) [1] for some time. This implementation has evolved significantly and now provides the functionalities of a small OS with a standard library similar to POSIX. In 2011, a port of Python 2.7.1 was added to the EDK2 repository [2]. This port then evolved to 2.7.2 which is still defined as the reference port [3]. In 2015, another port was added of Python 2.7.10 in parallel of 2.7.2 [4]. Since then, both implementations have diverged from upstream and know vulnerabilities have not been fixed. I would like to bring support for edk2 in the official Python repository to remediate this situation, that is officially support edk2 as a platform. Technically, there would be three main aspects for the on-boarding work: 1) Fix headers and source to resolve definition conflicts, similarly to ABS definition in [5]; 2) Add the edk2module.c [6] to handle platform-specific functionalities, similarly to the posixmodule.c; 3) Add the build configuration file [7] and necessary modifications within Python to handle the edk2 toolchain; This work would target the master branch (that is Python 3). I would be interested in hearing your thoughts on this idea. Thanks, Thiebaud [1] https://github.com/tianocore/edk2 [2] https://github.com/tianocore/edk2/commit/006fecd5a177b4b7b6b36fab6690bf2b2fa11829 [3] https://github.com/tianocore/edk2/blob/master/AppPkg/Applications/Python/PythonReadMe.txt [4] https://github.com/tianocore/edk2/commit/c8042e10763bca064df257547d04ae3dfcdfaf91 [5] https://gist.github.com/tweksteen/ed516ca7ab7dfa8d18428f59d9c22a3e [6] https://github.com/tianocore/edk2/blob/master/AppPkg/Applications/Python/Efi/edk2module.c [7] https://github.com/tianocore/edk2/blob/master/AppPkg/Applications/Python/PythonCore.inf ___ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Why is Python for Windows compiled with MSVC?
On Thu, Feb 1, 2018 at 4:19 AM, Oleg Sivokon wrote: > > > so why shouldn’t the one with the most users? > > Because it makes compilation difficult, and cross-compilatin completely > impossible? Why is it difficult: a package maintainer needs to (1) buy MS > Windows (2) create a special workflow for compiling on a different > machine. This is both costly and inconsistent with free-as-in-freedom... > It makes cross-compilation impossible because libraries produced by any > tool that can run on all target platforms are incompatible with Python > binaries on MS Windows. > > Again, many languages (i.e. projects similar in size an purpose to > CPython) took a different approach: they use GNU compilers to be able to > compile cross-platform. This is true for Ruby and Go at least. I would > need to investigate further, but I think these two examples should be > enough. > They should be enough for *what*, though? You can tell people what everyone else is doing, but the difference between that and what we have is someone's time and effort. > I’m likely biased because I work there and I’m the main intermediary with > python-dev, but these days Microsoft is one of the strongest supporters of > CPython. We employ the most core developers of any private company and we > all are allowed work time to contribute, we provide full access to our > development tools and platforms to all core developers and some prominent > projects, we’ve made fixes, enhancements and releases or core products such > as the CRT, MSVC, Visual Studio, Visual Studio Code, and Azure SPECIFICALLY > to support CPython development and users. As far as I know, ALL the Windows > buildbots are running on Azure subscriptions that Microsoft provides > (though managed by some awesome volunteers). You’ll see us at PyCon US > under the biggest banner and we’ll have a booth filled with engineers and > not recruiters. Crash reports from thousands of opted-in users come into > our systems and have directly lead to both CPython and Windows bug fixes. > > Oh, so this is the real reason... well, corporate interests are hard to > argue against. But, this is an interesting statistic nevertheless. Thanks > for letting me know. I think that's a mischaracterization of the situation. The MS toolchain was chosen some time long before I (or Steve) got involved, and when I upgraded us from VS2008 to VS2010 for 3.3 ~6 years ago I had several messages similar to this thread. As much as Steve is unlikely to do the work to initiate and maintain support of these other tools—whether due to his employer's interests or his own—I too was unlikely to do work like this thread is asking. In fact, the chances I would have done it were zero because I was sitting on my couch upgrading our Visual Studio versions because it let me do better stuff at my day job, though I was always open to review patches that supported alternatives without major disruption. However, they never came. I suspect the same could be said of Martin and anyone else working in this area prior to that, because nothing has really changed. Like the previous times this sort of question has come up—and really, for any question on this list—it ultimately turns into a matter of how much the solution is wanted and how much effort people are willing to give to make it happen. Historically, the former has had small amounts, and the latter has had much smaller amounts. Without a change there I don't think one will materialize in a released version of Python. Brian ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Drop/deprecate Tkinter?
On Wed, May 2, 2018 at 16:55 Ivan Pozdeev via Python-Dev < [email protected]> wrote: > As https://bugs.python.org/issue33257 and > https://bugs.python.org/issue33316 showed, Tkinter is broken, for both > Py2 and Py3, with both threaded and non-threaded Tcl, since 2002 at > least, and no-one gives a damn. > > This seems to be a testament that very few people are actually > interested in or are using it. > > If that's so, there's no use keeping it in the standard library -- if > anything, because there's not enough incentive and/or resources to > support it. And to avoid screwing people (=me) up when they have the > foolishness to think they can rely on it in their projects -- nowhere in > the docs it is said that the module is only partly functional. For the future, this is not how you communicate with the development mailing list of any open source software project. I would suggest reading https://www.python.org/psf/codeofconduct/ for some pointers on how people typically behave around here in particular. > ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Drop/deprecate Tkinter?
On Wed, May 2, 2018 at 5:37 PM Antoine Pitrou wrote: > On Wed, 2 May 2018 23:28:22 +0200 > Antoine Pitrou wrote: > > On Wed, 02 May 2018 21:24:07 +0000 > > Brian Curtin wrote: > > > On Wed, May 2, 2018 at 16:55 Ivan Pozdeev via Python-Dev < > > > [email protected]> wrote: > > > > > > > As https://bugs.python.org/issue33257 and > > > > https://bugs.python.org/issue33316 showed, Tkinter is broken, for > both > > > > Py2 and Py3, with both threaded and non-threaded Tcl, since 2002 at > > > > least, and no-one gives a damn. > > > > > > > > This seems to be a testament that very few people are actually > > > > interested in or are using it. > > > > > > > > If that's so, there's no use keeping it in the standard library -- if > > > > anything, because there's not enough incentive and/or resources to > > > > support it. And to avoid screwing people (=me) up when they have the > > > > foolishness to think they can rely on it in their projects -- > nowhere in > > > > the docs it is said that the module is only partly functional. > > > > > > > > > For the future, this is not how you communicate with the development > > > mailing list of any open source software project. I would suggest > reading > > > https://www.python.org/psf/codeofconduct/ for some pointers on how > people > > > typically behave around here in particular. > > > > Perhaps it would be more constructive to address the OP's point than to > > play speech police. > > To elaborate a bit: the OP, while angry, produced both a detailed > analysis *and* a PR. It's normal to be angry when an advertised > feature doesn't work and it makes you lose hours of work (or, even, > forces you to a wholesale redesign). Producing a detailed analysis and a > PR is more than most people will ever do. > It may be normal to be angry when something doesn't work the way it should, but analyzing and creating a PR aren't the gateway to normalizing this behavior. Sending thousands of people this type of email isn't how it works. To address their point: no, next topic. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Dealing with tone in an email
On Thu, May 3, 2018 at 2:45 PM Ivan Pozdeev via Python-Dev < [email protected]> wrote: > On 03.05.2018 21:31, Brett Cannon wrote: > > > > On Thu, 3 May 2018 at 01:27 Paul Moore wrote: > >> On 3 May 2018 at 03:26, Steven D'Aprano wrote: >> >> >> Will all due respect, it's sometimes unpredictable what kind of wording >> >> Anglo-Saxons will take as an insult, as there's lot of obsequiosity >> >> there that doesn't exist in other cultures. To me, "not give a damn" >> >> reads like a familiar version of "not care about something", but >> >> apparently it can be offensive. >> > >> > I'm Anglo-Saxon[1], and honestly I believe that it is thin-skinned to >> > the point of ludicrousness to say that "no-one gives a damn" is an >> > insult. This isn't 1939 when Clark Gable's famous line "Frankly my dear, >> > I don't give a damn" was considered shocking. Its 2018 and to not give a >> > damn is a more forceful way of saying that people don't care, that they >> > are indifferent. >> >> Sigh. That's not what I was saying at all. I was trying to point out >> that Antoine's claim that people should ignore the rhetoric and that >> complaining about the attitude was unreasonable, was in itself unfair. >> People have a right to point out that a mail like the OP's was badly >> worded. >> >> > With respect to Paul, I literally cannot imagine why he thinks that >> > *anyone*, not even the tkinter maintainers or developers themselves, >> > ought to feel *offended* by Ivan's words. >> >> Personally, they didn't offend me. I don't pretend to know how others >> might take them. But they *did* annoy me. I'm frankly sick of people >> (not on this list) complaining that people who work on projects in >> their own time, free of charge, "don't care enough" or "are ignoring >> my requirement". We all do it, to an extent, and it's natural to get >> frustrated, but the onus is on the person asking for help to be polite >> and fair. And maybe this response was the one where I finally let that >> frustration show through. I may read less email for a week or two, >> just to get a break. >> > > I had the same response as Paul: annoyed. And while Ivan thought he was > using "emotional language to drive the point home that it's not some > nitpick", it actually had the reverse effect on me and caused me not to > care because I don't need to invite annoyance into my life when putting in > my personal time into something. > > No one is saying people can't be upset and if you are ever upset there's > something wrong; we're human beings after all. But those of us speaking up > about the tone are saying that you can also wait until you're not so upset > to write an email. This was never going to be resolved in an hour, so > waiting an hour until you're in a better place to write an email that > wasn't quite so inflammatory seems like a reasonable thing to ask. > > Let me express things right from the horse's mouth. > > The sole purpose of the tone was to not let the mesage be flat-out ignored. > I had my neutral-toned, to-the-point messages to mailing lists flat-out > ignored one too many times for reasons that I can only guess about. > This time, the situation was too important to let that happen. > > Whatever anyone may think of this, it worked. I got my message through, > and got the feedback on the topic that I needed to proceed in resolving the > problem that caused it. > I seriously doubt I could achieve that with a neutral-toned message just > stating the facts: dry facts would not show ppl how this could be important > ("ah, just another n00b struggling with Tkinter basics" or something). > As I said on the other thread, that doesn't make it any more acceptable as over time it normalizes the behavior. If enough people want results—because yes, sometimes things break, it's not fun, and sometimes things don't receive response in the most timely fashion—they'll take that tone and sometimes get what they want. Eventually it'll work enough that it becomes more acceptable to behave that way, and eventually the people who are willing to accept that type of behavior will be gone. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2)
On Thu, May 28, 2015 at 11:23 AM, Chris Barker wrote: > I'm confused: > > Doesn't py2exe (optionally) create a single file executable? > > And py2app on the Mac creates an application bundle, but that is > more-or-less the equivalent on OS-X (you may not even be able to have a > single file executable that can access the Window Manager, for instance) > > Depending on what extra packages you need, py2exe's single file doesn't > always work, but last I tried, it worked for a fair bit (I think all of the > stdlib). > > I don't know what PyInstaller or others create. And I have no idea if there > is a linux option -- but it seems like the standard of practice for an > application for linux is a bunch of files scattered over the system anyway > :-) > > Yes, the resulting exe is pretty big, but it does try to include only those > modules and packages that are used, and that kind of optimization could be > improved in any case. > > So is something different being asked for here? > > Barry Warsaw wrote: >>> I do think single-file executables are an important piece to Python's >>> long-term competitiveness. > > Really? It seems to me that desktop development is dying. What are the > critical use-cases for a single file executable? Donald mentioned one earlier: command line utilities. I want a single CLI I can deploy to my customers that doesn't make them have to install Python or even know it's Python at all. My users write code in all types of languages on all OSes, but I should be able to produce one thing that they can all use. Donald himself initiated the CLI in particular I'm talking about, but Go is picking up steam here as we have other utilities that quickly solved the "write one thing, every user can run it immediately, no one knows/cares what it's written in" When I worked on Ubuntu One, I was the Windows guy responsible for making sure the end-user experience was the same there as it was on Ubuntu. On Ubuntu we were a part of the base install and didn't have to worry about much. On Windows we had none of that, not even the C runtime, so we had some pre-installer work to do, and then a bunch of py2exe hacking to make everything play nicely and transparently. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] A quick word on top posting
On Monday, July 20, 2015, Emile van Sebille wrote: > Your +infinity could have easily been top posted -- particularly when > there's no in-line comments that require context. > > just-because-I'm-on-what-feels-like-a-300-baud-connection-ly yr's, > > Emile > > > On 7/19/2015 2:16 PM, Mark Lawrence wrote: > >> On 19/07/2015 22:06, Brett Cannon wrote: >> > > > > There is absolutely no reason we can't keep discussions cordial, >>> friendly, and on-point on this list and prevent this sort of debacle >>> from occurring again. >>> >>> >> +infinity >> > Empty replies like a fake vote should just not occur in general. That's not usually an issue on this list, but I see many others plagued by such responses and hope we never end up on that path (especially people +1'ing a +1...). Remember that not only do we need to keep emails to the characteristics Brett mentioned for the sake of having a healthy discussion list, we should strive to keep the noise as close to zero as possible as mails sent to this list reach *a lot* of people. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Washington DC Python sprint report
I would like to propose a mixed core-dev none-core-dev sprint to occur in Chicago within the next couple months. ChiPy (http://chipy.org) can help sponsor. I am going to share my thoughts on this with the group-organizers < [email protected]> list first in order to get some feedback. Post found here: https://mail.python.org/pipermail/group-organizers/2015-September/000441.htm Regards, Brian Ray ChiPy organizer ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Washington DC Python sprint report
meant: https://mail.python.org/pipermail/group-organizers/2015-September/000441.html ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 506 secrets module
> On Sat, Oct 17, 2015 at 03:26:46AM +1100, Steven D'Aprano wrote: [snip] > But significanly, only *one* of the commenters has claimed to have > any significant experience in crypto work, and I will quote him: I didn't specifically claim the experience you requested in responding to your post on comp.lang.python because I thought that this was implied in making a response. In fact I have 30+ years of experience in implementing cryptographic code (much involving random numbers) so there were at least two respondents who could have made this claim. For the record, I consider it desirable in code involving security to exhibit the minimum functionality neccessary to get a job done. This is because funtionality and security very often work against each other in building secure systems. I hence support your conclusion that the module should offer randbelow alone. I would oppose offering randomrange (or offering more than one of them) since this will pretty well guarantee that, sooner or later, someone will make a mistake in using the extra functionality and possibly deploy an insecure application as a result. Brian Gladman ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] PEP 506 secrets module
> Guido van Rossum wrote: > I'm fine with dropping the 3rd arg. But I find the argument to > introduce a new spelling for 1-arg randrange() weak. I should stress that my preference for randbelow over randrange was based purely on their proposed functionality and not on their names. I do however have a preference for a function of minimum required functionality, i.e. one that allows only a single parameter (N) to set the range 0 .. N-1. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Benchmark results across all major Python implementations
On Monday, November 16, 2015, Brett Cannon > wrote:
>
>
> On Mon, 16 Nov 2015 at 12:24 Maciej Fijalkowski wrote:
>
>> Hi Brett
>>
>> Any thoughts on improving the benchmark set (I think all of
>> {cpython,pypy,pyston} introduced new benchmarks to the set).
>>
>
> We should probably start a mailing list
>
There is/was a [email protected] list.
> "speed.python.org" becoming a thing is generally stopped on "noone
>> cares enough to set it up".
>>
>
> Oh, I know. I didn't say this could be considered wishful thinking since I
> know I have enough on my plate to prevent me from making it happen.
>
There was a grant given years ago to improve some of this stuff but I don't
believe the work ever saw the light of day.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Benchmark results across all major Python implementations
On Monday, November 16, 2015, Brett Cannon > wrote:
>
>
> On Mon, 16 Nov 2015 at 12:24 Maciej Fijalkowski wrote:
>
>> Hi Brett
>>
>> Any thoughts on improving the benchmark set (I think all of
>> {cpython,pypy,pyston} introduced new benchmarks to the set).
>>
>
> We should probably start a mailing list
>
There is/was a [email protected] list.
> "speed.python.org" becoming a thing is generally stopped on "noone
>> cares enough to set it up".
>>
>
> Oh, I know. I didn't say this could be considered wishful thinking since I
> know I have enough on my plate to prevent me from making it happen.
>
There was a grant given years ago to improve some of this stuff but I don't
believe the work ever saw the light of day.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] [ANNOUNCE] fuzzpy
## *---* *fuzzpy: CPython fuzz tester is now available * * * * Version 0.8 * *https://bitbucket.org/ebadf/fuzzpy/* *---* I am pleased to announce the creation of a coverage-guided fuzz tester for CPython. It's a pretty small wrapper around LLVM's libFuzzer that enables some powerful testing logic. AFL (American Fuzzy Lop) is another popular fuzzer lately -- libFuzzer is very similar in concept to AFL. From what I've read on list archives, Victor Stinner had previously done some good fuzz testing on CPython using fusil. This project should expand on that concept. I'd love to get feedback, suggestions, patches and anything else the list can offer. Q: What is fuzzpy for? A: It's primarily for testing CPython itself, but could also be used for individual python projects too. Pure-python projects will be the simplest to integrate at this point. Also, interesting test cases output by fuzzpy may end up being useful in testing others such as pypy, pyston, etc. Q: What is a fuzz tester? A: It modifies inputs to a test case in order to find unique/rare failures. Q: What does "coverage-guided" mean? A: It means that libFuzzer is able to witness the specific code executed as a result of a given test case. It feeds this information back into an engine to modify the test cases to optimize for coverage. Q: How can I help? A1: donate cycles: build the project and crank away on one of the existing tests. Relative to other common fuzzing, it's awfully slow, so consider throwing as many cycles as you can afford to. A2: contribute tests: write a ~10-line python script that exercises a feature that you think could benefit from fuzz testing. A3: if there's interest, I can accept cryptocoin donations to purchase cycles on a cloud server. ## -- -Brian ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] The next major Python version will be Python 8
I bought it. I will confess to being your first victim. :) On Thu, Mar 31, 2016 at 4:40 PM, Victor Stinner wrote: > Hi, > > Python 3 becomes more and more popular and is close to a dangerous point > where it can become popular that Python 2. The PSF decided that it's > time to elaborate a new secret plan to ensure that Python users suffer > again with a new major release breaking all their legacy code. > > The PSF is happy to announce that the new Python release will be > Python 8! > > Why the version 8? It's just to be greater than Perl 6 and PHP 7, but > it's also a mnemonic for PEP 8. By the way, each minor release will now > multiply the version by 2. With Python 8 released in 2016 and one > release every two years, we will beat Firefox 44 in 2022 (Python 64) and > Windows 2003 in 2032 (Python 2048). > > A major release requires a major change to justify a version bump: the > new killer feature is that it's no longer possible to import a module > which does not respect the PEP 8. It ensures that all your code is pure. > Example: > > $ python8 -c 'import keyword' > Lib/keyword.py:16:1: E122 continuation line missing indentation or > outdented > Lib/keyword.py:16:1: E265 block comment should start with '# ' > Lib/keyword.py:50:1: E122 continuation line missing indentation or > outdented > (...) > ImportError: no pep8, no glory > > Good news: since *no* module of the current standard library of Python 3 > respect the PEP 8, the standard library will be simplified to one > unique module, which is new in Python 8: pep8. The standard library will > move to the Python Cheeseshop (PyPI), to reply to an old and popular > request. > > > DON'T PANIC! You are still able to import your legacy code into > Python 8, you just have to rename all your modules to add a "_noqa" suffix > to the filename. For example, rename utils.py to utils_noqa.py. A side > effect is that you have to update all imports. For example, replace > "import django" with "import django_noqa". After a study of the PSF, > it's a best option to split again the Python community and make sure > that all users are angry. > > > The plan is that in 10 years, at least 50% of the 77,000 packages on the > Python cheeseshop will be updated to get the "_noqa" tag. After 2020, > the PSF will start to sponsor trolls to harass users of the legacy > Python 3 to force them to migrate to Python 8. > > > Python 8 is a work-in-progress (it's still an alpha version), the > standard library was not removed yet. Hopefully, trying to import any > module of the standard library fails. > > Don't hesitate to propose more ideas to make Python 8 more incompatible > with Python 3! > > Note: The change is already effective in the default branch of Python: > https://hg.python.org/cpython/rev/9aedec2dbc01 > > Have fun, > Victor > ___ > Python-Dev mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/brian.cain%40gmail.com > -- -Brian ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] I hope this won't be my last comment here ~ yet it may well be...
On Thursday, April 21, 2016, Burkhard Meier wrote: > Please do allow me to share my humble experiences of being a software > professional on a Windows platform. > > Almost 20 years. > > You know what; when I tried out 'sugar Linux' or Peppermint,,,the "admin' > dude kicked me out 5 times in one sole eve, > > Maybe this is just *me*.. > > You know what: I did have my time with this *open source community*... > > I was just asking a sincere question. > > C'mon > > This was rather very ridiculous. > > > As someone who spent many years as a Windows user and several years as a contributor to the Windows build here, if you have constructive thoughts to share on Python-on-Windows, please share them...but I can't decipher what any of this message is actually about. Additionally, you may want to try the python-list mailing list. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue #XXXXX: Fix test_idle so that idlelib test cases are actually run
On Sun, Nov 3, 2013 at 8:54 PM, Terry Reedy wrote: > On 11/3/2013 11:48 PM, terry.reedy wrote: >> >> http://hg.python.org/cpython/rev/cced7981ec4d >> changeset: 86908:cced7981ec4d >> branch: 2.7 >> user:Terry Jan Reedy >> date:Sun Nov 03 23:37:54 2013 -0500 >> summary: >>Issue #X: Fix test_idle so that idlelib test cases are actually run >> under test.regrtest on 2.7. > > > This message is the one included with the patch by Ned Daily. Because a > message *was* included (not normal), hg import committed the patch > immediately, without giving me a chance to edit the patch or message. As far > as I know, there is no way I could have edited the message after the commit. > If there was, let me know. Besides what Zach mentions, most of the time you probably want to "hg import --no-commit ", run it, test it, then commit it with whatever message you want. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] NTPath or WindowsPath?
On Sat, Nov 16, 2013 at 2:50 PM, Serhiy Storchaka wrote: > 16.11.13 21:15, Antoine Pitrou написав(ла): > >> In a (private) discussion about PEP 428 and pathlib, Guido proposed >> that maybe NTPath should be renamed to WindowsPath, since the name is >> more likely to stay relevant in the middle term. What do you think? > > > What about nturl2path, os.name, sysconfig.get_scheme_names()? What about them? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 0404 and VS 2010
On Wed, Nov 20, 2013 at 5:36 PM, Christian Tismer wrote: > Hey Barry, > > > On 20.11.13 23:30, Barry Warsaw wrote: >> >> On Nov 20, 2013, at 09:52 PM, Christian Tismer wrote: >> >>> Many customers are forced to stick with Python 2.X because of other >>> products, >>> but they require a Python 2.X version which can be compiled using Visual >>> Studio 2010 or better. This is considered an improvement and not a bug >>> fix, >>> where I disagree. >> >> I'm not so sure about that. Python 2.7 can still get patches to help >> extend >> its useful life by allowing it to be built with newer compiler suites. I >> believe this has already been done for various Linux compilers. I see no >> non-technical reason why Python 2.7 can't be taught how to build with VS >> 2010 >> or newer. Details are subject to RM approval, IMHO. >> >>> I have created a very clean Python 2.7.6+ based CPython with the >>> Stackless >>> additions, that compiles with VS 2010, using the adapted project >>> structure >>> of Python 3.3.X, and I want to publish that on the Stackless website as >>> the >>> official "Stackless Python 2.8". If you consider Stackless as official >>> ;-) . >>> >>> This compiler change is currently the only deviation from CPython 2.7, >>> but we may support a few easy back-ports on customer demand. We don'd add >>> any random stuff, of course. >> >> I think you're just going to confuse everyone if you call it "Stackless >> Python >> 2.8" and it will do more harm than good. > > > Barry, that's a good thing! This way I have a chance to get my build in at > all. > And that's the question, after re-thinking: > > Where can I check my change in, if it is going to be accepted as a valid > 2.7 bug fix (concerning VS 2008 as a bug, that is is)? If you do end up checking something in, I think it should be a backport of the 3.x VS2010 work, rather than contributing your own patch starting from 2.7. Otherwise any differences in the way you did things could cause pain while merging changes between the branches. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Running the unit test as root/administrator
On Tue, Dec 3, 2013 at 8:14 PM, Ryan Gonzalez wrote: > Just don't run it on Windows... > Not helpful. I'm in meetings/training/traveling all week, but I'll get another Windows build slave up within the next few days. I used to have a spare desktop box that ran a build slave as admin so it would exercise the os.symlink code, but I moved, then the box died, etc. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2.x vs 3.x survey results
On Sun, Jan 5, 2014 at 3:08 AM, Lennart Regebro wrote: > On Sun, Jan 5, 2014 at 5:20 AM, John Yeuk Hon Wong > wrote: >> I think it helps Luca and many others (including myself) if there is a >> reference of the difference between 2.7 and Python 3.3+. > > Not specifically for 2.7 and 3.3, no. This is a fairly complete list: > > http://python3porting.com/differences.html > >> There are PEPs and books, but is there any such long list of references? >> >> If not, should we start investing in one? I know the basic one such as >> xrange and range, items vs iteritems, izip vs zip that sort of uniform >> syntax/library inclusion difference. >> >> If there is such reference available? > > I'm honestly despairing that people still don't know that there is a > free book on the topic. I have no idea how to increase the knowledge > on this point. I think we collectively need better SEO, or something like that. Python 3 would be in a better place if people actually knew the current state of things, versus asking people on "Hacker News". I constantly see people claiming they are stuck on Python 2 until NumPy, SciPy, and matplotlib are ported. Many of these people state they would love to use Python 3 if it weren't for those projects. However, those projects have all been ported -- and the first two have been available for several years now. The same goes for differences documents. I think 15 of us have written such documents, most of which cross-reference the other documents. Somehow very few people seem to know about any of them. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Enable Hostname and Certificate Chain Validation
On Wed, Jan 22, 2014 at 12:10 PM, John Yeuk Hon Wong wrote: > On 1/22/14 8:16 AM, Nick Coghlan wrote: >> >> Which is exactly the way most non-web-specialists working inside the >> comfort of corporate and academic firewalls will react to a change that >> breaks their access to internal applications, where self-signed certs and >> improperly configured internal CAs are endemic (of course, that's assuming >> they're using HTTPS at all, which I admit is an optimistic assumption). > > The number of people who are using 3.4+ in these environments is probably > very very low to be honest. I don't have a number to prove, but in that > environment people are more likely to still be using 2.6+. I think a > deprecation in 2.7+ would be nice, but forward we should just enable it by > default. > > When requests changed property calls (e.g. requests.json) to callable > instead of an attribute(from requests.json to requests.json()), I was > shocked. I had to figure out by Googling it. I found out from github > issue > > I think a hard fail is somehow necessary. > > Also, a lot of people overlook at deprecation warnings. They either don't > care or don't see it. I see a lot of deprecation warnings in the older > applications I write, but I can careless until it breaks. So as we moving > forward, we can break it. For those stuck behind, deprecation is the right > approach. They're disabled by default, so a lot of people simply don't know they exist because they also don't read the documentation. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] str.rreplace
On Fri, Jan 24, 2014 at 11:40 AM, Mark Lawrence wrote: > On 24/01/2014 17:19, Ram Rachum wrote: >> >> Hmm, on one hand I understand the need for the separation between >> python-dev and python-list, but on the other hand I don't think >> python-list is a good place to discuss Python, the language. >> >> I now looked at the 17 most recent python-list threads. Out of them: >> >> - 58% are about third-party packages. >> - 17% are off-topic (not even programming related) >> - 11% are 2-vs-3 discussions >> - 5% are job offers. >> - 5% (which is just one thread out of 17) is about Python the language. >> > > > I'm extremely impressed by your knowledge of statistics, it must have taken > you many man years of effort to analyse all 17 threads in such detail. > > >> So can you understand why someone would be reluctant to start a >> discussion in python-list about Python the language there? Especially if >> this is the same place where beginners might ask newbies questions about >> Python? (So not only are actual Python questions just 5% of the content, >> non-newbie questions are just a subset of that 5%.) >> >> it's full of people asking about third-party Python packages, or asking >> newbie questions. >> > > How terrible, fancy having the audacity to ask about third party packages or > newbie questions on the *MAIN* Python mailing list. There's yet another > reason to bring back the death penalty in the UK. Please adjust the tone of your messages if you are going to use this mailing list. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] str.rreplace
On Fri, Jan 24, 2014 at 4:50 PM, Mark Lawrence wrote: > On 24/01/2014 22:44, Brian Curtin wrote: >> >> On Fri, Jan 24, 2014 at 11:40 AM, Mark Lawrence >> wrote: >>> >>> On 24/01/2014 17:19, Ram Rachum wrote: >>>> >>>> >>>> Hmm, on one hand I understand the need for the separation between >>>> python-dev and python-list, but on the other hand I don't think >>>> python-list is a good place to discuss Python, the language. >>>> >>>> I now looked at the 17 most recent python-list threads. Out of them: >>>> >>>>- 58% are about third-party packages. >>>>- 17% are off-topic (not even programming related) >>>>- 11% are 2-vs-3 discussions >>>>- 5% are job offers. >>>>- 5% (which is just one thread out of 17) is about Python the >>>> language. >>>> >>> >>> >>> I'm extremely impressed by your knowledge of statistics, it must have >>> taken >>> you many man years of effort to analyse all 17 threads in such detail. >>> >>> >>>> So can you understand why someone would be reluctant to start a >>>> discussion in python-list about Python the language there? Especially if >>>> this is the same place where beginners might ask newbies questions about >>>> Python? (So not only are actual Python questions just 5% of the content, >>>> non-newbie questions are just a subset of that 5%.) >>>> >>>> it's full of people asking about third-party Python packages, or asking >>>> newbie questions. >>>> >>> >>> How terrible, fancy having the audacity to ask about third party packages >>> or >>> newbie questions on the *MAIN* Python mailing list. There's yet another >>> reason to bring back the death penalty in the UK. >> >> >> Please adjust the tone of your messages if you are going to use this >> mailing list. >> > > I'm sorry but I do not understand, please explain what is wrong with an > extremely heavy dose of sarcasm. There's a real discussion going on and you're just responding to throw around sarcasm. People aren't going to come to this list if you're just going to give them snarky replies. It's not helping. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Fwd: [python-tulip] Need help to finish asyncio documentation
On Sat, Feb 8, 2014 at 6:00 PM, MRAB wrote: > On 2014-02-08 23:32, Guido van Rossum wrote: >> >> We could really use more help reviewing and finishing asyncio's docs! >> > Some spelling mistakes: > > http://docs.python.org/dev/library/asyncio.html > mimicks > > http://docs.python.org/dev/library/asyncio-task.html > returing > nummber > > http://docs.python.org/dev/library/asyncio-protocol.html > correspondong > > http://docs.python.org/dev/library/asyncio-stream.html > Sublclass > > http://docs.python.org/dev/library/asyncio-subprocess.html > subproces > signale Fixed: http://hg.python.org/cpython/rev/3cfaeb788e00 - thanks! ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Getting Introduced with the Community and Looking forward to Contribute to the Project as part of Gsoc 2014
On Sun, Feb 9, 2014 at 10:34 AM, Nitika wrote: > I had got myself aware of the source to some extent and had forked on my > github account. The python source isn't forked in your github. A Github mirror of the Mercurial repository (hg.python.org) is available at https://github.com/python/cpython ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility
On Mon, Mar 10, 2014 at 8:55 AM, Victor Stinner wrote: > For example, I propose to release the next major Python version (3.5) > with the version 4.0 but without removing anything. People put a lot of weight behind version numbers, often much more than they should. Jumping to 4.0 would be a PR nightmare and would ultimately hurt this project as more people decide that switching to another language will solve their problem better than jumping from 2.x to 4.0. People already think 2.7 to 3.4 is enough of a burden. Please do not do this. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Whats New in 3.4 is pretty much done...
On Thu, Mar 13, 2014 at 8:29 PM, Terry Reedy wrote: > On 3/13/2014 7:34 AM, Stephen J. Turnbull wrote: >> >> Christian Heimes writes: >> >> > But I don't want it to sound like an advert... Suggestions? >> >> Not to worry. It *can't* be an advert -- it's all true, and there are >> no irrelevant half-naked glistening bodies. (Former newts in the pond >> don't count.) >> >> Seriously, while "expect a clean build" is not "news" for Python, > > > It is for a Windows repository build. I just rebuilt: 3.3 gives lots of > warning from multiple files; 3.4 none. > > >> Accompanied by an open invitation for reports to >> the contrary, that's hardly like a commercial. > > > Now that no warnings is a serious goal for 3.4+, I will report them should > they recur. If we're at no warnings, and no warnings is a serious goal, warnings should be errors. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.7.7. on Windows
On Mon, Apr 28, 2014 at 3:07 PM, Mike Miller wrote: > > On 04/29/2014 05:12 AM, Steve Dower wrote: >> >> This would be an incredibly painful change that would surprise and hurt a >> lot of >> people. > > > Hi, I think "incredibly painful" is overstating the case a bit. ;) We're > talking about an installer default, a setting that would still be changeable > as it always has, that by definition only will affect brand new installs. > > >> Yes, it is possible for a non-admin user to install arbitrary packages >> into a >> place where an admin user may inadvertently run it, thereby providing >> escalation >> of privilege. On the other hand, that applies to a lot of development >> tools, >> especially since most users on Windows these days are actually limited >> administrators - ANYTHING they install could run when they elevate a >> certain >> process. > > > None of Microsoft's Dev tools install to C:\, rather to ProgramFiles. The > fact that another security issue may exist is not a good justification for > creating additional. > > >> On the other hand, Python from python.org is a tool that should only be >> installed by those who are prepared to manage it. On Windows it is easy >> enough >> to have a second, secured copy for your admin scripts and an unsecured >> copy for >> non-admin tasks. > > > This sounds like the perspective of someone highly technical, forgetting > that new users will be installing python as well and vastly outnumber us. > "Normal people" need help to avoid security issues. > > Microsoft's guidelines on where to install software are clear, and don't > make exceptions that "tools" should be installed to the root of the drive to > bypass file system permissions, for convenience. > > >> I'm not sure what change you are proposing here... doesn't the installer >> already >> have an option to add to PATH? I'm sure I keep disabling it. > > > No, it does not. Unless it got slipped in when I wasn't looking. > > It should be an option though, I think everyone would agree. The option to add the current install to your path was added 3.3. >> "python.exe" on my PATH because I have 10+ versions installed at any one >> time. I > > > Remember, python-dev's are not the target users of this package, and are a > rather minuscule fraction of the user base. Knowing which Python you want on your path and that you want it on your path at all is somewhat of an advanced usage. While beginners do want to just open up cmd and type "python" and have it work, there are better ways to accomplish that which don't involve system-wide path manipulation or installation changes. Several PC manufacturers have been known to use Python for various system utilities, which is how Python sometimes ends up in the path on your grandma's Dell*. Even for a beginner who just wants "python" to work, we need to be careful to not wreck their entire system by helping them get our fresh Python install to show up. A more reasonable way to help beginners would be to create a shortcut somewhere that starts up cmd with a modified path. They can do whatever they want to do within that context without modifying their entire system. If they learn that they later want their system-wide path manipulated, they can do that within the installer or will known how to do that themselves. * watch Dave Beazley's PyCon 2014 talk for a good story involving one of those manufacturer installed Pythons: https://www.youtube.com/watch?v=RZ4Sn-Y7AP8 ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.7.7. on Windows
On Mon, Apr 28, 2014 at 7:04 PM, Steve Dower wrote: >> Mike Miller wrote: >> On 04/29/2014 05:12 AM, Steve Dower wrote: >>> This would be an incredibly painful change that would surprise and >>> hurt a lot of people. >> >> Hi, I think "incredibly painful" is overstating the case a bit. ;) We're >> talking >> about an installer default, a setting that would still be changeable as it >> always has, that by definition only will affect brand new installs. > > Good point about it only affecting new installs, though that still > constitutes a lot of installs. > >>> Yes, it is possible for a non-admin user to install arbitrary packages >>> into a place where an admin user may inadvertently run it, thereby >>> providing escalation of privilege. On the other hand, that applies to >>> a lot of development tools, especially since most users on Windows >>> these days are actually limited administrators - ANYTHING they install >>> could run when they elevate a certain process. >> >> None of Microsoft's Dev tools install to C:\, rather to ProgramFiles. The >> fact >> that another security issue may exist is not a good justification for >> creating >> additional. > > The fact that the mitigations are well known by the people who have to worry > about them is a good justification for not creating a compatibility issue. > It's easy for IT admins to install Python in a way that the files are > read-only, the .pyc and .pyo files are already there, and user site packages > will be used by default (I think that last one is easy?). The good IT admins > even know that they need to do this - perhaps we can help educate the bad > admins? (FWIW, if you have admin privileges on your own machine, YOU are the > IT admin. Are you a good one or a bad one?) > >>> On the other hand, Python from python.org is a tool that should only >>> be installed by those who are prepared to manage it. On Windows it is >>> easy enough to have a second, secured copy for your admin scripts and >>> an unsecured copy for non-admin tasks. >> >> This sounds like the perspective of someone highly technical, forgetting that >> new users will be installing python as well and vastly outnumber us. "Normal >> people" need help to avoid security issues. > > One place where mitigations are added are the distributions (Canopy, > Anaconda, etc.). These packages redistribute Python and install to different > locations with different permissions (I'm not promising that they all do it > properly, but they have the opportunity to do so). The reference > implementation of CPython is typically not the best option for "normal > people", who are much better served by one of these bundles. > >> Microsoft's guidelines on where to install software are clear, and don't make >> exceptions that "tools" should be installed to the root of the drive to >> bypass >> file system permissions, for convenience. > > I'm well aware of the guidelines, hence the practicality vs. purity comment. > I'm fairly certain that the installation to the root was originally about > ease of command-line access rather than bypassing permissions - the > permissions probably didn't exist for the first few versions of Python > (Python for DOS obviously didn't care... maybe it's always been about > backwards compatibility?) > > At this point, installing into the root is about not breaking everyone who > *knows* that Python installs into the root directory and always has. > >>> I'm not sure what change you are proposing here... doesn't the >>> installer already have an option to add to PATH? I'm sure I keep disabling >>> it. >> >> No, it does not. Unless it got slipped in when I wasn't looking. >> >> It should be an option though, I think everyone would agree. > > Thanks Brett for pointing out that it arrived in Python 3. I'm sure it would > be an acceptable addition to 2.7.7, though you'd need to get it in before RC > and you'd also need to find someone who is keen and able to keep making 2.7 > installers for Windows. Right now, we don't have anyone who is both. If it's an acceptable change to the release manager (Benjamin?), and if there's actually time before the RC (I don't know when it is planned), I am willing to backport my 3.3 change to get this in the 2.7 installer. However, I'm not currently setup to make release installers -- I think I need a signing certificate or something like that. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Tix version needed to build 2.7 Windows installer?
This is mostly a question for Martin, but perhaps someone else would also know. I'm trying to build the 2.7 installers so I can backport the path option from 3.3, but I can't seem to figure out which version of Tix is necessary to have a complete build. So far any of them on http://svn.python.org/projects/external don't appear to be configured to work with the combination of tcl and tk that are used on 2.7, per the buildbot external scripts. It's another issue that Tix isn't even downloaded by the scripts, but I'll do it manually right now just to get this going. Any tips? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Tix version needed to build 2.7 Windows installer?
On Fri, May 9, 2014 at 12:00 PM, Zachary Ware wrote: > On Thu, May 8, 2014 at 4:20 PM, Zachary Ware > wrote: >> I updated the 2.7 buildbot scripts to pull in Tcl/Tk 8.5.15 a couple >> of weeks ago (see http://bugs.python.org/issue21303), but hadn't >> gotten anything done with Tix yet. It should just need python.mak >> updated to point to Tcl/Tk 8.5.15; it's on my list to get fixed as >> soon as I can. > > Tix for 2.7 is now > http://svn.python.org/projects/external/tix-8.4.3.5. You can build it > with this monster of a command, run from tix-8.4.3.5\win: > > nmake -f python.mak DEBUG=0 MACHINE=IX86 COMPILERFLAGS=-DWINVER=0x0500 > TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 > INSTALL_DIR=..\..\tcltk all > > Use "install" instead of "all" after building to install it to > ..\..\tcltk. Set DEBUG and MACHINE as needed; DEBUG does not need to > be set if you're building Release, but MACHINE always has to be set so > that Tix uses the right build dir for Tk (IX86 for 32-bit, AMD64 for > 64-bit). Awesome, thanks! So I now have a fully working setup, at least for 32-bit, and have backported the Path option from 3.3 (http://hg.python.org/cpython/rev/a9d34685ec47). I ran into an issue with win32com getting a 64-bit installer built but didn't have time to look into it yet. If anyone wants to try a 2.7 installer with that Path option, here's a copy: http://briancurtin.com/python-dev/python-2.7.msi (this is not signed, it'll warn you about that). ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Questions regarding Windows buildbots
On Mon, May 12, 2014 at 5:16 PM, Claudiu Popa wrote: > Hello! > > I'm working on a patch for issue bugs.python.org/issue8579 (Add > missing tests for FlushKey, LoadKey, and SaveKey in winreg). This > issue requires the SeBackupPrivilege in order to use LoadKey and > SaveKey. While acquiring the privilege > isn't very complicated using ctypes, it fails with > ERROR_NOT_ALL_ASSIGNED (1300) when the > user has Administrative privileges, but it's not an Administrator, > problem which can be eluded by > running the script with elevated privileges. This leads me to a couple > of questions: > > - should a Windows test be skipped if it can't acquire a certain privilege? Yes. Check out any of the os.symlink tests - they're currently skipped when the symlink privilege isn't held. > - If we can acquire the privilege by elevating our process, does the > Windows buildbots have UAC > enabled and if so, how's the notification setting configured? For > instance, elevating a process will > trigger a new UAC window with the message "Do you want to allow the > following program from an unknown publisher to make changes to this > computer?" on the recommended configuration, but this doesn't happen > when the configuration is set to "Never notify". That probably depends on how each machine is setup. If they happen to get blocked on any individual slave, we'll just have to ask the owner to change that setting. Currently there are no Windows build slaves running as administrator. I used to have one but the machine died and I never replaced it. I also said a few months ago that I would get one setup again, but that hasn't happened yet. I can get a new machine up and running but probably not until next week as I'm at a conference. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Download Counts (was: Language Summit notes)
On Fri, Apr 18, 2014 at 1:31 PM, Antoine Pitrou wrote: > I don't think we have recent download numbers since the Website > overhaul (do we?), but Python 3 isn't an "experimental concept > language" anymore (it hasn't been since 3.3 or 3.2, I'd say). Using the old logs, which are still good through 2013, I've found the following: The first year of a release series (month of final release month + 12mos): 2.6.x - 10.3 Million 2.7.x - 10.26M 3.2.x - 5.84M 3.3.x - 13.1M 2013 downloads (out of 34.79M across all possible versions): 2.6.x - 1.9M 2.7.x - 14.3M 3.2.x - 1.03M 3.3.x - 13.85M 3.3 had a big first year of availability (Oct '12-'13), and throughout 2013 it represented 48% of those versions listed above. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Download Counts (was: Language Summit notes)
On May 28, 2014 12:49 PM, "Brian Curtin" wrote: > > On Fri, Apr 18, 2014 at 1:31 PM, Antoine Pitrou wrote: > > I don't think we have recent download numbers since the Website > > overhaul (do we?), but Python 3 isn't an "experimental concept > > language" anymore (it hasn't been since 3.3 or 3.2, I'd say). > > Using the old logs, which are still good through 2013, I've found the following: > > The first year of a release series (month of final release month + 12mos): > 2.6.x - 10.3 Million > 2.7.x - 10.26M > 3.2.x - 5.84M > 3.3.x - 13.1M > > 2013 downloads (out of 34.79M across all possible versions): > 2.6.x - 1.9M > 2.7.x - 14.3M > 3.2.x - 1.03M > 3.3.x - 13.85M > > 3.3 had a big first year of availability (Oct '12-'13), and throughout > 2013 it represented 48% of those versions listed above. Sorry for not being explicit: these are download counts for Windows installers. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Download Counts (was: Language Summit notes)
On May 28, 2014 4:06 PM, "Eli Bendersky" wrote: > > > > > On Wed, May 28, 2014 at 11:10 AM, Guido van Rossum wrote: >> >> Is the Windows/Mac ratio still 70/30, with Linux in the single digits? >> > > Most Linux installs go through package managers which don't count here, no? I'll have to run something for the other non-Windows files, but the single digit Linux downloads he meant are the tarballs. We'll (probably) never know the true counts in the Linux world because of how pervasive Python is within basically every distro, but that's also likely the case on Mac. With Windows, since you must download Python it to use it, the numbers we see are probably the most useful on their own. I'm giving a talk at PyCon Russia that covers some of these numbers, so I'll probably try to dig up more and turn it into a blog post. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Fri, Jun 6, 2014 at 8:22 PM, Zachary Ware wrote: > On Fri, Jun 6, 2014 at 10:41 AM, Steve Dower > wrote: >> Thoughts/comments/concerns? > > My only concern is support for elderly versions of Windows, in > particular: XP. I seem to recall the last "let's update our MSVC > version" discussion dying off because of XP support. Even though MS > has abandoned it, I'm not sure whether we can yet. > > If that's a non-issue, or if we can actually drop XP support, I'm all for it. Extended support ended in April of this year, so I think we should put XP as unsupported for 3.5 in PEP 11 - http://legacy.python.org/dev/peps/pep-0011/ I seem to remember that we were waiting for this anyway. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Fri, Jun 6, 2014 at 10:19 PM, Chris Angelico wrote: > On Sat, Jun 7, 2014 at 4:12 AM, Steve Dower wrote: >> Chris Angelico wrote: >>> On Sat, Jun 7, 2014 at 1:41 AM, Steve Dower >>> wrote: What this means for Python is that C extensions for Python 3.5 and later can be built using any version of MSVC from 14.0 and later. >>> >>> Oh, if only this had been available for 2.7!! Actually... this means that >>> 14.0 would be a good target for a compiler change for 2.7.x, if such a >>> change is ever acceptable. >> >> Maybe, but I doubt it will ever be acceptable :) > > Well, there were discussions. Since Python 2.7's support is far > exceeding the Microsoft promise of support for the compiler it was > built on, there's going to be a problem, one way or the other. I don't > know how that's going to end up being resolved. We're going to have to change it at some point, otherwise we're going to have people in 2018 scrambling to find VS2008, which will be 35 versions too old by then. No matter what we do here, we're going to have a tough PR situation, but we have to make something workable. I'd rather cause a hassle than outright kill extensions. I would probably prefer we aim for VS 14 for 3.5, and then explore making the same change for the 2.7.x release that comes after 3.5.0 comes out. Lessons learned and all that. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Fri, Jun 6, 2014 at 10:41 PM, M.-A. Lemburg wrote: > On 06.06.2014 20:25, Brian Curtin wrote: >> On Fri, Jun 6, 2014 at 10:19 PM, Chris Angelico wrote: >>> On Sat, Jun 7, 2014 at 4:12 AM, Steve Dower >>> wrote: >>>> Chris Angelico wrote: >>>>> On Sat, Jun 7, 2014 at 1:41 AM, Steve Dower >>>>> wrote: >>>>>> What this means for Python is that C extensions for Python 3.5 and later >>>>>> can be built using any version of MSVC from 14.0 and later. >>>>> >>>>> Oh, if only this had been available for 2.7!! Actually... this means that >>>>> 14.0 would be a good target for a compiler change for 2.7.x, if such a >>>>> change is ever acceptable. >>>> >>>> Maybe, but I doubt it will ever be acceptable :) >>> >>> Well, there were discussions. Since Python 2.7's support is far >>> exceeding the Microsoft promise of support for the compiler it was >>> built on, there's going to be a problem, one way or the other. I don't >>> know how that's going to end up being resolved. >> >> We're going to have to change it at some point, otherwise we're going >> to have people in 2018 scrambling to find VS2008, which will be 35 >> versions too old by then. No matter what we do here, we're going to >> have a tough PR situation, but we have to make something workable. I'd >> rather cause a hassle than outright kill extensions. >> >> I would probably prefer we aim for VS 14 for 3.5, and then explore >> making the same change for the 2.7.x release that comes after 3.5.0 >> comes out. Lessons learned and all that. > > Are you sure that's an option ? Changing the compiler the stock > Python from python.org is built with will most likely render > existing Python extensions built for 2.7.x with x < (release that comes > after 3.5.0) broken, so users and installation tools will end up > having to pay close attention to the patch level version of Python > they are using... which is something we wanted to avoid after > we ran into this situation with 1.5.1 and 1.5.2 a few years ago. None of the options are particularly good, but yes, I think that's an option we have to consider. We're supporting 2.7.x for 6 more years on a compiler that is already 6 years old. Something less than awesome for everyone involved is going to have to happen to make that possible. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Fri, Jun 6, 2014 at 10:56 PM, wrote: > On Fri, Jun 06, 2014 at 10:49:24PM +0400, Brian Curtin wrote: > >> None of the options are particularly good, but yes, I think that's an >> option we have to consider. We're supporting 2.7.x for 6 more years on >> a compiler that is already 6 years old. > > Surely that is infinitely less desirable than simply bumping the minor > version? It's definitely not desirable, but "simply" bumping the minor version is not A Thing. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Fri, Jun 6, 2014 at 11:08 PM, Donald Stufft wrote: > > On Jun 6, 2014, at 3:04 PM, Brian Curtin wrote: > >> On Fri, Jun 6, 2014 at 10:56 PM, wrote: >>> On Fri, Jun 06, 2014 at 10:49:24PM +0400, Brian Curtin wrote: >>> >>>> None of the options are particularly good, but yes, I think that's an >>>> option we have to consider. We're supporting 2.7.x for 6 more years on >>>> a compiler that is already 6 years old. >>> >>> Surely that is infinitely less desirable than simply bumping the minor >>> version? >> >> It's definitely not desirable, but "simply" bumping the minor version >> is not A Thing. > > Why? I mean even if it’s the same thing as 2.7 just with an updated > compiler that seems like a better answer than having to deal with > 2.7.whatever suddenly breaking all C exts. Because then we have to maintain 2.8 at a time when no one even wants to maintain 2.7? ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Fri, Jun 6, 2014 at 11:42 PM, wrote: > On Sat, Jun 07, 2014 at 05:33:45AM +1000, Chris Angelico wrote: > >> > Is it really any difference in maintenance if you just stop applying >> > updates to 2.7 and switch to 2.8? If 2.8 is really just 2.7 with a >> > new compiler then there should be no functional difference between >> > doing that and doing a 2.7.whatever except all of the tooling that >> > relies on the compiler not to change in micro releases won’t >> > suddenly break and freak out. > >> If the only difference between 2.7 and 2.8 is the compiler used on >> Windows, what happens on Linux and other platforms? A Python 2.8 would >> have to be materially different from Python 2.7, not just binarily >> incompatible on one platform. > > Grrmph, that's fair. Perhaps a final alternative is simply continuing > the 2.7 series with a stale compiler, as a kind of carrot on a stick to > encourage users to upgrade? Gating 2.7 life on the natural decline of > its supported compiler/related ecosystem seems somehow quite a gradual > and natural demise.. :) Adding features into 3.x is already not enough of a carrot on the stick for many users. Intentionally leaving 2.7 on a dead compiler is like beating them with the stick. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Jun 6, 2014 6:01 PM, "Sturla Molden" wrote: > > Brian Curtin wrote: > > > Adding features into 3.x is already not enough of a carrot on the > > stick for many users. Intentionally leaving 2.7 on a dead compiler is > > like beating them with the stick. > > Those who want to build extensions on Windows will just use MinGW > (currently GCC 2.8.2) instead. Well we're certainly not going to assume such a thing. I know people do that, but many don't (I never have). ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler
On Jun 6, 2014 6:33 PM, "Sturla Molden" wrote: > > Brian Curtin wrote: > > > Well we're certainly not going to assume such a thing. I know people do > > that, but many don't (I never have). > > If Python 2.7 users are left with a dead compiler on Windows, they will > find a solution. For example, Enthought is already bundling their Python > distribution with gcc 2.8.1 on Windows. Again, not something I think we should depend on. A lot of people use python.org installers. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] subprocess shell=True on Windows doesn't escape ^ character
On Wed, Jun 11, 2014 at 9:43 PM, Ethan Furman wrote: > On 06/11/2014 07:12 PM, Chris Angelico wrote: >> >> On Thu, Jun 12, 2014 at 12:07 PM, Chris Angelico wrote: >>> >>> ISTM what you want is not shell=True, but a separate function that >>> follows the system policy for translating a command name into a >>> path-to-binary. That's something that, AFAIK, doesn't currently exist >>> in the Python 2 stdlib, but Python 3 has shutil.which(). If there's a >>> PyPI backport of that for Py2, you should be able to use that to >>> figure out the command name, and then avoid shell=False. >> >> >> Huh. Next time, Chris, search the web before you post. Via a >> StackOverflow post, learned about distutils.spawn.find_executable(). > > > --> import sys > --> sys.executable > '/usr/bin/python' For finding the Python executable, yes, but the discussion and example are about a 2.x version of shutil.which ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Helping with Documentation
On Mon, Oct 29, 2018 at 9:36 AM Kenneth Reitz wrote: > Hello all, > > > > I’d like to become a core contributor to Python, by contributing polish to > its documentation (adding missing pieces, modernize it a bit in spots, add > more usage examples (itertools), etc). > > > > Is anyone already working on this, and if so, can I join forces with you? > I don't know of any specific or active documentation focus right now (save for translation, which is mostly what doc-sig has been about lately), but giving the docs love has been on my todo list for quite a while now with tiny efforts here or there. Your general idea sounds good enough to just go for it and put up PRs. Feel free to add me as a reviewer—@briancurtin—and I'll help get things merged. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] VxWorks and cpython?
Hi Python Developers, I'm Brian Kuhl, I've spent about 28 years working with embedded software. Since 2000 I've worked for Wind River. I'm currently a manager of documentation and customer training in our Ottawa, Canada office. Throughout my career I've had an interest in the use of open source software in embedded systems, have ported many libraries to Wind River's flagship product the VxWorks RTOS. The safe and secure embedded market where VxWorks is the leader is evolving, and devices that use to be made up of multiple processors running multiple operating systems are now being consolidated. Device security and IoT trends mean a device must be more configurable and updateable, and a better host for portable code. In this evolving space our customers have asked us to add Python support to VxWorks. Wind River would like cpython to officially support VxWorks. I've been ask by my colleagues to volunteer as a maintainer for cpython in order to support this effort. Wind River will also provide the needed buildbot clients required to verify continuing VxWorks support. Myself and an intern were able to get the majority of Python tests suite passing with a POC last year. An engineering group in Beijing have taken that POC and are improving and cleaning up that effort now with the hopes of up-steaming their efforts. My Chinese colleagues have suggested that the first step to gaining your support would be to summit a PEP detailing the changes? If you agree, I will proceed with authoring a PEP. Many thanks in advance for your responses, Brian P.S. I can be found on github (and many other places) as kuhlenough. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] FW: VxWorks and cpython?
From: Guido van Rossum [mailto:[email protected]] Sent: Wednesday, January 09, 2019 11:52 AM To: Kuhl, Brian Cc: [email protected] Subject: Re: [Python-Dev] VxWorks and cpython? Hi Brian, I am glad that this is happening! I don't think you need a PEP to motivate your request -- however you need to submit the upstream patches, work with the CPython buildbot managers (Victor?) to connect your buildbots, and work with reviewers (Serhiy?) to get your patches integrated in CPython. Hopefully the patches are small and focused -- we generally don't take patches that refactor large swaths of code. It's also better not to submit everything in a single giant patch (reviewers hate mega-patches). And the patch submitters need to be responsive when the code review comments are coming. This is not a one-time effort -- your team will need to be "on call" to handle VxWorks issues for the foreseeable future (a minimum commitment of 5 years?), and your team members needs to be able to do this in their capacity as Wind River engineers, not as open source volunteers. I believe there is a PEP with a list of supported operating systems that needs to be updated, but I don't recall which one it is -- hopefully you can track it down with a little Googling. (Or was it the devguide?) Good luck, --Guido On Wed, Jan 9, 2019 at 8:42 AM Kuhl, Brian mailto:[email protected]>> wrote: Hi Python Developers, I’m Brian Kuhl, I’ve spent about 28 years working with embedded software. Since 2000 I’ve worked for Wind River. I’m currently a manager of documentation and customer training in our Ottawa, Canada office. Throughout my career I’ve had an interest in the use of open source software in embedded systems, have ported many libraries to Wind River’s flagship product the VxWorks RTOS. The safe and secure embedded market where VxWorks is the leader is evolving, and devices that use to be made up of multiple processors running multiple operating systems are now being consolidated. Device security and IoT trends mean a device must be more configurable and updateable, and a better host for portable code. In this evolving space our customers have asked us to add Python support to VxWorks. Wind River would like cpython to officially support VxWorks. I’ve been ask by my colleagues to volunteer as a maintainer for cpython in order to support this effort. Wind River will also provide the needed buildbot clients required to verify continuing VxWorks support. Myself and an intern were able to get the majority of Python tests suite passing with a POC last year. An engineering group in Beijing have taken that POC and are improving and cleaning up that effort now with the hopes of up-steaming their efforts. My Chinese colleagues have suggested that the first step to gaining your support would be to summit a PEP detailing the changes? If you agree, I will proceed with authoring a PEP. Many thanks in advance for your responses, Brian P.S. I can be found on github (and many other places) as kuhlenough. ___ Python-Dev mailing list [email protected]<mailto:[email protected]> https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (python.org/~guido<http://python.org/~guido>) ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VxWorks and cpython?
Hi Victor, I think we can come up with some sort of strategy that will work for everyone. I'll ask about the SSH access; and if that runs up against a corporate roadblock, I will explore some other alternative. Is there a good place to document "Python on VxWorks" ? The changes to Python are not large, I've kept the pull request from last year's POC active. The changed files provide a good summary of the scope. https://github.com/python/cpython/pull/4184/files However, based on the POC we've gone back and improved VxWorks, so the some of the uglier bits, in libraries like submodule, won't be needed. These will be in the next release of VxWorks. However we let automake and setup.py do much of the work for us, so where VxWorks does not have support for something, it's not obvious. A public document would go a long way to filling in those details, something much more detailed than my glib "VxWorks is almost POSIX" in the pull request. Other challenges; * VxWorks is cross-compiled on both Linux and Windows. ( currently with clang and gcc) * Supported on ARM, PowerPC and Intel processors * 32bit and 64bit builds * A constantly evolving set of reference boards (or BSPs) https://marketplace.windriver.com/index.php?bsp&on=list&type=platform&value=VxWorks:%207%20-%20Wind%20River%20Workbench%204.0 I don't think we need a buildbot for every board. I'm thinking a 1/2 dozen to cover ARM, PPC and IA with both a 32bit and 64 bit build? We have a bit of chicken and egg problem right now, a buildbot will always fail until there's some basic VxWorks support added. Do we set them up, and just let them fail, till enough PRs are accepted to make it build? Brian > -Original Message- > From: Victor Stinner [mailto:[email protected]] > Sent: Wednesday, January 09, 2019 6:43 PM > To: Christian Heimes > Cc: Guido van Rossum; Kuhl, Brian; [email protected] > Subject: Re: [Python-Dev] VxWorks and cpython? > > Le mer. 9 janv. 2019 à 18:16, Christian Heimes a écrit > : > > It's a PEP. The process and expectations for platform are explained in > > PEP 11, https://www.python.org/dev/peps/pep-0011/ > > I also wrote some information in my website: > https://pythondev.readthedocs.io/platforms.html > > > If possible it would also be helpful to get SSH access to some VxWorks > > machines for core devs. I know that Victor likes to dig into rare > > corner cases and help to debug exotic platforms. > > The best case to get a full support is to have one core developer responsible > of > handling all bugs specific to the platform. > > As a core developer, I'm never comfortable to merge a change specific to a > platform if I'm not able to validate it manually myself. I trust no one, not > even > myself (I know well that I do frequently mistakes!), so I prefer to always > double > check changes before merging them ;-) > > In the meanwhile, I would say that we can only offer "best effort" > support. Fix reports bugs and do our best in our limited time. > > Someone has to take the work done to port Python on VxWorks and write small > pull requests. These PRs should be reviewed one by one to make sure that it's > the correct way to fix an issue. Be prepared that it can take several months > even > if all these changes look obvious to *you*. Core developers have limited time > and many prefer to focus on the platforms that they are using, not worry about > a platform they never heard about... I can have a look at such PRs. > > It would also help to have a documentation somewhere about "Python on > VxWorks". Pointers to VxWorks (general info, developers info), pointers to > your > port, current status of the port, etc. > > Victor > -- > Night gathers, and now my watch begins. It shall not end until my death. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Testing cross-compiled python (windows arm32) from build bot
We (Wind River) are doing it for VxWorks, which is also cross-compiled, and has no concept of chroot you see in Linux. The trick is to insert a little switch from local to a remote shell between the build and the test run via ssh (or telnet). Don't think we gotten anywhere near upstreaming that little change though? CPython's buildbot is actually easier than most to open source test suites to adapt to cross compile, because everything is run in python after the build, so you only have to make one switch in context. Brian > -Original Message- > From: Python-Dev [mailto:python-dev- > [email protected]] On Behalf Of Matthias Klose > Sent: Monday, March 18, 2019 5:32 PM > To: Paul Monson ; [email protected] > Subject: Re: [Python-Dev] Testing cross-compiled python (windows arm32) from > build bot > > On 18.03.19 21:10, Paul Monson via Python-Dev wrote: > > Hello, > > > > For windows arm32 I would like to be able run tests in the buildbot. > > Windows arm32 programs built with MSVC are always cross-compiled. > > This means I need to build cpython on x86/x64 and then deploy the build > artifacts and run the tests on an ARM32 device. > > > > Is there any documentation or examples of how to do this? > > If not, are there any recommendations for how to achieve this? > > I'm not aware of any documentation. For arm-linux-gnueabihf I once had a > setup with two chroots, the first one for cross-building python, and then the > second one for running the tests using qemu. Two separate chroots to make > sure that I don't run any target code during the build. The build location > bind > mounted in both chroots to avoid the copy step. > > Matthias > ___ > Python-Dev mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python- > dev/brian.kuhl%40windriver.com ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Can I submit more support of standard library for VxWorks after 3.8.0 beta1?
Hi Victor, I pinged our product manager and he’s open to the idea of setting up a consulting arrangement with a core developer to help move things along. At least in principal. If anyone on the core team is interested, and reasonably unaligned with Wind River’s competitors, please contact me off list, Brian dot Kuhl at Wind River dot com. Brian From: Python-Dev [mailto:[email protected]] On Behalf Of Victor Stinner Sent: Tuesday, March 19, 2019 1:40 PM To: Xin, Peixing Cc: [email protected] Subject: Re: [Python-Dev] Can I submit more support of standard library for VxWorks after 3.8.0 beta1? You have to find someone to review your PRs. It takes time. We are all volunteers. I looked and merged some VxWorks PRs. Would it be possible to pay a core dev to do the reviews? That's an open question for core devs and for WindRiver. Victor Le mardi 19 mars 2019, Xin, Peixing mailto:[email protected]>> a écrit : > Hi, Experts: > > > > Seeing from the Python 3.8.0 > schedule(https://www.python.org/dev/peps/pep-0569/#schedule), new features > will not be allowed to submit after 3.8.0 beta1. For VxWorks RTOS platform > supporting CPython, we are using > bpo-31904(https://bugs.python.org/issue31904) for PRs to submit our codes. > Now I want to know whether we can add more standard library support for > VxWorks AFTER 3.8.0 beta1? > > > > > > > > Thanks, > > Peixing > > -- Night gathers, and now my watch begins. It shall not end until my death. ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] VxWorks and Python
Hi Python developers, Victor suggested I post a little background to help the maintainers understand VxWorks a little better. It can be found here https://github.com/Wind-River/cpython/wiki/Python-on-VxWorks If you'd like more detail in a particular area, please feel free to reply on or off list. I'd also like to mention again, that Wind River is interested in setting up a short term consulting arrangement, with any core dev that's available. To help accelerate Peixing's PRs acceptance https://github.com/python/cpython/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+bpo-31904 and generally improve Cpython. Wind River operates globally so don't let you location dissuade you. Many thanks for all your help, Brian ___ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Re: strip behavior provides inconsistent results with certain strings
It seems to me that the desired behavior is closest to 'str.replace()' out
of all the options, just with the constraint of being limited to either the
start or the end of the string. (Thus the .lreplace() and .rreplace()
option suggested by Glenn earlier in the thread.)
The minimal change (which actually also seems pretty general) seems to me
to be adding *only_start* and *only_end* keyword arguments to
str.replace(), both defaulting to False. If, e.g., *only_start* is passed
True, each repetition of *old* at the start of *str* is replaced by a copy
of *new*, with the number of replacements limited by the existing optional
*count*. Similar behavior for *only_end*=True. Probably best to raise a
ValueError(?) if both *only_start*=True and *only_end*=True?
Taking swapping a file extension as an example of a particular
transformation of interest, it would be achieved with something like
s.replace(".htm", ".html", only_end=True).
-Brian
--
>
> Date: Tue, 2 Jul 2019 14:33:57 +1000
> From: Chris Angelico
> Subject: [Python-Dev] Re: strip behavior provides inconsistent results
> with certain strings
> To: python-dev
> Message-ID:
> [email protected]>
> Content-Type: text/plain; charset="UTF-8"
>
> On Tue, Jul 2, 2019 at 2:28 PM Glenn Linderman
> wrote:
> >
> >> A method could raise instead of returning the string as-is if the
> prefix is not really a prefix. How often is this needed? The most common
> end deletions are whitespace, which the current .strip handles correctly.
> >
> > raising wouldn't be helpful in most of the situations where I use this
> logic... it would require a more complex flow control than the if
> startswith path in the current situation.
> >
> > Yes, I use strip more frequently, but if startswith: chop_prefix
> operation (and the other end too) happens an awful lot.
>
> If the method accepts a tuple of prefixes and will remove the first
> one found (or the longest, or whatever) and raises if none found, you
> could get the "chop only if present" behaviour by including an empty
> string as one of the possible prefixes.
>
> ChrisA
>
>
>
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/SCZH4SYCM2Z2UXTKYMAIMHGRUKGKD2FU/
[Python-Dev] Re: strip behavior provides inconsistent results with certain strings
It seems to me that the desired behavior here is closest to 'str.replace()' out
of all the options discussed, just with the constraint of being limited to
either the start or the end of the string. (Thus the .lreplace() and
.rreplace() option suggested by Glenn.)
The minimal change (which actually also is pretty general?) I think would be to
add 'only_start' and 'only_end' keyword arguments to str.replace(), both
defaulting to False. If, e.g., 'only_start' is passed True, each repetition of
'old' at the start of 's' is replaced by 'new', with the number of replacements
limited by the existing optional 'count'. Similar behavior for 'only_end'=True.
Probably best to raise a ValueError(?) if both 'only_start'=True and
'only_end'=True?
Taking swapping a file extension as an example of a particular transformation
of interest, it would be achieved with something like s.replace(".htm",
".html", only_end=True).
-Brian
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/N3VNJHO467YT53ZVIAAGKEWOYISJ4VTY/
[Python-Dev] Re: What to do about invalid escape sequences
Steven D'Aprano wrote: > Because our processes don't work the way we assumed, it turns out that > in practice we haven't given developers the deprecation period we > thought we had. Read Nathaniel's post, if you haven't already done so: > https://mail.python.org/archives/list/[email protected]/message/E7QCC74O... > He makes a compelling case that while we might have had the promised > deprecation period by the letter of the law, in practice most developers > will have never seen it, and we will be breaking the spirit of the > promise if we continue with the unmodified plan. > ... > I'm sure that the affected devs will understand why it was their fault > they couldn't see the warnings, when even people from a first-class > library like SymPy took four iterations to do it right. > > Currently it > > requires some extra steps or flags, which are not well known. What > > change are you proposing for 3.8 that will ensure that this actually > > gets solved? > > Absolutely nothing. I don't have to: we're an entire community, this > doesn't have to fall only on my shoulders. I'm not even the messenger: > that's Raymond. I'm just (partly) agreeing with him. > Just because I don't have a solution for this problem doesn't mean the > problem doesn't exist. As the SymPy team has figured out the right pytest incantation to expose these warnings, perhaps a feature request on pytest to encapsulate that mix of options into a single flag would be a good idea? ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/WOJQTOXMYKHLQO4KICEIZH3PDEMQLMBL/
[Python-Dev] Re: The semantics of pattern matching for Python
Regarding the difficulty which some people have respecting class patterns and
dictionary patterns, I would like to draw attention to a similar feature in
JavaScript, object destructuring. JavaScript does not have pattern matching but
object destructuring is closely related. Take the example of a function to
compute the distance between two points.
```
function distance(p1, p2) {
// This is an object destructuring assignment that extracts the x field of p1
into x1 and the y field of p1 into y1
const { x: x1, y: y1 } = p1;
// This is an object destructuring assignment that extracts the x field of p2
into x2 and the y field of p2 into y2
const { x: x2, y: y2 } = p2;
const dx = x2 - x1;
const dy = y2 - y1;
return Math.sqrt(dx*dx + dy*dy);
}
// An object literal is assigned to p1 here
const p1 = { x: 0, y: 0 };
// An object literal is assigned to p2 here
const p2 = { x: 1, y: 1 };
const d = distance(p1, p2);
```
Similarly to dictionary patterns in Python, object destructuring in JavaScript
places the variable names that are the targets of the assignments in the same
position where a value would be expected in an object literal. This feature has
existed in JavaScript for several years now and I would like to draw attention
to it as a counterpoint to the argument that pattern matching is not a good fit
for languages that are not statically typed. Destructuring can also be found in
Common Lisp, which is not statically typed. Pattern matching is also a core
part of Erlang, which is not statically typed..
I would also like to draw attention to the fact that object destructuring was
added to JavaScript years into it's development. I do not believe this to be a
reasonable argument against adopting pattern matching in Python.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/6XDXHVT3ZFOK66GVU5UWYGSHJX4UF2CW/
Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching
Greg Ewing wrote: > On 23/11/20 7:49 am, Daniel Moisset wrote: > > Look at the following (non-pattern-matching) > > snippet: > > event = datetime.date(x, month=y, day=z) > > > > The only names that are treated as lvalues there are to the left > of an '='. The rules are a lot simpler. > One of the Zen lines says "If it's hard to explain, it's probably > a bad idea." I think the proposed rules for match cases are > objectively harder to explain than those for other expressions, > because they're more complicated. I don't believe that it is correct that `month` in `month=y` and `day` in `day=z` in the expression `event = datetime.date(x, month=y, day=z)` are lvalues. They are definitely not assignment targets in the same sense that `event` is an assignment target. `month` and `day` are used to bind the arguments `y` and `z` to the `month` and `day` arguments accepted by the `date` constructor. `event` can be accessed and rebound in the scope that invokes `datetime.date`. However, `month` and `day` are only bound to `y` and `z` in the scope of the body of the `datetime.date` constructor and are not accessible in the scope that invokes `datetime.date`. The behaviour is significantly different. ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/FDEVMYO3YCFZO3UYTP7D2G3HHKFP7EXQ/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Advantages of pattern matching - a simple comparative analysis
Take as an example a function designed to process a tree of nodes similar to
that which might be output by a JSON parser. There are 4 types of node:
- A node representing JSON strings
- A node representing JSON numbers
- A node representing JSON arrays
- A node representing JSON dictionaries
The function transforms a tree of nodes, beginning at the root node, and
proceeding recursively through each child node in turn. The result is a Python
object, with the following transformation applied to each node type:
- A JSON string `->` Python `str`
- A JSON number `->` Python `float`
- A JSON array `->` Python `list`
- A JSON dictionary `->` Python `dict`
I have implemented this function using 3 different approaches:
- The visitor pattern
- `isinstance` checks against the node type
- Pattern matching
Here is the implementation using the visitor pattern:
```
from typing import List, Tuple
class NodeVisitor:
def visit_string_node(self, node: StringNode):
pass
def visit_number_node(self, node: NumberNode):
pass
def visit_list_node(self, node: ListNode):
pass
def visit_dict_node(self, node: DictNode):
pass
class Node:
def visit(visitor: NodeVisitor):
raise NotImplementedError()
class StringNode(Node):
value: str
def visit(self, visitor: NodeVisitor):
visitor.visit_string_node(self)
class NumberNode(Node):
value: str
def visit(self, visitor: NodeVisitor):
visitor.visit_number_node(self)
class ListNode(Node):
children: List[Node]
def visit(self, visitor: NodeVisitor):
visitor.visit_list_node(self)
class DictNode(Node):
children: List[Tuple[str, Node]]
def visit(self, visitor: NodeVisitor):
visitor.visit_dict_node(self)
class Processor(NodeVisitor):
def process(root_node: Node):
return root_node.visit(self)
def visit_string_node(self, node: StringNode):
return node.value
def visit_number_node(self, node: NumberNode):
return float(node.value)
def visit_list_node(self, node: ListNode):
return [child_node.visit(self) for child_node in node.children]
def visit_dict_node(self, node: DictNode):
return {key: child_node.visit(self) for key, child_node in
node.children}
def process(root_node: Node):
processor = Processor()
return processor.process(root_node)
```
Here is the implementation using `isinstance` checks against the node type:
```
from typing import List, Tuple
class Node:
pass
class StringNode(Node):
value: str
class NumberNode(Node):
value: str
class ListNode(Node):
children: List[Node]
class DictNode(Node):
children: List[Tuple[str, Node]]
def process(root_node: Node):
def process_node(node: Node):
if isinstance(node, StringNode):
return node.value
elif isinstance(node, NumberNode):
return float(node.value)
elif isinstance(node, ListNode):
return [process_node(child_node) for child_node in node.children]
elif isinstance(node, DictNode):
return {key: process_node(child_node) for key, child_node in
node.children}
else:
raise Exception('Unexpected node')
return process_node(root_node)
```
Finally here is the implementation using pattern matching:
```
from typing import List, Tuple
class Node:
pass
class StringNode(Node):
value: str
class NumberNode(Node):
value: str
class ListNode(Node):
children: List[Node]
class DictNode(Node):
children: List[Tuple[str, Node]]
def process(root_node: Node):
def process_node(node: Node):
match node:
case StringNode(value=str_value):
return str_value
case NumberNode(value=number_value):
return float(number_value)
case ListNode(children=child_nodes):
return [process_node(child_node) for child_node in child_nodes]
case DictNode(children=child_nodes):
return {key: process_node(child_node) for key, child_node in
child_nodes}
case _:
raise Exception('Unexpected node')
return process_node(root_node)
```
Here are the lengths of the different implementations:
- Pattern matching `->` 37 lines
- `isinstance` checks `->` 36 lines
- The visitor pattern `->` 69 lines
The visitor pattern implementation is by far the most verbose solution,
weighing in at almost twice the length of the alternative implementations due
to the large amount of boilerplate that is necessary to achieve double
dispatch. The pattern matching and `isinstance` check implementations are very
similar in length for this trivial example.
In each implementation, there are 2 operations performed on each node.
- Determine the type of the node
- Destructure the node to extract the desired data
The visitor pattern and `isinstance` check implementations separate these 2
opera
[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis
Larry Hastings wrote:
> On 11/23/20 8:15 AM, Brian Coleman wrote:
> > def process(root_node: Node):
> > def process_node(node: Node):
> > if isinstance(node, StringNode):
> > return node.value
> > elif isinstance(node, NumberNode):
> > return float(node.value)
> > elif isinstance(node, ListNode):
> > return [process_node(child_node) for child_node in
> > node.children]
> > elif isinstance(node, DictNode):
> > return {key: process_node(child_node) for key, child_node in
> > node.children}
> > else:
> > raise Exception('Unexpected node')
> > You don't need the "else". And you can change all your "elif"s into
> "if"s too. Now your "isinstance" version is 35 lines. Shorter than the
> pattern matching version, roughly the same speed, works in current
> Python, eminently readable to anybody conversant in current Python. A
> very reasonable solution to the problem.
> There should be one--and preferably only one--obvious way to do it,
> //arry/
It was not my intention to suggest that the solution implemented in the
shortest number of lines was superior.
I think that one of the advantages of the pattern matching implementation over
the sequence of `isinstance` checks is that there is no need to worry about
whether using `if`, `elif`or `else` is the best approach. There is a single
elegant and natural way to express the solution with pattern matching.
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/7FCXBKZQ6PU7VAOB76GGFJJXFWEPXL7L/
Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis
Antoine Pitrou wrote: > On Mon, 23 Nov 2020 16:15:12 - > "Brian Coleman" [email protected] > wrote: > > Furthermore, Python has a regular expression module > > which implements it's own DSL for the purpose of matching string patterns. > > Regular > > expressions, in a similar way to pattern matching, > > allow string patterns to be expressed in a concise and declarative manner. > > Uh, without regular expressions, a lot of functions would be massively > more complicated and annoying to write. > However, your example shows that pattern matching barely makes > common code shorter (admittedly, on this _one_ example, but that's the > one you chose ;-)). > While I agree that regular expressions are far less Pythonic than the > proposed variant of pattern matching, they also have a tremendously > better cost/benefit ratio, IMHO. > Regards > Antoine. In my opinion, the object oriented solution to this problem is to use the visitor pattern. The solution using the visitor pattern is almost twice the length of the other solutions. Pattern matching is certainly no worse than the solution using a chain of `isinstance` checks in this case. However as the patterns to be checked against a candidate object become more complex, I believe that the pattern matching solution will retain the same level of elegance and obviousness that it possesses in this example, whereas the solution involving a chain of comparisons will quickly degrade in terms of obviousness. ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/UNESWNNQGXOI4W24H3HMD6UPDQQDUF2X/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis
David Mertz wrote:
> I have a little bit of skepticism about the pattern matching syntax, for
> similar reasons to those Larry expresses, and that Steve Dower mentioned on
> Discourse.
> Basically, I agree matching/destructuring is a powerful idea. But I also
> wonder how much genuinely better it is than a library that does not require
> a language change. For example, I could create a library to allow this:
> m = Matcher(arbitrary_expression)
> if m.case("StringNode(s)"):
> process_string(m.val)
> elif m.case("[a, 5, 6, b]"):
> process_two_free_vars(*m.values)
> elif m.case("PairNone(a, b)"):
> a, b = m.values
> process_pair(a, b)
> elif m.case("DictNode"):
> foo = {key, process_node(child_node) for key, child_node in
> m.values.items()}
> I don't disagree that the pattern mini-language looks nice as syntax. But
> there's nothing about that mini-language that couldn't be put in a library
> (with the caveat that patterns would need to be quoted in some way).
What you are proposing here is very similar in effect to executing pattern
matching statements using `eval`. What is the advantage of implementing the
pattern matching functionality in a library if the user interface for that
functionality has the same pitfalls as `eval`?
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/E4KVS77FVES6KEH3DQRJMQDZO7WAXWLM/
Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis
David Mertz wrote: > On Mon, Nov 23, 2020 at 9:02 PM Brian Coleman [email protected] > wrote: > > Basically, I > > agree matching/destructuring is a powerful idea. But I also > > wonder how much genuinely better it is than a library that does not > > require > > a language change. For example, I could create a library to allow this: > > m = Matcher(arbitrary_expression) > > if m.case("StringNode(s)"): > > process_string(m.val.s) > > elif m.case("[a, 5, 6, b]"): > > process_two_free_vars(m.val.a, m.val.b) > > What you are proposing here is very similar in effect to executing pattern > > matching statements using eval. What is the advantage of implementing the > > pattern matching functionality in a library if the user interface for that > > functionality has the same pitfalls as eval? > > I don't understand the similarity with eval that you are > suggesting. > My hypothetical library would store the value passed as initializer to > Matcher, and provide a method .case(). That method would need > to do > some moderately complicated parsing of the pattern passed into it, but > using parsing techniques, not any eval() call. Btw. I modified my above > strawman just slightly to what might be a bit better API. > If there are any free variables in the pattern, they would be provided by > the Matcher object. For example, they could be attributes of the property > m.val. Or I suppose we could make them attributes of the Matcher object > itself, e.g. m.a and m.b, but I think name conflicts with e.g. > m.case. Anyway, it's a strawman not an API design. > If the pattern looked kinda like a class constructor (i.e. exactly the same > as PEP 634 rules), the .case() method would do an isinstance() > check > before doing its other stuff. If the pattern looks like a list, it would > scan the freevars inside it and match the constant values. And so on. > The actual return value from .m.case(...) would be True or False (or at > least something truthy or falsy). However, it MIGHT create some new > attributes (or keys, or something else) on the Matcher object if the > pattern actually matched. > I agree the above is slightly less readable than PEP 635 syntax, but it > seems to have the entire power of the proposal without changing Python > syntax. To be more precise, the similarity that I see to `eval` is that syntax errors in the patterns that are passed to the `case` method cannot be detected at compile time and instead will be detected at runtime. Building the syntax into the language gives the advantage of producing a syntax error at compile time. It also makes it easier for linters and type checkers to validate the pattern matching clauses if the syntax is built into the language. ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/JLWRMQW4OX7SXJWMORHMAIWFES6OYRR7/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Advantages of pattern matching - a simple comparative analysis
David Mertz wrote: > On Mon, Nov 23, 2020 at 9:02 PM Brian Coleman [email protected] > wrote: > > Basically, I > > agree matching/destructuring is a powerful idea. But I also > > wonder how much genuinely better it is than a library that does not > > require > > a language change. For example, I could create a library to allow this: > > m = Matcher(arbitrary_expression) > > if m.case("StringNode(s)"): > > process_string(m.val.s) > > elif m.case("[a, 5, 6, b]"): > > process_two_free_vars(m.val.a, m.val.b) > > What you are proposing here is very similar in effect to executing pattern > > matching statements using eval. What is the advantage of implementing the > > pattern matching functionality in a library if the user interface for that > > functionality has the same pitfalls as eval? > > I don't understand the similarity with eval that you are > suggesting. > My hypothetical library would store the value passed as initializer to > Matcher, and provide a method .case(). That method would need > to do > some moderately complicated parsing of the pattern passed into it, but > using parsing techniques, not any eval() call. Btw. I modified my above > strawman just slightly to what might be a bit better API. > If there are any free variables in the pattern, they would be provided by > the Matcher object. For example, they could be attributes of the property > m.val. Or I suppose we could make them attributes of the Matcher object > itself, e.g. m.a and m.b, but I think name conflicts with e.g. > m.case. Anyway, it's a strawman not an API design. > If the pattern looked kinda like a class constructor (i.e. exactly the same > as PEP 634 rules), the .case() method would do an isinstance() > check > before doing its other stuff. If the pattern looks like a list, it would > scan the freevars inside it and match the constant values. And so on. > The actual return value from .m.case(...) would be True or False (or at > least something truthy or falsy). However, it MIGHT create some new > attributes (or keys, or something else) on the Matcher object if the > pattern actually matched. > I agree the above is slightly less readable than PEP 635 syntax, but it > seems to have the entire power of the proposal without changing Python > syntax. Because syntax errors in the patterns passed to the `case` method are detected at runtime, rather than at compile time, it is necessary to ensure that you have code coverage of every call to a `case` method to be confident that there are no syntax errors in the patterns. By comparison, if the pattern matching syntax is built into the language, the compiler will detect syntax errors in any and all patterns in `case` clauses. I think that this is a major advantage as compared to implementing pattern matching via a library. ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/Y4YU3QMQC6XYD6PAGFPGXNT6WZKDP7C4/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Steering Council update for February
On Tue, Mar 9, 2021 at 17:54 Chris Angelico wrote: > On Wed, Mar 10, 2021 at 11:47 AM Damian Shaw > wrote: > > > > > Does 'master' confuse people? > > > > There's a general movement to replace language from common programming > practises that derive from, or are associated with, the dehumanization of > people. Such as master and slave, as well as whitelist and blacklist. > > > > Is that *actually* the origin of the term in this context, or is it > the "master", the pristine, the original from which copies are made? > There's no "slave" branch anywhere in the git repository. > > I detest these changes that create churn and don't actually solve any > problems. They allow people to feel good about themselves for having > "made a change", while actually making no useful change whatsoever > (are disadvantaged people's lives going to be improved by this > rename?). What next? Are we going to crack down on any courses that > proclaim to help you to "master the Python language"? Does that, too, > have to be renamed? What an unfortunate response, but feel free to find something else to do after the change has been made. > ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/MH573FZ7NH4THZAF2LXHINIXFFRAFYAN/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Steering Council reply regarding conduct (was Re: Steering Council update for February)
Maybe we can change the discussion to something more productive like the python module system or anything else? ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/NIV227PNKJSZ5VVGUGPVBBFU7YTTLPGK/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Is the Python review process flawed?
On Tue, Jun 29, 2021 at 10:38 AM wrote: > I just stumbled upon the following issue and subsequent pull request. It > is a very small bugfix. There is currently a bug in Python and this pull > request fixes it. It's not a new feature or an enhancement, it is a bugfix! > Yet, it doesn't get reviewed, nor merged. And this has been going on since > March 2017. Why not just merge this? It's not like it's huge or obstructing > or obfuscating the current code base? There's always time to write an > improvement or a complete rewrite of this module feature later for an > upcoming minor release. But if there is currently a bug in Python and the > bugfix is available - why doesn't it get merged? > > https://github.com/python/cpython/pull/4819 For starters, the PR is closed in favor of another issue that has reviews and a discussion, but even the smallest change like that requires a lot out of a reviewer. Looking at that change, I don't personally know that it's correct, so I'd have to take the time to figure out that it's correct. It includes no tests, so I certainly don't trust that it's correct, so it looks incomplete to me. Time is irrelevant here—there's no need to rush things because a change appears small. What if that one line change is even more wrong than before? I have merge access and if I just said "ah it's a small PR and it's been open for a while, I'll just merge it for them," any change to Python has the possibility to affect a huge amount of people. When I got the shutil.which feature merged, the PR had been open for I believe 11 years and it was mostly complete in the initial patch outside of a few small issues, and the change itself wasn't a lot of code. To just have merged it because it was open for 11 years would have been the wrong thing to do. It needed to cover some things it didn't initially cover, it needed tests and documentation, and it wasn't merged until it was completed and properly reviewed. If this doesn't get fixed, doesn't that mean the Python review process is > flawed? Sure, Python is an open source project and many people just work in > their free time. But this doesn't really apply here, does it? The bugfix is > available. Only a review is required. All this is happening while new > features get added to Python with every new minor version. While the bug is > allowed to live there. Please help me understand how this can happen. > "Only a review is required" is vastly understating the value of code reviews. Almost anybody can write a one line fix, but is it the right fix? Does it cover all of the cases it needs to? Is adding "manager_owned=False" correct or should something else actually be done? Who knows and is available to understand the impacts of this change? So does this mean the review process is flawed? I would say no, the _review process_ is maybe working as expected—the linked PR was incomplete and wasn't merged, another PR has come up, and there's discussion on it including a comment about tests and one about familiarizing with the code. The process of finding humans who are willing and able to do this work—currently for free—is possibly broken, possibly working as expected, and overall is a significantly harder problem to fix than most anything involved with open source software. I love Python. No hard feelings. But this is really bugging me and I can't > help but feel disappointed. > The good thing is that you paid nothing for this, so being disappointed is something you can fix. If you would like more value out of it or to speed up the process, you can provide your own reviews. Reviewing code is immensely valuable and helps so many people—the core developers, the users, and yourself. Alternatively, paying people to do the reviews is also possible. ___ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/TTJAVTPF6RYO63GTBSTXFJG3IVCYPHXT/ > Code of Conduct: http://python.org/psf/codeofconduct/ > ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/5PYTF4BEKS3H2AZX6ZQXKIQM5SYTOH7H/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Stale PR
Before looking at the code, my first question would be about the description: "I kinda ran out of time, i suspect more testing is due." If you were out of time then it's probably not done and maybe lacks the tests you initially thought it did, so did you find the time and/or is the PR done? On Tue, Jul 6, 2021 at 10:07 AM Yair Frid wrote: > Hello, a few months ago i created this PR: > https://github.com/python/cpython/pull/24181 > Which has since gone stale, I would really like it to be reviewed before i > continue fixing other issues as i do not want to have to deal with a > backlog of PRs > Thanks in advance, Yair. > ___ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/TYZH5DQJUBRMEPAR5N2I5VDGHNG7Y6SU/ > Code of Conduct: http://python.org/psf/codeofconduct/ > ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/PQSY3JH7VVAWUMFAODZ3KAIXQFPP4VVB/ Code of Conduct: http://python.org/psf/codeofconduct/
Re: [Python-Dev] Built with VS2012 Express for desktop
On Tue, Feb 19, 2013 at 12:37 PM, rahul garg wrote: > Hi. > > I downloaded Python 3.3 source, opened up the solution in VS2012 Express for > Desktop and built the "python" subproject using "Release" and "x64" > configurations. I now have a "python.exe" in the PCBuild/amd64 subfolder > that appears to be working as far as i can see. > > I have a few questions: > a) Is there a test suite that I can run to verify that the build is working > fine? Last I checked there are some issues, but most of the tests should pass. You would run "PCBuild\python.exe -m test" from the top level of your checkout to see this. It's also covered at http://docs.python.org/devguide/ > b) I now intend to build some extensions (such as NumPy). Not sure if this > is the right list, but would I need to modify something in distutils to get > it working with VS2012? Yes. You'll probably need to point distutils to the correct batch file that sets up a VS2012 build environment. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python Language Summit at PyCon: Agenda
On Wed, Feb 27, 2013 at 10:51 AM, Michael Foord wrote: > Hello all, > > PyCon, and the Python Language Summit, is nearly upon us. We have a good > number of people confirmed to attend. If you are intending to come to the > language summit but haven't let me know please do so. > > The agenda of topics for discussion so far includes the following: > > * A report on pypy status - Maciej and Armin > * Jython and IronPython status reports - Dino / Frank > * Packaging (Doug Hellmann and Monty Taylor at least) > * Cleaning up interpreter initialisation (both in hopes of finding areas > to rationalise and hence speed things up, as well as making things > more embedding friendly). Nick Coghlan > * Adding new async capabilities to the standard library (Guido) > * cffi and the standard library - Maciej > * flufl.enum and the standard library - Barry Warsaw > * The argument clinic - Larry Hastings > > If you have other items you'd like to discuss please let me know and I can > add them to the agenda. I'll take detailed notes again this year. Within a few days of the end of the conference I'll post a write-up to blog.python.org and this list to keep everyone informed. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Introducing Electronic Contributor Agreements
The full announcement is at http://blog.python.org/2013/03/introducing-electronic-contributor.html, but a summary follows. We've now moved to an electronic Contributor License Agreement form at http://www.python.org/psf/contrib/contrib-form/ which will hopefully ease the signing and sending of forms for our potential contributors. The form shows the required fields whether you're signing as an individual or a representative of an organization, and removes the need to print, scan, fax, etc. When a new contributor fills in the form, they are emailed a copy of the form and asked to confirm the email address that they used (and received that copy at). Upon confirming, the signed form is sent to the PSF Administrator and filed away. The signature can either be generated from your typed name, or you can draw or upload your actual written signature if you choose. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Introducing Electronic Contributor Agreements
On Mon, Mar 4, 2013 at 11:02 AM, Skip Montanaro wrote: > > > On Mon, Mar 4, 2013 at 10:30 AM, Brian Curtin wrote: >> >> The full announcement is at >> http://blog.python.org/2013/03/introducing-electronic-contributor.html, >> but a summary follows. >> ... > > > Brian, > > Do you want old-timers like me who have a wet-signed fax gathering dust in a > box at PSF World Headquarters to execute the electronic contributor > agreement? While not strictly necessary, I suspect it might be nice for you > to have all agreements in a common form. I'll check on that, but I don't think it's necessary since the gathered data is no different. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] VC++ 2008 Express Edition now locked away?
On Wed, Mar 6, 2013 at 10:55 AM, Chris Angelico wrote: > Is there any plan for future Python versions to use a free compiler on > Windows? That would eliminate this issue, but presumably would create > others. No plan, although there are at times patches/issues floating around to add some level of support for MinGW (or something like it) in addition to Microsoft's compiler. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] IDLE in the stdlib
On Wed, Mar 20, 2013 at 2:51 PM, Xavier Morel wrote: > That would be a blow to educators, but also Windows users: while the CLI > works very nicely in unices, that's not the case with the win32 console > which is as best as I can describe it a complete turd, making IDLE a > very nice proposition there (I never use IDLE on Linux or OSX, but do > all the time in Windows). Can you explain this a bit more? I've been using the CLI python.exe on Windows, Mac, and Linux for years and I don't know what you're talking about. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Google Summer of Code - Organization Deadline Approaching - March 29
Just an FYI that there are under 3 days to apply to Google Summer of Code for mentoring organizations: http://www.google-melange.com/gsoc/homepage/google/gsoc2013. The student application deadline is later on in May. If you run a project that is interested in applying under the Python umbrella organization, contact Terri Oda at [email protected] Is anyone here interested in leading CPython through GSOC? Anyone have potential students to get involved, or interested in being a mentor? ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Destructors and Closing of File Objects
On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath wrote: > [ Note: I already asked this on > http://stackoverflow.com/questions/15917502 but didn't get any > satisfactory answers] Sorry, but that's not a reason to repost your question to this list. If you have to ask somewhere else, it would be python-list, aka, comp.lang.python. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] I cannot create bug reports
On Wed, Apr 24, 2013 at 1:55 PM, Daniel Wong wrote: > Thank you. That was the problem. > > I feel kind of stupid now. In my defense, the error message could have been > more helpful, and requesting the bug creation form could have thrown up a > login error instead of showing up blank. File another bug? Bugs about the bug tracker go to http://psf.upfronthosting.co.za/roundup/meta/ ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 379 Python launcher for Windows - behaviour for #!/usr/bin/env python line is wrong
On Fri, May 3, 2013 at 3:23 PM, Paul Moore wrote: > I would propose that the behaviour of the launcher on Windows should be > changed when it encounters specifically the hashbang line #!/usr/bin/env > python. In that case, it should search PATH for a copy of python.exe, and if > it finds one, use that. If there is no python.exe on PATH, it should fall > back to the same version of Python as would have been used if the line were > #!/usr/bin/python. > > This will mean that scripts written with #!/usr/bin/env python will behave > the same on Unix and Windows in the presence of activated virtualenvs. > > Would people be happy with this change? If so I will open an issue on > bugs.python.org. I can look at producing a patch, as well. Sounds reasonable to me. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Any script to create the installation pacakge of Python 3.3.1 on Windows and *NIX?
On Wed, May 8, 2013 at 7:37 PM, Jianfeng Mao wrote: > To Python-Dev committers: > > > > I am working on a project to embed a slightly customized Python interpreter > in our own software. For easy installation and setup, we want to be able to > do the standard Python installation as part of the installation of our > product. So far I have successfully customized and built Python 3.3.1 > (including the subprojects) on Windows but I can’t find anything in the > source distribution to allow me package the binaries/modules etc into a MSI > just like the one on the download page on python.org. So I am asking for > information regarding how to package Python build for installation on both > Windows and *NIX platforms. Your help will be greatly appreciated. See Tools/msi/msi.py for the Windows MSI builder. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] make a Windows installation package (.msi) for Python 3.3
On Fri, May 10, 2013 at 12:31 PM, Jianfeng Mao wrote: > To Python Windows Release Managers: > > > > My name is Jianfeng Mao and I am a software developer at the U2 group in > Rocket Software (http://u2.rocketsoftware.com/). I am currently working on > a project to embed a slightly customized Python interpreter in our product. > For easy installation and setup, we hope to be able to do the standard > Python installation during the installation of our software. Basically I > want to create a .msi file that can be called to install the full Python if > the user needs this new feature. Brian Curtin ([email protected]) pointed me > to Tools/msi/msi.py for the Windows MSI builder. I tried to follow the > instructions in the README but couldn’t make it to work after a few twists > and turns. Brian mentioned that few people needs to do this and only > release managers handle the packaging of Python. I have listed the steps I > have done in my attempt to create the .msi file. Please let me know if I > have missed anything or done anything wrong. > > > > > > 1. hg clone http://hg.python.org/cpython > > 2. cd cpython > > 3. hg update 3.3 > > 4. cd tools\buildbot, edit build.bat to change the configuration from > Debug to Releaes; edit external.bat, change DEBUG=1 to DEBUG=0 > > 5. go back to cpython\ and run tools\buildbot\build.bat > > 6. cd PC, then do ‘nmake –f icons.mak’ > > 7. cd ..\tools\msi > > 8. c:\python27\python msi.py > > > > WARNING: nm did not run successfully - libpythonXX.a not built > > cl /O2 /D WIN32 /D NDEBUG /D _WINDOWS /MT /W3 /c msisupport.c > > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for > 80x86 > > Copyright (C) Microsoft Corporation. All rights reserved. > > > > msisupport.c > > link.exe /OUT:msisupport.dll /INCREMENTAL:NO /NOLOGO /DLL > /SUBSYSTEM:WIN > > DOWS /OPT:REF /OPT:ICF msisupport.obj msi.lib kernel32.lib > >Creating library msisupport.lib and object msisupport.exp > > Traceback (most recent call last): > > File "msi.py", line 1336, in > > add_files(db) > > File "msi.py", line 961, in add_files > > generate_license() > > File "msi.py", line 914, in generate_license > > raise ValueError, "Could not find "+srcdir+"/../"+pat > > ValueError: Could not find C:\temp\cpython/../tcl8* I'm in an airport and on a Mac right now so I can't test it, but IIRC you just need to adjust the script to look for tcl-8* and not tcl8* on line 908 of msi.py. You'll probably have to do the same for tk. If you come across other exceptions about tcl, tk, or other dependencies, it's likely that the paths are just incorrect. There may be a patch for this on bugs.python.org because I know I've gone through it. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] First post
On Tue, May 14, 2013 at 10:22 AM, Carlos Nepomuceno wrote: > Hi guys! This is my first post on this list. > > I'd like have your opinion on how to safely implement WSGI on a production > server. > > My benchmarks show no performance differences between our PHP and Python > environments. I'm using mod_wsgi v3.4 with Apache 2.4. > > Is that ok or can it get faster? > > Thanks in advance. Hi - this list is about the development of Python. For user questions, python-list is a better place to ask this. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2.7.5 baking
On Wed, May 15, 2013 at 1:07 PM, Georg Brandl wrote: > Am 15.05.2013 09:55, schrieb M.-A. Lemburg: >> On 12.05.2013 06:03, Benjamin Peterson wrote: >>> The long anticipated "emergency" 2.7.5 release has now been tagged. It >>> will be publicly announced as binaries arrive. >>> >>> Originally, I was just going to cherrypick regression fixes onto the >>> 2.7.4 release and release those as 2.7.5. I started to this but ran >>> into some conflicts. Since we don't have buildbot testing of release >>> branches, I decided it would be best to just cut from the maintenance >>> branch. >> >> Has the release been postponed ? >> >> I don't see it on http://www.python.org/download/ >> >> Incidentally, the schedule already lists 2.7.5 as released on >> 2013-05-12 (http://www.python.org/dev/peps/pep-0373/) and >> the release calendar on 2013-05-11: >> https://www.google.com/calendar/feeds/[email protected]/public/basic?orderby=starttime&sortorder=descending >> :-) >> > > We're still waiting for the Windows binaries. > > I think I will publish the source and Mac releases on the website now > and make a note that Windows is coming shortly. I'm going to get started building the MSIs this evening. I'm looking into how I can obtain a code signing certificate, otherwise we'd potentially be shipping unsigned security releases...*ducks* > Has anybody heard from Martin recently? I hope he's well and just > overworked... I asked some folks on the infrastructure team and the last they heard from him was 11 April. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Dash
On Jul 18, 2013 1:46 PM, "Serhiy Storchaka" wrote: > > 18.07.13 20:48, Guido van Rossum написав(ла): > >> I believe there are only a few places where en-dashes should be used, >> for most things you should use either em-dash or hyphen. Consult your >> trusted typography source (for US English, please, punctuation >> preferences vary by locale). E.g. Google for "em dash en dash". > > > Currently Python documentation in most cases uses en-dashes. Should we replace them to em-dashes? Should we remove spaces around dashes? > > Or we should replace a half-dozen of em-dashes found in Python documentation to en-dashes? > > I believe all hypens used in place of dash should be replaced to dash (but to en- or em- dash?) in any case. Besides visual consistency in a couple of places, is there a reason to care enough to make a wholesale change? ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Building a Faster Python
On Sun, Jul 21, 2013 at 6:46 PM, Ben Hoyt wrote: >> PyBench2.0 shows the total running time dropping from 5653ms to 4571ms. > > That's very cool -- a significant improvement. Is this the kind of change > that could go into 2.7.6 binaries? > > As a Windows user, it makes me wonder if compiling with the latest version > of the Microsoft compiler would improve things similarly? (Though updating > project files to that is almost certainly a bigger project than the gcc > update.) I think I have a 3.3 build on VS2012 somewhere - maybe I'll refresh it for default/3.4 and run the same benchmarks on it. The changes couldn't go into 2.7 as far as I'm aware, at least when it comes to changing Visual Studio versions. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
