[Python-Dev] Re: PEP 663: Improving and Standardizing Enum str(), repr(), and format() behaviors

2021-09-13 Thread Steve Dower
On 9/13/2021 8:12 PM, Ethan Furman wrote: On 9/13/21 9:03 AM, Steve Dower wrote: > You *are* allowed to put some (brief) details in the abstract. No need to avoid spoilers ;) > > As it stands, "it is time" on its own is a really bad reason to change anything. So you'

[Python-Dev] Re: PEP 663: Improving and Standardizing Enum str(), repr(), and format() behaviors

2021-09-13 Thread Steve Dower
On 9/11/2021 6:53 AM, Ethan Furman wrote: Abstract Now that we have a few years experience with Enum usage it is time to update the ``repr()``, ``str()``, and ``format()`` of the various enumerations by their intended purpose. You *are* allowed to put some (brief) details in the

[Python-Dev] Re: Making code object APIs unstable

2021-08-16 Thread Steve Dower
On 8/16/2021 12:47 AM, Guido van Rossum wrote: My current proposal is to issue a DeprecationWarning in PyCode_New() and PyCode_NewWithPosArgs(), which can be turned into an error using a command-line flag. If it's made an error, we effectively have (B); by default, we have (A). Then in 3.13

[Python-Dev] Re: Repealing PEP 509 (Add a private version to dict)

2021-07-29 Thread Steve Dower
On 7/29/2021 6:17 PM, Barry Warsaw wrote: On Jul 29, 2021, at 05:55, Steve Dower wrote: Maybe we should have a "Type" other than Standards Track for PEPs that are documenting implementation designs, rather than requirements for standardisation? Wouldn’t Informational fill

[Python-Dev] Re: Repealing PEP 509 (Add a private version to dict)

2021-07-29 Thread Steve Dower
On 7/29/2021 11:41 AM, Mark Shannon wrote: The dictionary version number is currently unused in CPython and just wastes memory. I am not claiming that we will never need it, just that we shouldn't be required to have it. It should be an internal implementation detail that we can add or remove

[Python-Dev] Re: [slightly OT] cryptographically strong random.SystemRandom()

2021-07-12 Thread Steve Dower
On 7/12/2021 4:11 PM, Dan Stromberg wrote: It looks like CPython could do better on Windows: SystemRandom (because of os.urandom()) is good on Linux and mac, but on Windows they use the CryptGenRandom deprecated API Supporting detail:

[Python-Dev] Re: Is the Python review process flawed?

2021-07-01 Thread Steve Dower
On 7/1/2021 7:04 PM, Christopher Barker wrote: PS: All that being said, we, as a community, could do better. For instance, someone like me could do high-level triage on bug reports -- I need to set aside some time to do that. In addition/instead of triage, one thing we (as core maintainers)

[Python-Dev] Re: Making PY_SSIZE_T_CLEAN not mandatory.

2021-06-17 Thread Steve Dower
On 6/9/2021 2:20 PM, Petr Viktorin wrote: On 09. 06. 21 13:09, Paul Moore wrote: Also, I often use the stable ABI when embedding, so that I can replace the Python interpreter without needing to recompile my application and redeploy new binaries everywhere (my use case is pretty niche, though,

[Python-Dev] Re: change of behaviour for '.' in sys.path between 3.10.0a7 and 3.10.0b1

2021-06-04 Thread Steve Dower
On 6/3/2021 7:42 PM, Senthil Kumaran wrote: On Thu, Jun 03, 2021 at 07:08:06PM +0100, Robin Becker wrote: The regression may well be a platform issue. I am by no means an expert at building python; I followed a recipe from the ARCH PKGBUILD of some time I meant the change in the diff we were

[Python-Dev] Re: GDB not breaking at the right place

2021-05-25 Thread Steve Dower
On 5/24/2021 9:38 PM, Guido van Rossum wrote: To the contrary, I think if you want the CI jobs to be faster you should add the CFLAGS to the configure call used to run the CI jobs. Big +1 We should have the most useful interactive development/debugging options set by default (or with an

[Python-Dev] Re: Question for potential python development contributions on Windows

2021-05-24 Thread Steve Dower
When you're installing Visual Studio the C++ tools version is listed under the selected components as "v14x". However, at this stage, the *only* version in circulation is 14.x - mine shows v142. Until the 14 changes to a "15", it will be binary compatible and so you can use any version at all

[Python-Dev] Re: The repr of a sentinel

2021-05-21 Thread Steve Dower
On 5/21/2021 9:36 AM, Petr Viktorin wrote: On 21. 05. 21 3:23, Eric V. Smith wrote: On 5/20/2021 3:24 PM, Ronald Oussoren via Python-Dev wrote: One example of this is the definition of dataclasses.field: |dataclasses.||field|(/*/, /default=MISSING/, /default_factory=MISSING/, /repr=True/,

[Python-Dev] Re: The repr of a sentinel

2021-05-14 Thread Steve Dower
On 14May2021 0622, micro codery wrote: There was a discussion a while back ( a year or so?? ) on Python-ideas that introduced the idea of having more "sentinel-like" singletons in Python -- right now, we only have None. Not quite true, we also have Ellipsis, which already has a

[Python-Dev] Re: The repr of a sentinel

2021-05-13 Thread Steve Dower
On 13May2021 1248, Petr Viktorin wrote: On 13. 05. 21 11:45, Antoine Pitrou wrote: Le 13/05/2021 à 11:40, Irit Katriel a écrit : On Thu, May 13, 2021 at 10:28 AM Antoine Pitrou > wrote:  I agree that is a reasonable spelling. I initially suggested , but

[Python-Dev] Re: pth file encoding

2021-03-17 Thread Steve Dower
On 3/17/2021 7:34 PM, Ivan Pozdeev via Python-Dev wrote: On 17.03.2021 20:30, Steve Dower wrote: On 3/17/2021 8:00 AM, Michał Górny wrote: How about writing paths as bytestrings in the long term?  I think this should eliminate the necessity of knowing the correct encoding for the filesystem

[Python-Dev] Re: pth file encoding

2021-03-17 Thread Steve Dower
On 3/17/2021 6:08 PM, Stefan Ring wrote: A somewhat radical idea carrying this to the extreme would be to use UTF-16 (LE) on Windows. After all, this _is_ the native file system encoding, and Notepad will happily read and write it. I'm not opposed to detecting a BOM by default (when no other

[Python-Dev] Re: pth file encoding

2021-03-17 Thread Steve Dower
On 3/17/2021 8:00 AM, Michał Górny wrote: How about writing paths as bytestrings in the long term? I think this should eliminate the necessity of knowing the correct encoding for the filesystem. That's what we're trying to do, the problem is that they start as strings, and so we need to

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-24 Thread Steve Dower
On 2/24/2021 4:26 PM, Christian Heimes wrote: On 24/02/2021 15.16, Random832 wrote: On Wed, Feb 24, 2021, at 06:27, Christian Heimes wrote: Separate directories don't prevent clashes and system breakage. But they provide an easy way to *recover* from a broken system. I think it could be

[Python-Dev] Re: Move support of legacy platforms/architectures outside Python

2021-02-22 Thread Steve Dower
On 2/22/2021 5:18 PM, Matthias Klose wrote: On 2/21/21 1:13 PM, Victor Stinner wrote: Document what is supported, be inclusive about anything else. Don't make a distinction yet between legacy and upcoming new architectures. I agree with this, and I don't see any reason why we shouldn't just

[Python-Dev] Re: PEP 624: Remove Py_UNICODE encoder APIs

2021-02-01 Thread Steve Dower
On 2/1/2021 5:16 PM, Christian Heimes wrote: On 01/02/2021 17.39, M.-A. Lemburg wrote: Can you explain where wchar_t* type is appropriate and how two conversions is a performance bottleneck? If an extension has a wchar_t* string, it should be easy to convert this in to a Python bytes object

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-30 Thread Steve Dower
On 29Jan2021 1715, Victor Stinner wrote: It seems like declaring a TLS in libpython and using it from an extension module (another dynamic library) is causing issues depending on the linker. It "should" work on macOS, but it doesn't. I'm pretty sure this is not defined in any calling

[Python-Dev] Re: Why aren't we allowing the use of C11?

2021-01-30 Thread Steve Dower
On 29Jan2021 2227, Random832 wrote: On Thu, Jan 28, 2021, at 22:57, Emily Bowman wrote: On Thu, Jan 28, 2021 at 1:31 PM MRAB wrote: I have Microsoft Visual Studio Community 2019 Version 16.8.4 (it's free) and it supports C11 and C17. While an upgrade for Community is free, for

[Python-Dev] Re: New sys.module_names attribute in Python 3.10: list of all stdlib modules

2021-01-26 Thread Steve Dower
On 1/26/2021 8:32 PM, Steve Holden wrote: If the length of the name is any kind of issue, since the stdlib only contains modules (and packages), why not just sys.stdlib_names? And since the modules can vary between platforms and builds, why wouldn't this be sysconfig.stdlib_names rather than

[Python-Dev] Re: The SC is accepting PEP 632: deprecating distutils

2021-01-22 Thread Steve Dower
On 1/21/2021 6:30 PM, Brett Cannon wrote: On behalf of the SC, I'm happy to announce that we have chosen to accept PEP 632. Congrats, Steve, and thanks for the work on the PEP! I'll let Steve outline what the next steps are for implementing the PEP. Thanks. Work from this point on will be

[Python-Dev] Re: Enhancement request for PyUnicode proxies

2021-01-04 Thread Steve Dower
On 12/29/2020 5:23 PM, Antoine Pitrou wrote: The third option is to add a distinct "string view" protocol. There are peculiarities (such as the fact that different objects may have different internal representations - some utf8, some utf16...) that make the buffer protocol suboptimal for this.

[Python-Dev] Re: Where is the SQLite module maintainer

2021-01-04 Thread Steve Dower
On 12/28/2020 11:32 AM, Erlend Aasland wrote: On 27 Dec 2020, at 22:38, Christian Heimes > wrote: How about you put your name in the expert index instead of him? :) Thanks for your confidence, but I'm far from an expert :) Neither is anyone else :) I'm not

[Python-Dev] Re: Advice / RTFM needed for tool setup to participate in python development from a Windows host

2020-12-17 Thread Steve Dower
On 16Dec2020 2114, pjfarl...@earthlink.net wrote: If anyone has or knows of step-by-step instructions on how to set that debug environment up and start the outer-level script with debug breakpoints in the DLL I would greatly appreciate it. I'm also doing my own searches for tutorials on

[Python-Dev] Re: Who is target reader of tutorial?

2020-11-06 Thread Steve Dower
way to store parameters for ML models. --Guido On Fri, Nov 6, 2020 at 8:32 AM Steve Dower <mailto:steve.do...@python.org>> wrote: It would also be nice for the tutorial to separate between "things you need to know to use Python" vs "things you need to wr

[Python-Dev] Re: Who is target reader of tutorial?

2020-11-06 Thread Steve Dower
It would also be nice for the tutorial to separate between "things you need to know to use Python" vs "things you need to write a Python library". For example, the fact that operators can do different things for different values (e.g. int, str, list, pathlib) would be in the first category,

[Python-Dev] Re: Speeding up CPython

2020-10-22 Thread Steve Dower
On 22Oct2020 1341, Marco Sulla wrote: On Thu, 22 Oct 2020 at 14:25, Mark Shannon > wrote: MSVC seems to do better jump fusion than GCC. Maybe I'm wrong, since I only take a look at dict, tuple and set C code, but it does not seems to me that there's more than 1-2

[Python-Dev] Re: PEP 640: Unused variable syntax.

2020-10-20 Thread Steve Dower
On 20Oct2020 1309, Thomas Wouters wrote: The reason for this PEP is that pattern matching will make '_' (but not any other names) have the behaviour suggested in this PEP, but *only* in pattern matching. Then why is this PEP proposing a different syntax? At the very least, wait for pattern

[Python-Dev] Re: PEP 640: Unused variable syntax.

2020-10-20 Thread Steve Dower
On 20Oct2020 1021, Steven D'Aprano wrote: In my opinion, having a convention to treat certain variables as "unused" is great (I'm partial to `__` myself, to avoid clobbering the special variable `_` in the REPL). But having that be a pseudo-variable which is *actually* unused and unuseable

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-20 Thread Steve Dower
On 20Oct2020 0520, Rob Cliffe wrote: On 19/10/2020 12:42, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 19Oct2020 1846, Eryk Sun wrote: On 10/19/20, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 19Oct2020 1652, Gregory P. Smith wrote: I'm sure this is covered in MSDN.  Linking to that if it has it in a concise explanation would make sense from a note in our docs. Probably unlikely :) I'm pretty sure this started "perfect" and was then wound back to improve performance. But it's

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 19Oct2020 1242, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while os.scandir() returns the last

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while os.scandir() returns the last access time without updating it. Eryk

[Python-Dev] Re: PEP 632: Deprecate distutils module

2020-09-11 Thread Steve Dower
On 9/11/2020 12:24 PM, Matthias Klose wrote: On 9/4/20 1:28 PM, Steve Dower wrote: Hi all. setuptools has recently adopted the entire codebase of the distutils module, so that they will be able to make improvements directly without having to rely on patching the standard library. As a result

[Python-Dev] Re: PEP 632: Deprecate distutils module

2020-09-08 Thread Steve Dower
On 07Sep2020 1602, Stefan Krah wrote: I'm under the impression that distutils has effectively been frozen for the last decade, except for the substantial improvements you made for the MSVC part. For Unix, no one has addressed e.g. C++ support. The underlying reason has always been that we

[Python-Dev] Re: PEP 632: Deprecate distutils module

2020-09-07 Thread Steve Dower
On 07Sep2020 1424, Stefan Krah wrote: On Mon, Sep 07, 2020 at 11:43:41AM +0100, Steve Dower wrote: Rest assured, I am very aware of air-gapped and limited network systems, as well as corporate policies and processes. Having distutils in the standard library does not help with any

[Python-Dev] Re: PEP 632: Deprecate distutils module

2020-09-07 Thread Steve Dower
Thanks everyone for your input so far. Rest assured, I am very aware of air-gapped and limited network systems, as well as corporate policies and processes. Having distutils in the standard library does not help with any of these. Do not forget that pip (and presently, though not

[Python-Dev] PEP 632: Deprecate distutils module

2020-09-04 Thread Steve Dower
in and skim read it, assuming things don't go way off track). Also be aware that I already have some minor changes lined up that are not in this text. Refer to the discussion on Discourse if you need to see those. Cheers, Steve --- PEP: 632 Title: Deprecate distutils module Author: Steve

[Python-Dev] Re: Procedure for trivial PRs

2020-08-13 Thread Steve Dower
On 8/13/2020 9:56 PM, Mariatta wrote:  a) is it ok to touch 3.9, as it's in rc1? Yeah bug fixes are accepted to the maintenance branches. I think your PR does count as documentation bug fix, so it should be ok to backport to 3.9 At this stage, changes to the 3.9 branch won't go into

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-07 Thread Steve Dower
On 07Aug2020 2133, Joao S. O. Bueno wrote: Enough cheaptalk - links are here: tests: https://github.com/jsbueno/terminedia/blob/fa5ac012a7b93a2abe26ff6ca41dbd5f5449cb0b/tests/test_utils.py#L356 Branch comparison for the match/case version: https://github.com/jsbueno/terminedia/compare/patma

[Python-Dev] Re: Fwd: [pypi-announce] upgrade to pip 20.2 -- plus changes coming in 20.3

2020-08-03 Thread Steve Dower
Thanks. It looks like we can do it later this week and make the next round of releases. Please let us know asap if anything comes up that you wouldn't want to be released. Cheers, Steve On 01Aug2020 1632, Sumana Harihareswara wrote: Steve Dower asked: Do you think we should be updating

[Python-Dev] Re: Fwd: [pypi-announce] upgrade to pip 20.2 -- plus changes coming in 20.3

2020-07-30 Thread Steve Dower
Do you think we should be updating the version of pip bundled with Python 3.9 at this stage (for the first RC)? Similarly, is there a need to update Python 3.8 for its next release? Thanks, Steve On 30Jul2020 2119, Sumana Harihareswara wrote: A new pip is out. Please see below, upgrade, and

[Python-Dev] Re: PEP 626: Precise line numbers for debugging and other tools.

2020-07-28 Thread Steve Dower
On 25Jul2020 2014, Jim J. Jewett wrote: But it sounds as though you are saying the benefit is irrelevant; it is just inherently too expensive to ask programs that are already dealing with internals and trying to optimize performance to make a mechanical change from: code.magic_attrname

[Python-Dev] Re: PEP 626: Precise line numbers for debugging and other tools.

2020-07-23 Thread Steve Dower
On 22Jul2020 1319, Mark Shannon wrote: On 21/07/2020 9:46 pm, Gregory P. Smith wrote: Q: Why can't we have the information about the entire span of lines rather than consider a definition to be a "line"? Pretty much every profiler, coverage tool, and debugger ever expects lines to be

[Python-Dev] Re: How to customize CPython to a minimal set

2020-07-21 Thread Steve Dower
On 21Jul2020 0633, Huang, Yang wrote: Yes. Micropyhton is also in consideration. But sqlite3 is the first usage. There should be some additional features like numpy, scipy... Not sure if micropython supports well? Or is there a feasible way to strip CPython ? Only by manually removing

[Python-Dev] Re: os.add_dll_directory and DLL search order

2020-06-22 Thread Steve Dower
On 22Jun2020 1646, Steve Dower wrote: DLLs should not be in the search path at all - it's searched by sys.path when importing .pyd files, which are loaded by absolute path and their dependencies found adjacent. To clarify this - by "DLLs" I meant the DLLs directory, not DLLs i

[Python-Dev] Re: os.add_dll_directory and DLL search order

2020-06-22 Thread Steve Dower
On 22Jun2020 1039, Seth G wrote: However, there is one feature of using the Windows PATH that I can't seem to replicate with add_dll_directory. The MapServer DLL builds are linked to sqlite3 3.24.0, whereas Python 3.8.2 is linked to 2.6.0. Building with matching versions is not something I can

[Python-Dev] Re: Design and Architecture of python

2020-06-17 Thread Steve Dower
If you're not willing to slog through the source code and many PEPs and past discussions, Anthony Shaw has done it for you and written a book: https://realpython.com/products/cpython-internals-book/ All the other write-ups I'm aware of are very dated, so I don't have any free suggestions I'm

[Python-Dev] Re: When can we remove wchar_t* cache from string?

2020-06-16 Thread Steve Dower
On 16Jun2020 1641, Inada Naoki wrote: * This change doesn't affect to pure Python packages. * Most of the rest uses Cython. Since I already report an issue to Cython, regenerating with new Cython release fixes them. The precedent set in our last release with tp_print was that regenerating

[Python-Dev] Re: My take on multiple interpreters (Was: Should we be making so many changes in pursuit of PEP 554?)

2020-06-12 Thread Steve Dower
On 12Jun2020 1008, Paul Moore wrote: On Fri, 12 Jun 2020 at 09:47, Mark Shannon wrote: Starting a new process is cheap. On my machine, starting a new Python process takes under 1ms and uses a few Mbytes. Is that on Windows or Unix? Traditionally, process creation has been costly on Windows,

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-06-02 Thread Steve Dower
On 02Jun2020 1430, David Mertz wrote: On Tue, Jun 2, 2020 at 8:07 AM Chris Angelico > wrote: > Given that the only input parameters are the iterables themselves, it's a stretch to even consider the first two as possibilities. Why? I can conceivably

[Python-Dev] Re: A PEP PR that I closed until someone discusses context

2020-05-06 Thread Steve Dower
On 06May2020 2204, joannah nanjekye wrote: I saw a PR on the PEP repository that looked like a joke here : https://github.com/python/peps/pull/1396 The author can give context to re-open if it was intentional. Given there isn't a real email address on the PEP, I'd assume it was meant as a

[Python-Dev] Remove ctypes from uuid

2020-05-04 Thread Steve Dower
For those who haven't looked in a while, the uuid module uses ctypes to look up libuuid for uuid_generate_time_safe() and uuid_generate_time() functions. I've run into scenarios where I need to remove this from our own builds, but it seems like it's probably unnecessary anyway? It's certainly

[Python-Dev] Re: killing static types (for sub-interpreters?)

2020-04-28 Thread Steve Dower
On 28Apr2020 2006, Steve Dower wrote: (For those who aren't following it, there's a discussion with a patch and benchmarks going on at https://bugs.python.org/issue40255 about making objects individually immortal. It's more focused around copy-on-write, rather than subinterpreters

[Python-Dev] Re: killing static types (for sub-interpreters?)

2020-04-28 Thread Steve Dower
If the object is going to live until the "end of time" (process/runtime/whatever) then there'll never be a need to deallocate it, and so there's no point counting how many references exist (and ditto for anything that it references). Currently, statically allocated types include references to

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-28 Thread Steve Dower
On 28Apr2020 1243, Petr Viktorin wrote: On 2020-04-28 00:26, Steve Dower wrote: On 27Apr2020 2311, Tom Forbes wrote: Why not? It's a decorator, isn't it? Just make it check for number of arguments at decoration time and return a different object. It’s not that it’s impossible, but I didn’t

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-27 Thread Steve Dower
On 27Apr2020 2311, Tom Forbes wrote: Why not? It's a decorator, isn't it? Just make it check for number of arguments at decoration time and return a different object. It’s not that it’s impossible, but I didn’t think the current implementation doesn’t make it easy This is the line I'd

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-27 Thread Steve Dower
On 27Apr2020 2237, t...@tomforb.es wrote: 2. Special casing "lru_cache" to account for zero arity methods isn't trivial and we shouldn't endorse lru_cache as a way of achieving "call_once" semantics Why not? It's a decorator, isn't it? Just make it check for number of arguments at decoration

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-14 Thread Steve Dower
On 14Apr2020 1557, André Malo wrote: Stefan Behnel wrote: André Malo schrieb am 14.04.20 um 13:39: A good way to test that promise (or other implications like performance) might also be to rewrite the standard library extensions in Cython and see where it leads. Not sure I understand

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 13Apr2020 2308, André Malo wrote: For one thing, if you open up APIs for Cython, they're open for everybody (Cython being "just" another C extension). More to the point: The ABIs have the same problem as they have now, regardless how responsive the Cython developers are. Once you compiled the

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 13Apr2020 2105, Chris Meyer wrote: How would I call a Python function from the C++ application that returns a Python object to C++ and then call a method on that Python object from C++? My specific example is that I create Python handlers for Qt windows and then from the Qt/C++ I call

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 13Apr2020 1325, Paul Moore wrote: Personally, I'd say that "recommended 3rd party tools" reads as saying "if you want a 3rd party tool to build extensions, these are good (and are a lot easier than using the raw C API)". That's a lot different than saying "we recommend that people writing C

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 13Apr2020 1122, Steve Dower wrote: On 11Apr2020 0111, Victor Stinner wrote: Steve: the use case is to debug very rare Python crashes (ex: once every two months) of customers who fail to provide a reproducer. My *expectation* is that a debug build should help to reproduce the bug

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 13Apr2020 1157, Antoine Pitrou wrote: On Mon, 13 Apr 2020 11:35:34 +0100 Steve Dower wrote: and this code that they're using doesn't have any system dependencies that differ in debug builds (spoiler: they do). Are you talking about Windows? On non-Windows systems, I don't think

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 11Apr2020 0025, Antoine Pitrou wrote: On Fri, 10 Apr 2020 23:33:28 +0100 Steve Dower wrote: On 10Apr2020 2055, Antoine Pitrou wrote: On Fri, 10 Apr 2020 19:20:00 +0200 Victor Stinner wrote: Note: Cython and cffi should be preferred to write new C extensions. This PEP is about existing C

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 11Apr2020 1156, Rhodri James wrote: On 10/04/2020 18:20, Victor Stinner wrote: Note: Cython and cffi should be preferred to write new C extensions. This PEP is about existing C extensions which cannot be rewritten with Cython. If this is true, the documentation on python.org needs a

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-13 Thread Steve Dower
On 11Apr2020 0111, Victor Stinner wrote: Steve: the use case is to debug very rare Python crashes (ex: once every two months) of customers who fail to provide a reproducer. My *expectation* is that a debug build should help to reproduce the bug and/or provide more information when the bug

[Python-Dev] Re: PEP: Modify the C API to hide implementation details

2020-04-10 Thread Steve Dower
On 10Apr2020 2055, Antoine Pitrou wrote: On Fri, 10 Apr 2020 19:20:00 +0200 Victor Stinner wrote: Note: Cython and cffi should be preferred to write new C extensions. This PEP is about existing C extensions which cannot be rewritten with Cython. Using Cython does not make the C API

[Python-Dev] Re: Need help with test_ctypes failing on Windows (test_load_dll_with_flags)

2020-04-07 Thread Steve Dower
FWIW, this test is meant to verify that the old, unsafe DLL load logic still works. I suspect what has happened here is that a new VM image has been rolled out and another app has installed an incompatible _sqlite3.dll on PATH (most likely another copy of Python :) ), thereby proving why the

[Python-Dev] Re: PEP 616 -- String methods to remove prefixes and suffixes

2020-03-24 Thread Steve Dower
On 24Mar2020 1849, Brett Cannon wrote: -1 on "cut*" because my brain keeps reading it as "cute". +1 on "trim*" as it is clear what's going on and no confusion with preexisting methods. +1 on "remove*" for the same reasons as "trim*". And if no consensus is reached in this thread for a name I

[Python-Dev] Re: [bpo-22699] Cross-compiling and fixing sysconfig

2020-03-19 Thread Steve Dower
via Python-Dev wrote: Last time I checked, distutils didn't support compilation for anything but the running Python instance, nor was it intended to. Should it? If not, the efforts look misplaced, you should rather use a toolchain that does... On 19.03.2020 23:22, Steve Dower wrote: So over

[Python-Dev] [bpo-22699] Cross-compiling and fixing sysconfig

2020-03-19 Thread Steve Dower
So over on https://bugs.python.org/issue22699 I've been talking to myself as I figure out all the ways that cross-compiling (on Ubuntu, targeting another Linux distro via an SDK) fails. In short, it's either because sysconfig can't provide details about any CPython install other than the

[Python-Dev] Re: Proliferation of tstate arguments.

2020-03-17 Thread Steve Dower
On 17Mar2020 1803, Chris Angelico wrote: On Wed, Mar 18, 2020 at 3:50 AM Mark Shannon wrote: The accessibility of a thread-local variable is a strict superset of that of a function-local variable. Therefore storing the thread state in a thread-local variable is at least as capable as passing

[Python-Dev] Re: Proliferation of tstate arguments.

2020-03-17 Thread Steve Dower
On 17Mar2020 1447, Mark Shannon wrote: On 16/03/2020 3:04 pm, Victor Stinner wrote: In short, the answer is yes. I said "no" then and gave reasons. AFAICT no one has faulted my reasoning. I said "yes" then and was also not faulted. Let me reiterate why using a thread-local variable is

[Python-Dev] Re: Maintenance of multiprocessing module: there are a few stalled issues/patches

2020-02-13 Thread Steve Dower
On 13Feb2020 0156, Benjamin Peterson wrote: On Wed, Feb 12, 2020, at 08:22, mailer@app.tempr.email wrote: I've just been looking through the multiprocessing module and open issues and wondered why there were some small bugs/patches not being fixed/merged. Is this the "normal" patch cycle?

[Python-Dev] Re: Azure Pipelines PR: Unresponsive agent

2020-02-01 Thread Steve Dower
On 01Feb2020 1840, Kyle Stanley wrote: > In a recent PR (https://github.com/python/cpython/pull/18057), I > received the following error message in the Azure Pipelines build results: > > ##[error]We stopped hearing from agent Azure Pipelines 5. Verify the > agent machine is running and has a

[Python-Dev] Re: Request to postpone some Python 3.9 incompatible changes to Python 3.10

2020-01-27 Thread Steve Dower
On 25Jan.2020 0348, Guido van Rossum wrote: > On Fri, Jan 24, 2020 at 12:12 AM Serhiy Storchaka > wrote: > > I consider breaking unmaintained code is an additional benefit of > removing deprecated features. > > > I'd like to warn against this attitude (even

[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?

2020-01-10 Thread Steve Dower
On 09Jan2020 1659, Victor Stinner wrote: Le jeu. 9 janv. 2020 à 19:33, Steve Dower a écrit : Requiring an _active_ Python thread (~GIL held) to only run on a single OS thread is fine, but tying it permanently to a single OS thread makes things very painful. (Of course, this isn't the only

[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?

2020-01-09 Thread Steve Dower
On 09Jan2020 0429, Mark Shannon wrote: There is a one-to-one correspondence between Python threads and O/S threads. So the threadstate can, and should, be stored in a thread local variable. This is a major issue for embedders (and potentially asyncio), as it prevents integration with

[Python-Dev] Re: Should we pass tstate in the VECTORCALL calling convention before making it public?

2020-01-08 Thread Steve Dower
On 08Jan2020 0746, Victor Stinner wrote: The question is now if we should "propagate" tstate to function calls in the latest VECTORCALL calling convention (which is currently private). +1, for all the same reasons I'm +1 on passing it to C functions explicitly. (In short, embedding can be very

[Python-Dev] GitHub Actions enabled (was: Travis CI for backports not working)

2019-12-16 Thread Steve Dower
On 13Dec2019 0959, Brett Cannon wrote: Steve Dower wrote: If people are generally happy to move PR builds/checks to GitHub Actions, I'm happy to merge https://github.com/zooba/cpython/pull/7 into our active branches (with probably Brett's help) and disable Azure Pipelines? I'm personally up

[Python-Dev] Re: Should set objects maintain insertion order too?

2019-12-16 Thread Steve Dower
On 16Dec2019 0417, Petr Viktorin wrote: Originally, making dicts ordered was all about performance (or rather memory efficiency, which falls in the same bucket.) It wasn't added because it's better semantics-wise. Here's one (very simplified and maybe biased) view of the history of dicts: *

[Python-Dev] Re: Travis CI for backports not working.

2019-12-13 Thread Steve Dower
On 13Dec2019 0233, Victor Stinner wrote: Azure Pipelines were very unstable one year ago. It's getting better, but there are still some random bugs sometimes. They are not really blocking, so I didn't report them. The only ones I'm aware of are macOS builds failing (which don't run on Travis

[Python-Dev] Re: Travis CI for backports not working.

2019-12-06 Thread Steve Dower
On 06Dec2019 1023, Kyle Stanley wrote: Steve Dower wrote: > As a related aside, I've been getting GitHub Actions support together > (which I started at the sprints). Would adding support for GitHub Actions make it easier/faster to temporarily disable and re-enable specific CI service

[Python-Dev] Re: Travis CI for backports not working.

2019-12-06 Thread Steve Dower
On 06Dec2019 0620, Victor Stinner wrote: What's the status? Right now, I see Travis CI jobs passing on 3.7, 3.8 and master branches so I don't understand the problem. Maybe the issue has been fixed and Travis CI can be made mandatory again? They've been passing fine for me too, I'm not quite

[Python-Dev] Re: PEP proposal to limit various aspects of a Python program to one million.

2019-12-03 Thread Steve Dower
On 03Dec2019 0815, Mark Shannon wrote: Hi Everyone, I am proposing a new PEP, still in draft form, to impose a limit of one million on various aspects of Python programs, such as the lines of code per module. I assume you're aiming for acceptance in just under four months? :) Any thoughts

[Python-Dev] Re: Restricted Entry Point from PEP-551/578

2019-11-21 Thread Steve Dower
On 21Nov2019 1337, Jason Killen wrote: I'm good, not discouraged.  Thank you for the explanation I've got my bearings now.  I will try and figure out what's missing with the new config system.  If you have tips or reading material or anything else I should know just send it on otherwise I'll

[Python-Dev] Re: Restricted Entry Point from PEP-551/578

2019-11-21 Thread Steve Dower
On 21Nov2019 0927, Jason Killen wrote: I sent in a couple of PRs, accepted and merged (Thanks!), lately that switch to using io.open_code when appropriate.  In the process of making those PRs I spent a bit of time reading the two related PEPs.  In PEP-551 there's a suggestion that people use a

[Python-Dev] Re: [RELEASE] Python 3.9.0a1 available for testing

2019-11-20 Thread Steve Dower
On 19Nov2019 1708, Łukasz Langa wrote: Go get it here: https://www.python.org/downloads/release/python-390a1/ Is it intentional that this link does not appear on https://www.python.org/download/pre-releases/ ? Cheers, Steve

[Python-Dev] Re: Pass the Python thread state to internal C functions

2019-11-14 Thread Steve Dower
On 13Nov2019 1954, Larry Hastings wrote: On 11/13/19 5:52 AM, Victor Stinner wrote: Le mer. 13 nov. 2019 à 14:28, Larry Hastings a écrit : I did exactly that in the Gilectomy prototype. Pulling it out of TLS was too slow, What do you mean? Getting tstate from a TLS was a performance

[Python-Dev] Cleaning the stable ABI [was Accepting PEP 602 -- Annual Release Cycle for Python]

2019-10-30 Thread Steve Dower
On 30Oct2019 1226, Brett Cannon wrote: * Now that the stable ABI has been cleaned, extension modules should feel more comfortable targeting the stable ABI which should make supporting newer versions of Python much easier I'm taking this as an indication that we should finish

[Python-Dev] Re: [RELEASE] Python 3.8.0 is now available

2019-10-15 Thread Steve Dower
On 15Oct2019 1143, MRAB wrote: On 2019-10-15 19:03, MRAB wrote: I've installed pywin32 on Python 3.8, but when I try to import win32clipboard it says it can't find it: Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright",

[Python-Dev] Re: PEP 587 (Python Initialization Configuration) updated to be future proof again

2019-09-30 Thread Steve Dower
On 30Sep2019 1625, Nick Coghlan wrote: After merging your PR and closing mine, I had an idea for Python 3.9: what if we offered a separate public "int Py_CheckVersionCompatibility(uint64_t header_version)" call? (64 bit input rather than 32 to allow for possible future changes to the version

[Python-Dev] Re: The Python 2 death march

2019-09-26 Thread Steve Dower
On 25Sep2019 2140, Benjamin Peterson wrote: On Wed, Sep 25, 2019, at 17:25, Rob Cliffe via Python-Dev wrote: I additionally share the bemusement of some other commentators on this thread to the idea of Python 2 "support", which is not something ever promised to Python 2 (or 3) users by

[Python-Dev] Re: Python for Windows (python-3.7.4.exe) location confusing

2019-09-11 Thread Steve Dower
On 10Sep2019 2120, Jim J. Jewett wrote: Is it possible for the installer to check whether or not there is a pre-existing system-wide launcher, and only do the complicated stuff if it is actually there? I'm not sure what you're referring to here. If there's a pre-existing launcher of the same

[Python-Dev] Re: Python for Windows (python-3.7.4.exe) location confusing

2019-09-10 Thread Steve Dower
On 09Sep2019 1950, Glenn Linderman wrote: On 9/9/2019 2:48 AM, Steve Dower wrote: User with administrative privileges are by implication better able to handle decisions such as this. If they are not, they should not be administrating a machine. Most home machines are administered by people

  1   2   3   4   5   6   7   >