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

2013-04-07 Thread Daniel Holth
y from within a virtualenv when you write > "/usr/bin/python", so using "/usr/bin/env" instead is actually required. > > Stefan Pushed as Draft PEP 441, tooling prototyped (with less than awesome CLI) at https://bitbucket.org/dholth/pyzaa or https://crate.io/packages/pyza

[Python-Dev] I cannot create bug reports

2013-04-24 Thread Daniel Wong
night, and tried to submit this morning. When I did that, I got permission denied errors. It seems that something weird has happened to my account, or bug tracker itself changed in my sleep. Anyone have any idea what's going on here? Daniel ___

Re: [Python-Dev] I cannot create bug reports

2013-04-24 Thread Daniel Wong
: > The first thing that comes to mind is that your session expired and > you need to log-in again. After logging in myself I see the form in > all of it's glory. > > On Wed, Apr 24, 2013 at 2:35 PM, Daniel Wong > wrote: > > Glorious members of python-dev, > > &g

Re: [Python-Dev] Why can't I encode/decode base64 without importing a module?

2013-04-25 Thread Daniel Holth
On Thu, Apr 25, 2013 at 10:07 AM, Barry Warsaw wrote: > On Apr 25, 2013, at 03:34 PM, Lennart Regebro wrote: > >>In the case of JSON objects, they are intended for data exchange, and >>hence in the end need to be byte strings. > > Except that they're not. > > http://bugs.python.org/issue10976 > >

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

2013-05-06 Thread Daniel Holth
As the PEP author I declare we can have 3-letter extensions. It is not a big deal. Daniel Holth On Mon, May 6, 2013 at 4:30 PM, Richard Oudkerk wrote: > So the bug would just cause .pyzw files to be opened with py instead of pyw? > Won't this be harmless? > > I think the worst

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

2013-05-10 Thread Daniel Holth
fault is less mature, but there's not a whole lot to do in a simple tool that may serve more as an example: you can open any file with ZipFile in append mode, even one that is not a zip file and just contains the #!python shebang line. Thanks, Daniel _

Re: [Python-Dev] Bilingual scripts

2013-05-28 Thread Daniel Holth
On Tue, May 28, 2013 at 1:30 PM, Barry Warsaw wrote: > On May 25, 2013, at 03:12 AM, Chris McDonough wrote: > >>You probably already know this, but I'll mention it anyway. This >>probably matters a lot for nose and pyflakes, but I'd say that for tox >>it should not, it basically just scripts exec

Re: [Python-Dev] Bilingual scripts

2013-05-28 Thread Daniel Holth
On Tue, May 28, 2013 at 2:04 PM, Barry Warsaw wrote: > On May 28, 2013, at 01:57 PM, Daniel Holth wrote: > >>Wheel has no mechanism for renaming scripts (or any file) based on the >>Python version used to install. Instead you would have to build >>python-version-specific p

Re: [Python-Dev] stat module in C -- what to do with stat.py?

2013-06-20 Thread Daniel Holth
cffi makes this kind of constant-grabbing very easy. However this is a tiny module so no problem with having a C version. On Thu, Jun 20, 2013 at 11:04 AM, Thomas Wouters wrote: > > > > On Thu, Jun 20, 2013 at 8:01 AM, Brett Cannon wrote: >> >> >> >> >> On Thu, Jun 20, 2013 at 10:14 AM, Eric V.

Re: [Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

2013-07-17 Thread Daniel Holth
https://pypi.python.org/pypi/apipkg provides a much more effective way to denote API than an _ On Wed, Jul 17, 2013 at 12:20 PM, R. David Murray wrote: > On Tue, 16 Jul 2013 17:46:34 -0400, Terry Reedy wrote: >> On 7/16/2013 9:39 AM, R. David Murray wrote: >> > On Tue, 16 Jul 2013 23:19:21 +1000

Re: [Python-Dev] PEP 453 (pip bootstrapping) ready for pronouncement?

2013-09-27 Thread Daniel Holth
On Fri, Sep 27, 2013 at 12:15 PM, R. David Murray wrote: > On Fri, 27 Sep 2013 15:26:41 +0100, Paul Moore wrote: >> On 27 September 2013 15:08, Stephen J. Turnbull wrote: >> >> New users on Windows and Mac OS X. I've heard many more complaints >> > > from folks running tutorials about the pip b

Re: [Python-Dev] On the dangers of giving developers the best resources

2013-10-08 Thread Daniel Holth
Sounds like you are suggesting we get a raspberry pi. All sorts of dumb waste shows up when you run code on those. El oct 8, 2013 4:46 p.m., "Guido van Rossum" escribió: > Let's agree to disagree then. I see your methodology used all around me > with often problematic results. Maybe devs should h

Re: [Python-Dev] non-US zip archives support in zipfile.py

2013-10-15 Thread Daniel Holth
FYI zipfile does do UTF-8 (http://hg.python.org/cpython/file/d7ebe03fa752/Lib/zipfile.py#l368). Only the non-Unicode encodings might need some help. I like that the patch is only concerned with decoding. Is it necessary to support writing non-UTF8 encodings? On Tue, Oct 15, 2013 at 10:20 AM, Victo

Re: [Python-Dev] non-US zip archives support in zipfile.py

2013-10-15 Thread Daniel Holth
On Tue, Oct 15, 2013 at 8:02 AM, Steven D'Aprano wrote: > On Tue, Oct 15, 2013 at 10:20:03AM +0200, Victor Stinner wrote: >> Both issues are related and should be fixed in the *same* commit. >> Python should provide an option to encode explicitly filenames to >> UTF-8. Or maybe better: encode to U

Re: [Python-Dev] Why does base64 return bytes?

2016-06-14 Thread Daniel Holth
IMO this is more a philosophical problem than a programming problem. base64 has a dual-nature. It is both text and bytes. At least it should fit in a 1-byte-per-character efficient Python 3 unicode string also. ___ Python-Dev mailing list Python-Dev@pytho

Re: [Python-Dev] Why does base64 return bytes?

2016-06-15 Thread Daniel Holth
In that case could we just add a base64_text() method somewhere? Who would like to measure whether it would be a win? On Wed, Jun 15, 2016 at 8:34 AM Steven D'Aprano wrote: > On Tue, Jun 14, 2016 at 09:40:51PM -0700, Guido van Rossum wrote: > > I'm officially on vacation, but I was surprised tha

Re: [Python-Dev] Why does base64 return bytes?

2016-06-15 Thread Daniel Holth
It would be a codec. base64_text in the codecs module. Probably 1 line different than the existing codec. Very easy to use and maintain. Less surprising and less error prone for everyone who thinks base64 should convert between bytes to text. Sounds like an obvious win to me. On Wed, Jun 15, 2016

Re: [Python-Dev] Making stdlib modules optional for distributions (Was: Breaking up the stdlib (Was: release cadence))

2016-07-07 Thread Daniel Holth
Yes, not too long ago I installed "every" Python package on Ubuntu, and Python basically would not start. Perhaps some plugin system was trying to import everything and caused a segfault in GTK. The "short sys.path" model of everything installed is importable has its limits. On Thu, Jul 7, 2016 at

[Python-Dev] Should PY_SSIZE_T_CLEAN break Py_LIMITED_API?

2016-07-12 Thread Daniel Holth
I was using Py_LIMITED_API under 3.5 and PY_SSIZE_T_CLEAN was set, this causes some functions not in the limited api to be used and the resulting extension segfaults in Linux. Is that right? Thanks, Daniel ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] PyPI index deprecation

2016-07-13 Thread Daniel Holth
You may know that there are approximately 3 pypi maintainers, all overworked and one paid. It is amazing that it works at all. I don't know anything about that particular decision though. On Wed, Jul 13, 2016 at 1:21 PM Dmitry Trofimov < dmitry.trofi...@jetbrains.com> wrote: > Hi, > > as you prob

Re: [Python-Dev] File system path encoding on Windows

2016-08-19 Thread Daniel Holth
#1 sounds like a great idea. I suppose surrogatepass solves approximately the same problem of Rust's WTF-8, which is a way to round-trip bad UCS-2? https://simonsapin.github.io/wtf-8/ #2 sounds like it would leave several problems, since mbcs is not the same as a normal text encoding, IIUC it depe

Re: [Python-Dev] File system path encoding on Windows

2016-08-29 Thread Daniel Holth
A nice recent blog post about paths encoding in a media player. http://beets.io/blog/paths.html . It's not merely the porting that makes it hard. On Mon, Aug 29, 2016, 19:32 Victor Stinner wrote: > 2016-08-24 17:44 GMT+02:00 Steve Dower : > > I know Nick and Victor like the idea of a -X flag (or

Re: [Python-Dev] Imports with underscores

2017-01-09 Thread Daniel Holth
Easily solved with the totally evil ninja mode pattern of module initialization. It has yet to catch on. def ninja(): global exported import os def exported(): # do something ninja() del ninja On Mon, Jan 9, 2017 at 1:13 PM Sven R. Kunze wrote: > Interesting to see that othe

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-11 Thread Daniel Pope
Serhiy Storchaka wrote: > From my C++ and Java experience, hashtable-based containers are much > more useful than tree-based containers. They are more compact and fast. > In most cases the only reason of using sorted container is supporting > deterministic iteration order, but often it is enough to

[Python-Dev] Re: Preventing Unicode-related gotchas (Was: pre-PEP: Unicode Security Considerations for Python)

2021-11-14 Thread Daniel Pope
On Sun, 14 Nov 2021, 19:07 Christopher Barker, wrote: > On Sun, Nov 14, 2021 at 10:27 AM MRAB wrote: > >> Unfortunately, it goes too far, because it's unlikely that we want "ᵖ" >> ("\N{MODIFIER LETTER SMALL P}') to be equivalent to "P" ("\N{LATIN >> CAPITAL LETTER P}". >> > > Is it possible to o

[Python-Dev] Re: Declarative imports

2022-04-08 Thread Daniel Pope
On Fri, 8 Apr 2022, 09:30 Malthe, wrote: > For example, `some_regex = @re.compile(...)`. > I like the idea of import expressions. I pitched it on Discourse recently: https://discuss.python.org/t/import-expressions/11582 However, I do not see hoisting as something that should be done by Python.

[Python-Dev] Re: Declarative imports

2022-04-08 Thread Daniel Pope
On Fri, 8 Apr 2022 at 11:26, Malthe wrote: > Perhaps `some_regex = re::compile(r"...")` could work. > > That is, :: to delineate the import. As I mentioned in the Discourse thread, this syntax chimes with Rust (and C++, and also PHP, triggering fond memories of Paamayim Nekudotayim). There are t

[Python-Dev] Re: Declarative imports

2022-04-08 Thread Daniel Pope
On Fri, 8 Apr 2022 at 12:23, Steve Dower wrote: > > I've read the rest of the thread so far, and agree strongly that we > can't do this at the language/runtime level. You mean the hoisting, right? I don't see any reason why an import expression without hoisting would be impractical. But I'd like

[Python-Dev] Re: Declarative imports

2022-04-10 Thread Daniel Pope
On Fri, 8 Apr 2022, 17:44 Guido van Rossum, wrote: > The interesting idea here seems to make "lazy imports" easier to implement > by making them explicit in the code. So far, most lazy import frameworks > for Python have done hacks with `__getattribute__` overrides. > The value is more than ease

[Python-Dev] Re: Declarative imports

2022-04-10 Thread Daniel Pope
On Sun, 10 Apr 2022, 15:53 Guido van Rossum, wrote: > On Sun, Apr 10, 2022 at 2:31 AM Daniel Pope wrote: > >> On Fri, 8 Apr 2022, 17:44 Guido van Rossum, wrote: >> >>> The interesting idea here seems to make "lazy imports" easier to >>> impleme

[Python-Dev] Re: Structural pattern matching and mangling private names

2022-06-15 Thread Daniel Moisset
I don't remember this topic ever being discussed, but still I wouldn't expect that __something to be mangled, given that it refers to an attribute of an instance of D. I might expect that in a "case D(something=__y)" you get the mangling for __y, but I'm not sure what the implementation does now a

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

2019-09-10 Thread Daniel Holth
On Sat, Jun 22, 2019 at 2:48 AM Serhiy Storchaka wrote: > 22.06.19 01:08, Daniel Holth пише: > > Thanks. I think I might like an option to disable str(bytes) without > > disabling str != bytes. Unless the second operation would also corrupt > > output. > > > > Ca

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

2019-09-11 Thread Daniel Holth
On Tue, Sep 10, 2019 at 8:38 PM Matt Billenstein wrote: > On Tue, Sep 10, 2019 at 10:42:52AM -0400, Daniel Holth wrote: > > I stopped using Python 3 after learning about str(bytes) by finding it > in my > > corrupted database. Ever since then I've been anxious abou

[Python-Dev] Re: Why doesn't venv also install python3*-config?

2020-01-13 Thread Daniel Haude
Am 12.01.2020 23:39 schrieb Ivan Pozdeev via Python-Dev: Virtualenv does create `python-config` shim in Linux. Python3 doesn't. Definetely. Not on RHEL7 and Debian, that's where I tested it. ___ Python-Dev mailing list -- python-dev@python.org To u

[Python-Dev] Question: how to extend standard Python library to add new functionalities?

2020-01-28 Thread daniel . wangksu
Hi all, I want to add openssl engine in Python SSL library. I know that if the new functions can be added in Python we can inherit existing class (such as ssl). However, It seems the SSL module extends _SSL module which is written in C. I'm not sure how can I extend SSL module in this situation

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

2020-04-13 Thread Daniel Holth
Was it regular cffi or cffi's embedding API, which is used a bit differently than regular cffi, that "seems to only solve a fraction of the problem"? Was just playing around with the embedding API and was impressed. In Python: @ffi.def_extern() def uwsgi_pyexample_init(): print("init called") re

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

2020-04-13 Thread Daniel Holth
It can be done exactly as passing a void* when registering a C callback, and getting it passed back to your callback function. https://cffi.readthedocs.io/en/latest/ref.html#ffi-new-handle-ffi-from-handle https://bitbucket.org/dholth/kivyjoy/src/aaeab79b2891782209a1219cd65a4d9716cea669/kivyjoy/con

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

2020-04-13 Thread Daniel Holth
Sorry that this is a bit off-topic. cffi would be a user of any new C API. I've tried to make sure ABI3 is supported in setuptools and wheel, with varying success. Apparently virtualenvs and Windows have problems. I'm excited about the possibility of a better C API and possibly ABI. __

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

2020-06-24 Thread Daniel Moisset
Wow, this looks fantastic, I've wanted this for a long time! I really appreciate the work that has been put here. As a bit of context for this and future emails, I fury wanted to say: * I'm strongly positive about this even if I propose changes * I've explored a bit on my own how to do this, so I'

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

2020-06-26 Thread Daniel Moisset
[apologies for the duplicate to Guido, used reply instead of reply to all] To summarize my previous unanswered post, I posted a +1 to the "defaulting to binding vs interpreting NAME as a constant" is a dangerous default. And I submitted a couple of alternate syntactic ways to denote "capture is de

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

2020-06-26 Thread Daniel Moisset
Just a minor editorial thing on the PEP text: The section https://www.python.org/dev/peps/pep-0622/#case-clauses presents a simplified syntax. That one mentions "group_pattern", but the document never mentions (in prose) what a group pattern is. It confused me until I found the definition in the f

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

2020-06-26 Thread Daniel Moisset
This one is new but I think unrelated and unmentioned: Why is the mapping match semantics non-strict about keys? Besides the "asymmetry" with sequence matches, I think a strict match should be useful sometimes (quickly deconstructing JSON data comes to my mind, where I want to know that I didn't g

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

2020-06-28 Thread Daniel Moisset
I've been going over the PEP this weekend, trying to get a deeper understanding of what are its main ideas and consequences, and wrote some notes. I'm not posting the notes directly to this list because it's a bit of a long read, but I also tried to make it helpful as an analysis for people involve

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

2020-06-30 Thread Daniel Moisset
Hi, thank you for the comments On Tue, 30 Jun 2020 at 07:18, Greg Ewing wrote: > On 29/06/20 8:47 am, Daniel Moisset wrote: > > < > https://github.com/dmoisset/notebook/blob/811bf66/python/pep622/understanding-pep-622.md> > . > > > You seem to be trying to shoeh

[Python-Dev] Re: Flexible assignment targets

2020-07-01 Thread Daniel Moisset
On Wed, 1 Jul 2020 at 15:50, Guido van Rossum wrote: > Before we all get a little too excited here, I think that allowing > ``` > 1 = x > ``` > as a sneaky way of writing > ``` > assert x == 1 > ``` > would be a terrible mistake. > Well, we'll always have the sneaky way to check if an iterable i

[Python-Dev] Re: Flexible assignment targets

2020-07-01 Thread Daniel Moisset
If I was to do this in Python, rather than the Rust way of forbidding refutable patterns, I would put as a rule that the target must have at least one variable to bind* . It makes sense in the context that the goals of an assignment are the bindings it does, and the ValueError is an accident that t

[Python-Dev] Re: PEP 622 railroaded through?

2020-07-07 Thread Daniel Moisset
On Tue, 7 Jul 2020 at 15:07, Rob Cliffe via Python-Dev < python-dev@python.org> wrote: > (...) Nor am I keen on "expressions" being interpreted > differently after 'case' than elsewhere in Python. Python already has "expressions" (intentional quotes) that are interpreted differently depending on

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

2020-07-12 Thread Daniel Moisset
Hey Larry, just to clarify on a single point you make: On Sun, 12 Jul 2020 at 10:48, Larry Hastings wrote: > [ snip ] > To address 2), bind '_' when it's used as a name in a pattern. > > This adds an extra reference and an extra store. That by itself seems > harmless. > This is not always just

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

2020-08-06 Thread Daniel Moisset
Javascript hasn't it yet, but there is an active proposal for it in the standardization committee: https://github.com/tc39/proposal-pattern-matching On Wed, 5 Aug 2020 at 21:34, Luciano Ramalho wrote: > On Tue, Aug 4, 2020 at 1:37 PM Tobias Kohn wrote: > > And experience from other programming

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

2020-08-06 Thread Daniel Moisset
t one element" rather than "more than one". Again, it may be subjective taste but I find our version more readable in that respect and less likely to be misinterpreted (making the bug easier to spot there) Best, Daniel On Thu, 6 Aug 2020, 12:32 Mark Shannon, wrote: > Hi, >

[Python-Dev] Re: Hygenic macros PEP.

2020-09-15 Thread Daniel Butler
hts? -- Thank you! Daniel Butler ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/ar

[Python-Dev] Re: Hygenic macros PEP.

2020-09-15 Thread Daniel Butler
I had not read it. Thanks for the clarification On Tue, Sep 15, 2020 at 4:32 PM Gregory P. Smith wrote: > > > On Tue, Sep 15, 2020 at 1:27 PM wrote: > >> September 15, 2020 4:02 PM, "Daniel Butler" > > >> wrote: >> >> > Users would be enc

[Python-Dev] Re: PEP 617 -- New PEG parser for CPython

2020-10-08 Thread Daniel Moisset
In this case, you can use the old parser as an oracle, at least for python 3.8 syntax. The new parser should produce a syntax error if and only if the old one does. And if it doesn't the AST should be the same I guess (I'm not sue if the AST structure changed) On Thu, 8 Oct 2020, 03:12 Terry Reedy

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
= a >= b > Those two expressions are equivalent for integers, but not necessarily equivalent for objects that define their own comparison operator. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
ently. "not a in b" and "a not in b" have exactly the same effects. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
On Tue, Feb 10, 2009 at 2:36 PM, Cesare Di Mauro wrote: > OK, so I can make assumptions only for built-in types. > Yes, but even there you have to be careful of odd corner-cases, such as: >>> nan = float('nan') >>> nan < nan False >>> nan >

Re: [Python-Dev] Choosing a best practice solution for Python/extension modules

2009-02-20 Thread Daniel Stutzbach
ave been rewritten (which happens more often than the > complete rewrite). > A slight change would make it work for modules where only key functions have been rewritten. For example, pickle.py could read: from _pypickle import * try: from _pickle import * except ImportError: pass -- Danie

Re: [Python-Dev] Choosing a best practice solution for Python/extension modules

2009-02-20 Thread Daniel Stutzbach
dule that defined the function. Functions defined in _pypickle would only call the _pypickle version of functions. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-De

Re: [Python-Dev] .pythonrc.py in man page

2009-02-22 Thread Daniel Stutzbach
Python 3.0." If user.py has indeed been removed, then Mitchell is correct. http://docs.python.org/library/user.html -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mai

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-04 Thread Daniel Stutzbach
meaning called "sock". -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: h

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-04 Thread Daniel Stutzbach
or all of you be at PyCon? I'd be willing to put in the extra work to turn your notes into a PEP. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.o

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Daniel Stutzbach
s and writes are not necessary. On Windows, sockets, pipes, and files are each completely distinct types with their own functions and unifying them under one select()-like interface requires faking it using threads behind-the-scenes AFAIK. Personally, I'd be happy with continuing to only suppo

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-06 Thread Daniel Stutzbach
ickling, but wouldn't solve Michael's problem as, without memo, each pickle would still need to store a copy. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing lis

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-08 Thread Daniel Stutzbach
On Sat, Mar 7, 2009 at 8:28 PM, wrote: > Anybody interested in working on this at a PyCon Sprint? I won't be > attending the conference proper, but plan to spend a couple days sprinting, > I'll be there and interested. :) -- Daniel Stutzbach, Ph.D. President, Stutzbach Ent

Re: [Python-Dev] wait time [was: Ext4 data loss]

2009-03-12 Thread Daniel Stutzbach
ilename() # good luck file.__init__(self.tmp_name, flags) def close(self): self.flush() os.fsync(self.fileno()) self.close() os.rename(self.tmp_name, self.path) # won't work on Windows :-( then we could simply: with appropriate_module.open_for_safe_replacem

Re: [Python-Dev] Core projects for Summer of Code

2009-03-18 Thread Daniel Fetchinson
announced as one of the mentoring orgs today, this week before > student applications are open is for students to talk to their prospective > mentors and iron out the wrinkles in their plans, so there's not much time > to get core project ideas together. How about porting PIL to 3.0?

Re: [Python-Dev] Core projects for Summer of Code

2009-03-18 Thread Daniel Fetchinson
th.cx/pil-py3k.git" but it failed: gpolo.ath.cx[0: 189.7.18.241]: errno=Connection timed out fatal: unable to connect a socket (Connection timed out) fetch-pack from 'git://gpolo.ath.cx/pil-py3k.git' failed. By the way the reason I think few people checked it out is that people mostly

Re: [Python-Dev] Core projects for Summer of Code

2009-03-18 Thread Daniel Fetchinson
ribution? >> > > I have talked with Fredrik, he said he would be running it on another > test suite to check how much of it really works. But, no, I didn't > really try pushing it to be integrated into the next PIL release and > it also wouldn't be possible withou

[Python-Dev] speeding up PyObject_GetItem

2009-03-23 Thread Daniel Stutzbach
tempted to suggest making these checks only when Py_DEBUG is defined, but I suspect if you wanted it that way, you would have changed it already. ;) Assuming you really want the NULL checks in production Python, there are 5 checks for NULL even though there are only two parameters. Seems li

Re: [Python-Dev] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
On Tue, Mar 24, 2009 at 4:30 AM, Hrvoje Niksic wrote: > Agreed, and more importantly, I have yet to be convinced that those NULL > checks introduce a measurable slowdown. Daniel, have you tried measuring > the performance difference with only the NULL checks removed? I'll pl

Re: [Python-Dev] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
On Tue, Mar 24, 2009 at 7:30 AM, Daniel Stutzbach < dan...@stutzbachenterprises.com> wrote: > On Tue, Mar 24, 2009 at 4:30 AM, Hrvoje Niksic wrote: > >> Agreed, and more importantly, I have yet to be convinced that those NULL >> checks introduce a measurable slowdown.

Re: [Python-Dev] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
On Tue, Mar 24, 2009 at 10:13 AM, Mark Dickinson wrote: > 2009/3/24 Daniel Stutzbach : > > [...] > > 100 nanoseconds, py3k trunk: > > ceval -> PyObject_GetItem (object.c) -> list_subscript (listobject.c) -> > > PyNumber_AsSsize_t (object.c) -> PyLong_AsS

[Python-Dev] __length_hint__

2009-04-02 Thread Daniel Stutzbach
ticed that if a VERY large hint is returned by the iterator, list.extend will sometimes disregard the hint and try to allocate memory incrementally (correct for rule #1 or #2). However, in another code path it will throw a MemoryError immediately based on the hint (correct for rule #3). -- D

[Python-Dev] decorator module in stdlib?

2009-04-06 Thread Daniel Fetchinson
ought up on python-dev. He also pointed out that a PEP [3] is already written about this topic and it is in draft form. What do you guys think, wouldn't this be a useful addition to functools? Cheers, Daniel [1] http://pypi.python.org/pypi/decorator [2] http://groups.google.com/group/comp.l

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-09 Thread Daniel Stutzbach
mps() always returns a string) def dumpb(obj, encoding='utf-8', *args, **kw): s = dumps(obj, *args, **kw) return s.encode(encoding) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>

Re: [Python-Dev] decorator module in stdlib?

2009-04-09 Thread Daniel Fetchinson
unrealistic. (Though > admittedly some older modules wouldn't be accepted by today's > standards either -- and I'm not just talking PEP-8 compliance! :-) > >> But I feel strongly about >> the possibility of being able to preserve (not change!) the function >>

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
e byte stream into a string stream (similar to Python's new TextIOWrapper class). Hope that helps, -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@pyt

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
on.dumps({}).encode('utf-16le') # dumps() returns str '{\x00}\x00' json.dumps({}, encoding='utf-16le') # dumps() returns bytes '{\x00}\x00' In 2.6, the first one works. The second incorrectly returns '{}'. -- Daniel Stutzbach, Ph.D. President,

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
logize for not reading more closely. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
venting users from getting a str out if that's what they want? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listi

Re: [Python-Dev] [Tracker-discuss] Dates in python-dev

2009-04-24 Thread Daniel Diniz
http://psf.upfronthosting.co.za/roundup/meta/issue274 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Tuples and underorderable types

2009-04-24 Thread Daniel Diniz
s: keymap[type(1j)] = abs imaginary_tasks = [(10j, lambda: 0), (20, lambda: 1), (10+1j, lambda: 2)] imaginary_tasks.sort(key=decorate_helper) # not so bad if intended mixed_tasks = [(lambda: 0,), (0.0,), (2**32,)] mixed_tasks.sort(key=decorate_helper) # oops, not the same order

Re: [Python-Dev] Oddity PEP 0 key

2009-05-02 Thread Daniel Diniz
MRAB wrote: > Are there Unicode codepoints for smilies? I'm thinking of :-) for > 'Accepted' and :-( for 'Rejected'. :-) Yes there are, but we'd need to set the font size to 'humongous' to see the smilies: ☹ ☺. In py3k: print(chr(0x2639), chr(0x263a)) In trunk: print(unichr(0x2639), unichr(0x263a

Re: [Python-Dev] Proposed: drop unnecessary "context" pointer from PyGetSetDef

2009-05-04 Thread Daniel Stutzbach
e, will 3rd party code that relies on it fail in unexpected ways, or will they just get a compile error? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Proposed: drop unnecessary "context" pointer from PyGetSetDef

2009-05-04 Thread Daniel Stutzbach
le I maintain is sprinkled with #ifdef's so it will compile under 2.5, 2.6, and 3.0. ;-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] using help function in Py3k

2009-05-05 Thread Daniel Stutzbach
On Tue, May 5, 2009 at 5:41 AM, s|s wrote: > LookupError: unknown encoding: uft-8 > uft-8? Looks like a variation of Issue 4540 <http://bugs.python.org/issue4540> (or a duplicate? I can't tell) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stut

Re: [Python-Dev] special method lookup: how much do we care?

2009-05-08 Thread Daniel Stutzbach
cial, but I don't think we really care this > much. Opinions? > Why does this problem arise only with __enter__ and __exit__? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev

Re: [Python-Dev] special method lookup: how much do we care?

2009-05-08 Thread Daniel Stutzbach
ial methods", which is possible) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] How to build Python 2.6.2 on HP-UX Itanium with thread support?

2009-05-13 Thread Daniel Diniz
dated. If someone has time to invest in this, a compatibility matrix would be very nice to have. Regards, Daniel [0] http://www.python.org/dev/peps/pep-0011/ [1] http://svn.python.org/view/python/trunk/README?revision=72107&view=markup [2] http://www.python.org/download/source/ and htt

Re: [Python-Dev] IronPython specific code in inspect module

2009-05-19 Thread Daniel Diniz
Object[0] on #python-dev today. PEP 362 was also brought up in a recent thread where the executive summary was 'it just needs someone to guide it through the last steps'[1], and it would make this kind of introspection nice and clean[2]. It makes even more sense now we have PEP 3107:

Re: [Python-Dev] Roundup keywords for bug tracking

2009-06-05 Thread Daniel Diniz
ta-tracker during the weekend. Also, if you would like to bookmark arbitrary sets of issues, the bookmarklet and form in http://static.bot.bio.br/tool.html may be of help. You can paste the ids into the search page's ID field and create a query for a given (static) set of issues. Regards, D

Re: [Python-Dev] run time error anlysis of python source code

2009-06-21 Thread Daniel Diniz
ypse Python !!, then you'll have an easier time to push the idea of going the whole way towards it. Or just do it, dunno, if it makes you feel better go for it, we all have our own issues. That's why we have an issue tracker, it's s nice, wanna see it??? > If anyone has any

Re: [Python-Dev] Flow of control - a new way - Idea

2009-06-30 Thread Daniel Stutzbach
h the details, but I believe you can get them in Stackless Python. Hope that helps, -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/> ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyt

Re: [Python-Dev] Mercurial migration: help needed

2009-07-05 Thread Daniel Diniz
a cool GSoC student working on Mercurial-Roundup integration, and I'm willing to work on our needs with him). For build identification, I'd only be able to do the C/Python side of things and (with luck) autoconf. Cheers, Daniel ___ Python-Dev mailin

Re: [Python-Dev] PEP 3144 review.

2009-09-15 Thread Daniel Stutzbach
Technicalities aside, I agree with you that IPNetwork appears to be doing double-duty as an IPNetwork type and an IPAddressWithNetwork type, which I find confusing. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___

Re: [Python-Dev] PEP 3144 review.

2009-09-15 Thread Daniel Fetchinson
e projects that are popular in the python community and which incorporate your module. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] PEP 3144 review.

2009-09-16 Thread Daniel Stutzbach
its that aren't in the mask. > Network addresses never contain bits that aren't in the mask (due to the rule: "network address & netmask == network address"). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___

Re: [Python-Dev] PEP 3144 review.

2009-09-17 Thread Daniel Stutzbach
- Special-Use IPv4 Addresses > RFC 4291 - IPv6 Addressing Architecture > RFC 4632 - Classless Inter-domain Routing (CIDR): The Internet Address > +1 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> __

Re: [Python-Dev] PEP 3144 review.

2009-09-17 Thread Daniel Fetchinson
long and largely academic thread here I think illustrates this point. Without a large user base it's up to anybody's gut feelings what is 'right' and what 'feels wrong'. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown

Re: [Python-Dev] Fuzziness in io module specs

2009-09-18 Thread Daniel Stutzbach
now, which lead to this or that > particular implementation choice ? > The original I/O PEP and some of the code was put together during a sprint at PyCon 2007. Our primary goal was to get a decent first cut of the new I/O system put together quickly. For nitty-gritty details and corner-c

<    1   2   3   4   5   6   >