[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-27 Thread Daniel.
Em sáb., 27 de jun. de 2020 às 11:12, Richard Damon < rich...@damon-family.org> escreveu: > On 6/27/20 5:36 AM, Stephen J. Turnbull wrote: > > Richard Damon writes: > > > > > I thought _ was also commonly used as: > > > > > > first, -, last = (1, 2, 3) > > > > > > as a generic don't care abou

Re: [Python-Dev] Sysadmin tasks

2014-10-01 Thread Daniel Holth
On Wed, Oct 1, 2014 at 1:59 PM, Mark Shannon wrote: > Hi, > > http://speed.python.org/ > could do with some love. +1 ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.

Re: [Python-Dev] PEP 441 - Improving Python ZIP Application Support

2015-02-15 Thread Daniel Holth
want anything more complex, it's easy enough to write your own > > script based on zipfile, or use one of the modules on PyPI. > > > > Does this sound reasonable? If it's OK, I'll go ahead and prepare an > > update to the PEP and an implementation. (Steve, looks

Re: [Python-Dev] PEP 441 - Improving Python ZIP Application Support

2015-02-17 Thread Daniel Holth
On Sun, Feb 15, 2015 at 1:45 PM, Serhiy Storchaka wrote: > On 15.02.15 18:21, Thomas Wouters wrote: >> >> which requires that extension modules are stored uncompressed (simple) >> and page-aligned (harder, as the zipfile.ZipFile class doesn't directly >> support page-aligning anything > > > It is

Re: [Python-Dev] easy_install ?

2015-02-24 Thread Daniel Holth
On Tue, Feb 24, 2015 at 1:31 PM, Alexander Belopolsky wrote: > > On Tue, Feb 24, 2015 at 11:44 AM, Paul Moore wrote: >> >> And if pip won't work, it would be good to >> know why. > > > Is there a recommended way to invoke pip from setup.py? When I specify > "tests_require=" and run "python setup

Re: [Python-Dev] easy_install ?

2015-02-24 Thread Daniel Holth
That might mostly do what you want, since tox could install any additional test requirements based on its configuration. On Tue, Feb 24, 2015 at 4:21 PM, Alexander Belopolsky wrote: > > On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth wrote: >> >> > Is there a recommended w

Re: [Python-Dev] easy_install ?

2015-02-24 Thread Daniel Holth
7:23, "Alexander Belopolsky" < > alexander.belopol...@gmail.com> wrote: > > > > > > On Tue, Feb 24, 2015 at 2:03 PM, Daniel Holth wrote: > > > > > > > Is there a recommended way to invoke pip from setup.py? When I > specify > > > >

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Daniel Holth
On Tue, Apr 21, 2015 at 1:10 PM, Guido van Rossum wrote: > On Tue, Apr 21, 2015 at 9:17 AM, R. David Murray > wrote: >> >> Please be respectful rather than inflammatory. If you read what I >> wrote, I did not say that I was going to stop contributing, I >> specifically talked about that gut reac

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-23 Thread Daniel Holth
On Thu, Apr 23, 2015 at 5:59 AM, Paul Sokolovsky wrote: > Hello, > > On Thu, 23 Apr 2015 10:43:52 +0200 > Wolfgang Langner wrote: > > [] > >> Also ask why no one used type specifier, they are possible since >> Python 3.0 ? >> Because it is the wrong way for Python. > > That's an example of how pe

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-23 Thread Daniel Holth
On Thu, Apr 23, 2015 at 9:55 AM, Paul Sokolovsky wrote: > Hello, > > On Thu, 23 Apr 2015 09:15:44 -0400 > Daniel Holth wrote: > > [] > >> >> Also ask why no one used type specifier, they are possible since >> >> Python 3.0 ? >> >> Be

[Python-Dev] PEP 0492 __aenter__ & __aexit__

2016-02-06 Thread Daniel Miller
implementations. Is there a piece of documentation I should be looking at that I'm missing? https://www.python.org/dev/peps/pep-0492/#asynchronous-context-managers-and-async-with Many thanks, Daniel ___ Python-Dev mailing list Python

Re: [Python-Dev] PEP 0492 __aenter__ & __aexit__

2016-02-07 Thread Daniel Miller
6:00 Brett Cannon : > > > On Sat, 6 Feb 2016 at 13:50 Daniel Miller > wrote: > >> Hi Python-Dev Group, >> >> I am trying to implement __aenter__ and __aexit__ for the RethinkDB >> <https://rethinkdb.com> Python driver. Looking at the PEP I don't se

[Python-Dev] Requesting review for the patch in issue26271

2016-03-05 Thread Daniel Shaulov
Hi, issue26271 has a patch attached that fixes it. Can someone please review it? It is a very small and straightforward patch. (pinging here as suggested in the devguide - https://docs.python.org/devguide/patch.html#reviewing) ___ Python-Dev mailing lis

[Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-18 Thread Daniel Holth
hen how to access the same value from both Python and CPython code. The structs were there but it was just hard to understand. Can someone explain it to me? Thanks, Daniel Holth ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailma

Re: [Python-Dev] Adding a threadlocal to the Python interpreter

2016-05-26 Thread Daniel Holth
re and what I should polish to get it in. Thanks, Daniel Holth On Thu, May 19, 2016 at 6:34 AM Christian Heimes wrote: > On 2016-05-19 04:30, Nick Coghlan wrote: > > On 18 May 2016 at 23:20, Daniel Holth wrote: > >> I would like to take another stab at adding a threadlocal "st

Re: [Python-Dev] New hash algorithms: SHA3, SHAKE, BLAKE2, truncated SHA512

2016-05-27 Thread Daniel Holth
OpenSSL sucks. Python would only have to bundle a reference implementation of the new hash algorithm(s), and unlike TLS suites they tend to just work. BLAKE2 is important, since it removes the last objection to replacing MD5 - speed - that has made it hard for cryptography fans to convince MD5 use

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Daniel Holth
On Thu, Nov 21, 2013 at 4:12 PM, Paul Moore wrote: > On 21 November 2013 21:02, Greg Ewing wrote: >> Is that much different from package authors having to >> release binaries for different versions of Python, >> if they want to support older versions? >> >> Having multiple binaries for the same x

Re: [Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Daniel Holth
+1 on unsorted repr(). It makes it obvious that the collection is not sorted. On Thu, Nov 21, 2013 at 1:10 PM, Christian Heimes wrote: > Am 21.11.2013 18:57, schrieb Tim Peters: >> Best to change the failing tests. For example, _they_ can sort the >> dict keys if they rely on a fixed order. Sor

[Python-Dev] thread issues when embedding Python

2013-12-17 Thread Daniel Pocock
I've successfully embedded Python for a single thread I tried to extend the implementation for multiple threads (a worker thread scenario) and I'm encountering either deadlocks or seg faults depending upon how I got about it. There seems to be some inconsistency between what is covered in the d

[Python-Dev] thread issues when embedding Python

2013-12-17 Thread Daniel Pocock
I've successfully embedded Python for a single thread I tried to extend the implementation for multiple threads (a worker thread scenario) and I'm encountering either deadlocks or seg faults depending upon how I got about it. There seems to be some inconsistency between what is covered in the d

Re: [Python-Dev] thread issues when embedding Python

2013-12-18 Thread Daniel Pocock
to make it work. Specifically, the PyWorkerThread constructor was taking an object argument when it should have taken a reference argument and this was creating an invalid Py::Callable member in my worker. On 18/12/13 00:19, Daniel Pocock wrote: > > I've successfully embedded Python f

Re: [Python-Dev] thread issues when embedding Python

2013-12-18 Thread Daniel Pocock
On 18/12/13 16:02, Chris Angelico wrote: > On Wed, Dec 18, 2013 at 9:26 PM, Daniel Pocock wrote: >> b) when each worker thread starts, call >> PyThreadState_New(mInterpreterState) and save the result in a thread >> local mPyThreadState >> >> c) use the mPyThre

Re: [Python-Dev] Backward-incompatible change to random.randrange in 2.7.6

2013-12-18 Thread Daniel Holth
But who could forget njzrs' wasp UAV software line 107, using int=float? https://github.com/nzjrs/wasp/blob/master/sw/groundstation/wasp/__init__.py#L107 On Wed, Dec 18, 2013 at 10:49 AM, Guido van Rossum wrote: > BTW, I bet a lavish dinner at PyCon that it is *only* Zope/ZODB that > does this.

Re: [Python-Dev] Backward-incompatible change to random.randrange in 2.7.6

2013-12-18 Thread Daniel Holth
On Dec 18, 2013 11:54 AM, "Tim Peters" wrote: > [Daniel Holth] > > But who could forget njzrs' wasp UAV software line 107, using > > int=float? > https://github.com/nzjrs/wasp/blob/master/sw/groundstation/wasp/__init__.py#L107 > > I could forget it

Re: [Python-Dev] thread issues when embedding Python

2013-12-18 Thread Daniel Pocock
On 18/12/13 16:29, Victor Stinner wrote: > 2013/12/18 Antoine Pitrou : >> You only need to call PyEval_InitThreads() once in the main Python >> thread. > > This is not well documented. For your information, PyGILState_Ensure() > now calls PyEval_InitThreads() in Python 3.4, see: > http://bugs.py

Re: [Python-Dev] thread issues when embedding Python

2013-12-19 Thread Daniel Pocock
On 19/12/13 12:22, Nick Coghlan wrote: > On 19 December 2013 07:58, Daniel Pocock wrote: >> >> On 18/12/13 16:29, Victor Stinner wrote: >>> 2013/12/18 Antoine Pitrou : >>>> You only need to call PyEval_InitThreads() once in the main Python >>>> t

Re: [Python-Dev] Interested in GSoC 2014

2013-12-23 Thread Daniel Pocock
ntegrate the new WebRTC / WebSocket cookie support with some existing Python-based web framework, e.g. Django. This would allow a user with a Django login, shopping cart or some other long running session to pass their state through the cookies. Regards, Daniel ___

[Python-Dev] Thanks for python!

2014-01-02 Thread Daniel Benamy
Hey all, I just wanted to say a quick thanks for python. The language, libs, docs, and really the whole ecosystem are so well done, and I really appreciate all your amazing work. Best, Dan ___ Python-Dev mailing list Python-Dev@python.org https://mail.p

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-07 Thread Daniel Holth
+1 I have always been delighted that it is possible to manipulate binary data in Python using string operations. It's not just immoral non-Unicode text processing. A poor man's ASN.1 generator is an example of a very non-text thing that might be convenient to write with a few %s fill-in-the-blanks

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-08 Thread Daniel Holth
On Tue, Jan 7, 2014 at 10:36 AM, Stephen J. Turnbull wrote: > Daniel Holth writes: > > > Isn't it true that if you have bytes > 127 or surrogate escapes then > > encoding to latin1 is no longer as fast as memcpy? > > Be careful. As phrased, the question makes no

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-08 Thread Daniel Holth
On Wed, Jan 8, 2014 at 2:17 PM, Stefan Behnel wrote: > Victor Stinner, 06.01.2014 14:24: >> Abstract >> >> Add ``bytes % args`` operator and ``bytes.format(args)`` method to >> Python 3.5. > > Here is a counterproposal. Let someone who needs this feature write a > library that does byte s

Re: [Python-Dev] Python3 "complexity" (was RFC: PEP 460: Add bytes...)

2014-01-09 Thread Daniel Holth
So the customer you're looking for is the person who cares a lot about encodings, knows how to do Unicode correctly, and has noticed that certain valid cases not limited to imperialist simpletons (dealing with specific common things invented before 1996, dealing with mixed encodings, doing what Nic

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-11 Thread Daniel Holth
On Sat, Jan 11, 2014 at 4:28 PM, Terry Reedy wrote: > On 1/11/2014 1:44 PM, Stephen J. Turnbull wrote: > >> We already *have* a type in Python 3.3 that provides text >> manipulations on arrays of 8-bit objects: str (per PEP 393). >> >> > BTW: I don't know why so many people keep asking for use c

Re: [Python-Dev] PEP 460 reboot

2014-01-12 Thread Daniel Holth
On Sun, Jan 12, 2014 at 8:27 PM, Ethan Furman wrote: > On 01/12/2014 04:47 PM, Guido van Rossum wrote: >> >> >> %s seems the trickiest: I think with a bytes argument it should just >> insert those bytes (and the padding modifiers should work too), and >> for other types it should probably work lik

Re: [Python-Dev] PEP 460 reboot

2014-01-12 Thread Daniel Holth
On Sun, Jan 12, 2014 at 9:18 PM, Guido van Rossum wrote: > On Sun, Jan 12, 2014 at 6:07 PM, Daniel Holth wrote: >> Is there a formatting character that means "anything except a unicode >> string" to prevent accidentally interpolating a Unicode string into a >&g

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
On Mon, Jan 13, 2014 at 12:42 PM, R. David Murray wrote: > On Mon, 13 Jan 2014 12:41:18 +0100, Antoine Pitrou > wrote: >> On Sun, 12 Jan 2014 18:11:47 -0800 >> Guido van Rossum wrote: >> > On Sun, Jan 12, 2014 at 5:27 PM, Ethan Furman wrote: >> > > On 01/12/2014 04:47 PM, Guido van Rossum wrot

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
I see it now. b"foo%sbar" % b'baz' should also expand to b"foob'foo'bar" Instead of "%b" could "%j" mean "I should have used + or join() here but was too lazy" and work on str too? On Mon, Jan 13, 2014 at 2:51 PM, Terry Reedy wrote: > On 1/13/2014 1:40 PM, Brett Cannon wrote: > >> > So bytes for

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
On Mon, Jan 13, 2014 at 3:11 PM, Yury Selivanov wrote: > On January 13, 2014 at 3:08:43 PM, Daniel Holth (dho...@gmail.com) wrote: >> >> I see it now. b"foo%sbar" % b'baz' should also expand to b"foob'foo'bar" >> >> Instead of

Re: [Python-Dev] PEP 460 reboot

2014-01-13 Thread Daniel Holth
On Mon, Jan 13, 2014 at 4:59 PM, Guido van Rossum wrote: > On Mon, Jan 13, 2014 at 1:29 PM, Glenn Linderman > wrote: >> On 1/13/2014 12:09 PM, Guido van Rossum wrote: >> >> Yeah, the %s behavior with a string argument was a messy attempt at >> compromise. I was hoping to mimick a common use of %

Re: [Python-Dev] PEP 460 reboot

2014-01-14 Thread Daniel Holth
On Tue, Jan 14, 2014 at 1:52 PM, Guido van Rossum wrote: > On Tue, Jan 14, 2014 at 9:45 AM, Chris Barker wrote: >> On Tue, Jan 14, 2014 at 9:29 AM, Yury Selivanov >> wrote: >>> >>> - Try str(), and do ".encode(‘ascii’, ‘stcict’)” on the result. >> >> >> please no -- that's the source of a lot o

Re: [Python-Dev] Making proxy types easier to write and maintain

2014-03-20 Thread Daniel Holth
pypy's transparent proxy feature: http://pypy.readthedocs.org/en/latest/objspace-proxies.html#transparent-proxies On Thu, Mar 20, 2014 at 1:56 PM, Larry Hastings wrote: > On 03/20/2014 12:49 AM, Nick Coghlan wrote: > > So long as Graham's willing to go along with it, he doesn't have to to > be

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-25 Thread Daniel Holth
I love it. On Tue, Mar 25, 2014 at 6:37 PM, Ethan Furman wrote: > Okay, I included that last round of comments (from late February). > > Barring typos, this should be the final version. > > Final comments? > > - > PEP: 46

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-27 Thread Daniel Holth
I feel not including %s is nuts. Should I write .replace('%b', '%s')? All I desperately need are APIs that provide enough unicode / str type safety that I get an exception when mixing them accidentally... in my own code, dynamic typing is usually a bug. As has been endlessly discussed, %s for bytes

Re: [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

2014-03-27 Thread Daniel Holth
On Thu, Mar 27, 2014 at 2:53 PM, Guido van Rossum wrote: > So what's the use case for Python 2/3 compatible code? IMO the main use case > for the PEP is simply to be able to construct bytes from a combination of a > template and some input that may include further bytes and numbers. E.g. in > asyn

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Daniel Holth
On Tue, Apr 8, 2014 at 12:08 AM, Nick Coghlan wrote: > > On 7 Apr 2014 21:58, "MRAB" wrote: >> >> On 2014-04-08 02:45, Guido van Rossum wrote: >>> >>> So what? Aren't we allowed to have fun? :-) >>> >> Next thing you know, he'll be threatening people with The Comfy Chair! > > You may want to take

Re: [Python-Dev] this is what happens if you freeze all the modules required for startup

2014-04-15 Thread Daniel Holth
IIRC it is no longer the case that ZIP imports (involving only one file for a lot of modules) are much faster than regular FS imports? On Tue, Apr 15, 2014 at 10:34 AM, Eric Snow wrote: > On Tue, Apr 15, 2014 at 1:45 AM, Chris Angelico wrote: >> Specific use-case that I can see: Mercurial. In a

Re: [Python-Dev] Mercurial sluggishness (was: this is what happens if you freeze all the modules required for startup)

2014-04-15 Thread Daniel Holth
I find Python's startup time to be very sluggish. I wish it was less than 50 milliseconds (0.05 seconds) including running hg, which is the common threshold for "instant". On my machine 'python -c ""' takes about 0.05 seconds but 'python3 -c ""' takes 0.125 seconds. I will be very happy to see any

Re: [Python-Dev] Mercurial sluggishness (was: this is what happens if you freeze all the modules required for startup)

2014-04-15 Thread Daniel Holth
and encourage all optimizers to optimize. On Tue, Apr 15, 2014 at 12:47 PM, Antoine Pitrou wrote: > Le 15/04/2014 17:42, Daniel Holth a écrit : > >> I find Python's startup time to be very sluggish. I wish it was less >> than 50 milliseconds (0.05 seconds) including runni

Re: [Python-Dev] Mercurial sluggishness (was: this is what happens if you freeze all the modules required for startup)

2014-04-15 Thread Daniel Holth
On Tue, Apr 15, 2014 at 1:29 PM, Antoine Pitrou wrote: > Le 15/04/2014 19:09, Daniel Holth a écrit : > >> In case you were wondering, I'm using Ubuntu's "2.7.5+" and "3.3.2+". >> >> My feeling has long been that the speed of getting at th

Re: [Python-Dev] Software integrators vs end users (was Re: Language Summit notes)

2014-04-18 Thread Daniel Holth
On Fri, Apr 18, 2014 at 12:55 PM, Paul Moore wrote: > On 18 April 2014 16:58, Nick Coghlan wrote: >> As part of thrashing out the respective distribution ecosystem roles >> of pip and conda (still a work in progress), we're at least converging >> on the notion that there are actually now *two* ma

Re: [Python-Dev] pep8 reasoning

2014-04-24 Thread Daniel Holth
Fortunately, Unicode provides us with the COMBINING LOW LINE character, combining the horizontal space-savings of camelCase with the underscore-indicates-separation properties of _. And it's a valid Python identifier. convertx̲mlt̲oj̲son On Thu, Apr 24, 2014 at 12:25 PM, Chris Angelico wrote:

[Python-Dev] Some notes about MicroPython from an observer

2014-06-04 Thread Daniel Holth
- micropython is designed to run on a machine with 192 kilobytes of RAM and perhaps a megabyte of FLASH. The controller can execute read-only code directly from FLASH. There is no dynamic linker in this environment. (It also has a UNIX port). - However it does include a full Python parser and REPL,

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
Can of worms, opened. On Jun 4, 2014 7:20 AM, "Chris Angelico" wrote: > On Wed, Jun 4, 2014 at 9:12 PM, Paul Sokolovsky wrote: > > An alternative view is that the discussion on the tracker showed Python > > developers' mind-fixation on implementing something the way CPython does > > it. And I di

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
If we're voting I think representing Unicode internally in micropython as utf-8 with O(N) indexing is a great idea, partly because I'm not sure indexing into strings is a good idea - lots of Unicode code points don't make sense by themselves; see also grapheme clusters. It would probably work great

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
MicroPython is going to be significantly incompatible with Python anyway. But you should be able to run your mp code on regular Python. On Wed, Jun 4, 2014 at 9:39 AM, Serhiy Storchaka wrote: > 04.06.14 04:17, Steven D'Aprano написав(ла): > >> Would either of these trade-offs be acceptable while

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-04 Thread Daniel Holth
On Wed, Jun 4, 2014 at 10:12 AM, Steven D'Aprano wrote: > On Wed, Jun 04, 2014 at 01:14:04PM +, Steve Dower wrote: >> I'm agree with Daniel. Directly indexing into text suggests an >> attempted optimization that is likely to be incorrect for a set of >>

Re: [Python-Dev] Internal representation of strings and Micropython

2014-06-05 Thread Daniel Holth
On Thu, Jun 5, 2014 at 11:59 AM, Paul Moore wrote: > On 5 June 2014 14:15, Nick Coghlan wrote: >> As I've said before in other contexts, find me Windows, Mac OS X and >> JVM developers, or educators and scientists that are as concerned by >> the text model changes as folks that are primarily focu

Re: [Python-Dev] Feature request: Change a Dependency Package Version During Package Initiation

2019-05-17 Thread Daniel Holth
This sounds exactly like what people used to do with eggs. You could have multiple versions of a package on the path as eggs and then require a version at runtime. The approach has problems. Ruby also abandoned a strategy where random app code depends on package management code at runtime. One bet

Re: [Python-Dev] PEP 594: update 1

2019-05-25 Thread Daniel Moisset
modules and degrade if those are not available? The sndhdr case is just an example but I can imagine there are others (optparse is no longer schedule for removal in your PEP, but would have been another case, being used by the profile module). Best, Daniel On Tue, 21 May 2019 at 15:15, Christian

[Python-Dev] python3 -bb and hash collisions

2019-06-18 Thread Daniel Holth
set([u"foo", b"foo]) will error because the two kinds of string have the same hash, and this causes a comparison. Is that correct? ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mai

[Python-Dev] Re: python3 -bb and hash collisions

2019-06-21 Thread Daniel Holth
, 2019, 13:05 Christian Heimes wrote: > On 18/06/2019 18.32, Daniel Holth wrote: > > set([u"foo", b"foo]) will error because the two kinds of string have the > > same hash, and this causes a comparison. Is that correct? > > Yes, it will fail with -bb, because it turn

[Python-Dev] Re: python3 -bb and hash collisions

2019-06-21 Thread Daniel Holth
The answer bytes == str is just False. That doesn't put b'' in your database by accident. It could be useful to separate the two kinds of warnings. On Fri, Jun 21, 2019, 18:57 Ivan Pozdeev via Python-Dev < python-dev@python.org> wrote: > On 22.06.2019 1:08, Daniel Ho

[Python-Dev] Re: The semantics of pattern matching for Python

2020-11-18 Thread Daniel Moisset
lp me with these errors, and I'd expect them to do the same with the "erroneous" match statement. If there are other examples you had in mind when you wrote this I'd also be happy to discuss those. I'll try to get some time to review your specific counterproposal later,

[Python-Dev] Re: Questions about about the DLS 2020

2020-11-19 Thread Daniel Moisset
A notorious example here of the "not many" is this proposal (i.e. not part of the language yet) for C++: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1371r0.pdf . I think it's an interesting example given that this is a very mature language, not originally designed with pattern matching

[Python-Dev] Re: The semantics of pattern matching for Python

2020-11-20 Thread Daniel Moisset
oposal of this kind :) I don't think the first implementation of this should be required to optimize/implement things in a certain way, but if the spec is turned into implementation dependent and then fixed, it shouldn't break anything (it's like the change in dictionary

[Python-Dev] Re: The semantics of pattern matching for Python

2020-11-22 Thread Daniel Moisset
Others have replied with most of this covering my opinion but there's a point I'd like to highlight here On Fri, 20 Nov 2020 at 14:23, Mark Shannon wrote: > Hi Daniel, > > On 20/11/2020 10:50 am, Daniel Moisset wrote: > > (... snipping for brevity ...) > > &

[Python-Dev] Re: Words rather than sigils in Structural Pattern Matching

2020-11-22 Thread Daniel Moisset
On Sun, 22 Nov 2020 at 00:31, Greg Ewing wrote: > On 22/11/20 6:47 am, David Mertz wrote: > > I'm convinced by Guido, > > Brandt, and others that the binding use will be far more common, so > > adding extra characters for the 90% case does not feel desirable > > Minimising the number of characte

[Python-Dev] Re: Pattern Matching Scope

2020-12-04 Thread Daniel Moisset
This is an answer to "what PEP 634 proposes": On Fri, 4 Dec 2020 at 19:18, Jim J. Jewett wrote: > (...) > I'm getting a bit confused over when people mean "the PEP currently says" > vs "the implementation probably should" vs "the PEP should additionally > require" vs "the PEP should instead say"

[Python-Dev] Re: Concerns about PEP 634

2021-02-06 Thread Daniel Moisset
Hi Mark, I think some of these issues have already been raised and replied (even if no agreement has been reached). but this is a good summary, so let me reply with a summary of responses for this. On Sat, 6 Feb 2021 at 15:51, Mark Shannon wrote: > Hi, > > Since a decision on PEP 634 is imminen

[Python-Dev] Re: PEP 653: Precise Semantics for Pattern Matching

2021-02-23 Thread Daniel Moisset
In addition to the changes proposed here that go beyond PEP-634 (which other people discuss), I find that many of the definitions fail to capture some of the basic features of PEP-634, especially when nesting patterns. Take for example: "case [int(), str()]". According to https://www.python.org/de

[Python-Dev] Re: aiter/anext review request

2021-03-20 Thread Daniel Pope
As someone who was involved in implementing these, I think they should not be in builtins if that means they have to be in C. My argument is from a point of maintainability. Writing them was plenty of effort in the first place; Josh had written them in idiomatic async Python in the first place, my

[Python-Dev] Re: PEP-376 and PEP-427 interpretation

2021-03-31 Thread Daniel Holth
I meant to exclude md5 and sha1, e.g. hash functions with known problems. SHA224 would be a weird choice but it wouldn't personally offend me otherwise. It would be fun to see how many wheel handlers support non-sha256 hash functions. On Mon, Mar 29, 2021 at 9:56 PM Theallredman via Python-Dev < p

[Python-Dev] cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
I was recently using the cmd module for a project where my CLI could connect to and interact with another host. I implemented prompt in such a way that it would show the IP address when connected. I.e., class MyCmd(cmd.Cmd): ... @property def prompt(self) -> str: if self.rem

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
Sorry, that implementation should have been class Cmd: PROMPT = '> ' @property def prompt(self) -> str: return self.PROMPT ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to pytho

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
I wasn't looking at the type stub but cmd.py itself. It has PROMPT = '(Cmd) ' ... class Cmd: prompt = PROMPT ... On Sat, Jun 26, 2021 at 6:04 PM Guido van Rossum wrote: > On Sat, Jun 26, 2021 at 9:25 AM Daniel Walker wrote: > >> I was recently using t

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
Found the mypy bug: https://github.com/python/mypy/issues/4125 On Sat, Jun 26, 2021 at 7:35 PM Daniel Walker wrote: > I wasn't looking at the type stub but cmd.py itself. It has > > PROMPT = '(Cmd) ' > ... > > class Cmd: > prompt = PROMPT >

[Python-Dev] Re: cmd.Cmd.prompt should be an instance attribute

2021-06-26 Thread Daniel Walker
Thank you On Sat, Jun 26, 2021 at 8:10 PM Guido van Rossum wrote: > Okay, then Chris Barker’s explanation applies. > > On Sat, Jun 26, 2021 at 16:35 Daniel Walker wrote: > >> I wasn't looking at the type stub but cmd.py itself. It has >> >> PROMP

[Python-Dev] Re: Python multithreading without the GIL

2021-10-08 Thread Daniel Pope
On Fri, 8 Oct 2021 at 03:50, Sam Gross wrote: > My goal with the proof-of-concept is to demonstrate that removing the GIL is > feasible and worthwhile, and that the technical ideas of the project could > serve as a basis of such an effort. I'm a novice C programmer, but I'm unsure about the saf

Re: [Python-Dev] BDFL delegation for PEP 426 (PyPI metadata 1.3)

2013-02-15 Thread Daniel Holth
On Fri, Feb 15, 2013 at 12:27 PM, Erik Bray wrote: > On Sun, Feb 3, 2013 at 5:24 PM, Vinay Sajip > wrote: > > Éric Araujo netwok.org> writes: > > > >> Looks like we agree that a basic tool able to bootstrap the packaging > >> story is needed :) > > > > Agreed. Just because distutils can't easil

[Python-Dev] Submitting PEP 425 (compatibility tags)

2013-02-15 Thread Daniel Holth
Version: $Revision$ Last-Modified: 07-Aug-2012 Author: Daniel Holth BDFL-Delegate: Nick Coghlan Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 27-Jul-2012 Python-Version: 3.4 Post-History: 8-Aug-2012, 18-Oct-2012, 15-Feb-2013 Abstract This PEP specifies a tagging

Re: [Python-Dev] PEP 426 is now the draft spec for distribution metadata 2.0

2013-02-17 Thread Daniel Holth
On Sun, 17 Feb 2013 20:11:23 +1000 Nick Coghlan wrote: > > Major changes since the last draft: > > 1. Metadata-Version is 2.0 rather than 1.3, and the field now has the > same major.minor semantics as are defined for wheel versions in PEP > 427 (i.e. if a tool sees a major version number it doesn'

Re: [Python-Dev] Fwd: PEP 426 is now the draft spec fordistribution metadata 2.0

2013-02-19 Thread Daniel Holth
On Feb 19, 2013 6:57 AM, wrote: > > I've never seen environment markers being used or supported > > in the wild. > > > > I'm not against modernizing the format, but given that version 1.2 > > has been out for around 8 years now, without much following, > > I think we need to make the implementati

Re: [Python-Dev] Fwd: PEP 426 is now the draft spec fordistribution metadata 2.0

2013-02-19 Thread Daniel Holth
On Tue, Feb 19, 2013 at 11:26 AM, Paul Moore wrote: > On 19 February 2013 13:59, Nick Coghlan wrote: > > It's OK if people don't want to read the detailed rationale provided > > for each of the major changes as part of the PEP, or if they want to > > dispute a particular piece of that rationale.

Re: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0

2013-02-19 Thread Daniel Holth
On Tue, Feb 19, 2013 at 3:25 PM, Paul Moore wrote: > On 19 February 2013 13:40, Nick Coghlan wrote: > >> If a tools wants to support metadata 2.0, it has to support all > >> the complicated stuff as well, i.e. handle the requires fields, > >> the environment markers and version comparisons/sorti

Re: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0

2013-02-19 Thread Daniel Holth
On Tue, Feb 19, 2013 at 4:34 PM, M.-A. Lemburg wrote: > On 19.02.2013 14:40, Nick Coghlan wrote: > > On Tue, Feb 19, 2013 at 11:23 PM, M.-A. Lemburg wrote: > >> * PEP 426 doesn't include any mention of the egg distribution format, > >> even though it's the most popular distribution format at t

Re: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0

2013-02-19 Thread Daniel Holth
On Tue, Feb 19, 2013 at 5:10 PM, M.-A. Lemburg wrote: > On 19.02.2013 23:01, Daniel Holth wrote: > > On Tue, Feb 19, 2013 at 4:34 PM, M.-A. Lemburg wrote: > > > >> On 19.02.2013 14:40, Nick Coghlan wrote: > >>> On Tue, Feb 19, 2013 at 11:23 PM, M.-A. Lembur

Re: [Python-Dev] cffi in stdlib

2013-02-26 Thread Daniel Holth
+1 On Tue, Feb 26, 2013 at 12:14 PM, Maciej Fijalkowski wrote: > On Tue, Feb 26, 2013 at 7:07 PM, Eli Bendersky wrote: > > > > > > > > On Tue, Feb 26, 2013 at 8:39 AM, Maciej Fijalkowski > > wrote: > >> > >> On Tue, Feb 26, 2013 at 6:34 PM, Eli Bendersky > wrote: > >> > > >> > On Tue, Feb 26,

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Daniel Holth
On Wed, Feb 27, 2013 at 4:18 AM, Ronald Oussoren wrote: > > On 27 Feb, 2013, at 10:06, Maciej Fijalkowski wrote: > >> On Wed, Feb 27, 2013 at 9:29 AM, Ronald Oussoren >> wrote: >>> >>> On 26 Feb, 2013, at 16:13, Maciej Fijalkowski wrote: >>> Hello. I would like to discuss on the

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-03-04 Thread Daniel Holth
On Mon, Mar 4, 2013 at 2:26 PM, Berker Peksağ wrote: > On Mon, Mar 4, 2013 at 9:14 PM, Barry Warsaw wrote: >> On Mar 04, 2013, at 07:41 PM, Antoine Pitrou wrote: >> $ python -m unittest discover $ python setup.py test $ python setup.py nosetests $ python -m nose test $ no

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-03-04 Thread Daniel Holth
On Mon, Mar 4, 2013 at 3:14 PM, Barry Warsaw wrote: > On Mar 04, 2013, at 03:02 PM, Daniel Holth wrote: > >>setup.py's setup(test_suite="x")... not sure if this is a distutils or >>setuptools feature. PEP 426 has an extension mechanism that could do >>the

Re: [Python-Dev] running tests; mebs

2013-03-04 Thread Daniel Holth
>> As a community, we know how important tests are, so I think our tools should >> reflect that and make it easy for those tests to be expressed. As a selfish >> side-effect, I want to reduce the amount of guesswork I need to perform in >> order to know how to run a package's test when I `$vcs clo

Re: [Python-Dev] built-in Python test runner (was: Python Language Summit at PyCon: Agenda)

2013-03-05 Thread Daniel Holth
est_suite: nose.collector; document the extension; write some tool to actually parse the metadata and invoke the tests; it may become a core feature in the next version, or having a monolithic specification may become less important. Thanks, Daniel Holth

[Python-Dev] PyCon Sprints - Thank you

2013-03-20 Thread Daniel Wozniak
r all your help and patience. You have been very welcoming. I am sure Python will continue to grow and attract new contributors so long as there are mentors such as yourselves there to support n00bs like me. Thanks again, Daniel Wozniak ___ Python-D

Re: [Python-Dev] IDLE in the stdlib

2013-03-20 Thread Daniel Holth
On Wed, Mar 20, 2013 at 3:54 PM, Barry Warsaw wrote: > On Mar 20, 2013, at 12:40 PM, Guido van Rossum wrote: > >>I didn't hear any at the sprint here. > > JFDI! :) > > -Barry +1 why are we still talking show me the patches ___ Python-Dev mailing list Py

Re: [Python-Dev] IDLE in the stdlib

2013-03-21 Thread Daniel Holth
I showed IDLE to my 6-year-old on the Raspberry Pi and I'm convinced it is cool. Gave up on trying to (slowly) install bpython. We were multiplying large numbers and counting to 325,000 in no time. It might not be for *me* but I'm not going to teach my daughter a large IDE any time soon. __

Re: [Python-Dev] Safely importing zip files with C extensions

2013-03-27 Thread Daniel Holth
Jim Fulton is right that weird failures are a characteristic of zipped eggs, so one of the #1 requests for setuptools is how to prohibit zipping from ever happening. This is an important reason why wheel is billed as an installation format -- fewer users with pitchforks. It's very cool that it work

Re: [Python-Dev] noob contributions to unit tests

2013-03-28 Thread Daniel Wozniak
increase line coverage for request.py, assuming your not on OSX of coarse. I have not looked at response.py or robotparser.py yet. Just wanted to give you a little brain dump in case it can save you some time. ~Daniel ___ Python-Dev mailing list Python

Re: [Python-Dev] Accepting PEP 434, Idle Enhancement Exception

2013-03-30 Thread Daniel Holth
Yes, it would probably make more sense to split the editor and shell processes as many Python IDEs do, with IDLE running in CPython and the user's computation running in the chosen interpreter. On Sat, Mar 30, 2013 at 8:35 AM, Maciej Fijalkowski wrote: > On Sat, Mar 30, 2013 at 5:26 AM, Antoine P

Re: [Python-Dev] What code in Python creates .exe launchers for 'entry_points' in 'setup.py'?

2013-04-01 Thread Daniel Holth
The new "distlib" also provides that feature On Apr 1, 2013 4:58 PM, "Éric Araujo" wrote: > Hello, > > Le 01/04/2013 16:51, Grigory Petrov a écrit : > > But what python code is responsible for creation of this bootstrapper > > executables? I have searched python 2.7.3 source code for some time, b

[Python-Dev] PEP 4XX: pyzaa "Improving Python ZIP Application Support"

2013-04-01 Thread Daniel Holth
https://docs.google.com/document/d/1MKXgPzhWD5wIUpoSQX7dxmqgTZVO6l9iZZis8dnri78/edit?usp=sharing PEP: 4XX Title: Improving Python ZIP Application Support Author: Daniel Holth Status: Draft Type: Standards Track Python-Version: 3.4 Created: 30 March 2013 Post-History: 30 March 2013, 1

  1   2   3   4   5   6   >