Re: [Python-Dev] Ctypes and the stdlib (was Re: LZMA compression support in 3.3)

2011-08-30 Thread Martin v. Löwis
gmane.comp.python.devel/126340/focus=126419 I see. So there is potential for error there. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opt

Re: [Python-Dev] PyPI went down

2011-08-30 Thread Martin v. Löwis
> Looks like the issue keeps popping up. It was slow to respond earlier > today, and I keep getting complaints about it (including now.) Somebody is mirroring the site with wget. I have null-routed them. Regards, Martin ___ Python-Dev mailin

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-06 Thread Martin v. Löwis
With the switch to Python 3, there would have been a chance to remove little-used features. IMO, the next such chance is with Python 4. It could be useful to start collecting little-used features that might be removed with Python 4 - which I don't expect until 2020. Regards, Martin ___

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-06 Thread Martin v. Löwis
eless and also not used, they just can declare it a deliberate deviation from CPython, and refuse to implement it. If I had to pick a truly useless feature, I'd kill complex numbers, not str.swapcase. Regards, Martin ___ Python-Dev mailing list Pytho

Re: [Python-Dev] Handling linker scripts reached when dynamically loading a module

2011-09-11 Thread Martin v. Löwis
that is often a linker script gets also often used in ctypes (i.e. libc) is already special-cased - ctypes knows how to find the "real" C library. IOW, I would defer this until it becomes a real problem, at what point whoever has that problem ought to provide a patch. Regards, Martin _

Re: [Python-Dev] Windows 8 support

2011-09-14 Thread Martin v. Löwis
. Likewise, Tk might integrate support for WinRT, in which case IDLE might make use of it out of the box. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.

Re: [Python-Dev] Windows 8 support

2011-09-14 Thread Martin v. Löwis
mpared to, say, a game). Microsoft isn't going to break any of this for the next decade. Support for 16-bit applications is being dropped, but Python didn't really support 16-bit Windows all that well (although there was a DOS port). Regards, Martin __

[Python-Dev] PEP 393: Porting Guidelines

2011-09-15 Thread Martin v. Löwis
I added a section on porting guidelines to the PEP, resulting from my own porting experience. Please review. http://www.python.org/dev/peps/pep-0393/#porting-guidelines Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http

[Python-Dev] PEP 393: Special-casing ASCII-only strings

2011-09-15 Thread Martin v. Löwis
ate fields for pointer & size. What do you think? Regards, Martin P.S. There are similar reductions that could be applied to the wstr_length in general: on 32-bit wchar_t systems, it could be always dropped, on a 16-bit wchar_t system, it could be dropped for UCS-2 strings. However, I'm

Re: [Python-Dev] PEP 393: Special-casing ASCII-only strings

2011-09-15 Thread Martin v. Löwis
en is dropped for ASCII strings, and that it uses nested structs. The single-block variants would always be "ready", the full unicode object is ready only if the data pointer is set. I'll try it out, unless somebody can punch a hole into this proposal

Re: [Python-Dev] PEP 393: Special-casing ASCII-only strings

2011-09-15 Thread Martin v. Löwis
Am 16.09.11 00:42, schrieb Nick Coghlan: On Fri, Sep 16, 2011 at 7:39 AM, "Martin v. Löwis wrote: Thinking about this, the following may work: - ASCIIObject: state, length, hash, wstr*, data follow - SingleBlockUnicode: ASCIIObject, wstr_len, utf8*, utf8_len, data follow - UnicodeO

Re: [Python-Dev] range objects in 3.x

2011-09-23 Thread Martin v. Löwis
t they may wonder whether to start counting at 0 or 1). "Is the range from 5 to 100 larger than the range from 10 to 100?" is something that most people would answer as "yes" (I believe), yet py> range(5,100) > range(10,100) False Regards, Martin __

Re: [Python-Dev] PEP 393 close to pronouncement

2011-09-26 Thread Martin v. Löwis
tations. I could do them as well, so don't worry. Regards, Martin ___ 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

[Python-Dev] PEP 393 memory savings update

2011-09-27 Thread Martin v. Löwis
ually reduces memory consumption below what 2.7 uses. This is offset though by "other" (non-string) objects, which take 300KB more in 3.x. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] cpython: Implement PEP 393.

2011-09-28 Thread Martin v. Löwis
> Surely there must be more new APIs and changes that need documenting? Correct. All documentation still needs to be written. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-

[Python-Dev] PEP 393 merged

2011-09-28 Thread Martin v. Löwis
I have now merged the PEP 393 implementation into default. The main missing piece is the documentation; contributions are welcome. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] PEP 393 close to pronouncement

2011-09-28 Thread Martin v. Löwis
point of the PEP. You only pay for what you actually need, and in most cases, it's ASCII. > For best performance, each algorithm will have to be implemented > for all three storage types. This will be a trade-off. I think most developers will be happy with a single versio

Re: [Python-Dev] Heads up: Apple llvm gcc 4.2 miscompiles PEP 393

2011-09-28 Thread Martin v. Löwis
end and backend)? /usr/bin/cc and /usr/bin/gcc both link to llvm-gcc-4.2. However, there still is /usr/bin/gcc-4.2. Using that, Python also compiles correctly - so I have changed the gcc link on my system. Thanks for the advise - I didn't expect that Apple ships thhree compilers

Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-10-01 Thread Martin v. Löwis
AX, Py_VA_COPY, ... pymacro.h contains platform > independant > macros. I'm -1 on additional header files as well. If no other reasonable place is found, Python.h is still available. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] [Python-checkins] cpython: Implement PEP 393.

2011-10-01 Thread Martin v. Löwis
y_UCS4, since the resulting strings will be small, so the overhead is probably negligible. Regards, Martin ___ 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] PEP-393: request for keeping PyUnicode_EncodeDecimal()

2011-10-01 Thread Martin v. Löwis
uld also take the same approach as decimal.py, i.e. do self._int = str(int(intpart+fracpart)) This would improve compatibility with the decimal.py implementation, which doesn't use PyUnicode_EncodeDecimal either (but instead goes through _PyUnicode_TransformDecim

Re: [Python-Dev] PEP-393: request for keeping PyUnicode_EncodeDecimal()

2011-10-01 Thread Martin v. Löwis
de_TransformDecimalAndSpaceToASCII() be public? It's already included in 3.2, so it can't be removed that easily. I wish it had been private, though - we have way too many API functions dealing with Unicode. Regards, Martin ___ Python-De

Re: [Python-Dev] cpython: Add _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() macros

2011-10-01 Thread Martin v. Löwis
led. In this case, it's a pure structure accessor macro, that may give NULL if the pointer is not yet filled out. It's not called Py_AS_TYPE, but Py_TYPE; likewise not PyWeakref_AS_OBJECT, but PyWeakref_GET_OBJECT. In this case, PyUnicode_GET_UTF8 might have been an alternative. Regards

Re: [Python-Dev] What it takes to change a single keyword.

2011-10-01 Thread Martin v. Löwis
les should get edited. Hmm. I also think editing Grammar/Grammar should be sufficient. Try restricting yourself to ASCII keywords first; this just worked fine for me. Of course, if you change a single keyword, none of the existing Python code will work anymore. See for yourself by changi

Re: [Python-Dev] RFC: Add a new builtin strarray type to Python?

2011-10-03 Thread Martin v. Löwis
en it should have a refcount of at least 2, so the very first test in the function should already exclude it. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail

Re: [Python-Dev] PEP-393: request for keeping PyUnicode_EncodeDecimal()

2011-10-03 Thread Martin v. Löwis
ill propose to make all those private where nobody can argue for general utility. The longer the function name, the less is the utility. PyMartin_SendThisMessageAboutDecimalParsingToStefan-ly y'rs Martin ___ Python-Dev mailing list Python-Dev@python.o

Re: [Python-Dev] cpython: PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown

2011-10-03 Thread Martin v. Löwis
nown Of course, I'll encourage Victor to keep on mastering the English language as much as anybody else. Regards, Martin ___ 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] cpython: PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown

2011-10-03 Thread Martin v. Löwis
VCS (something that a centralized system would have no issues with). Regards, Martin ___ 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] [Python-checkins] cpython: Migrate str.expandtabs to the new API

2011-10-04 Thread Martin v. Löwis
(in a debug build, you also get an assertion failure). Regards, Martin ___ 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] Using PEP384 Stable ABI for the lzma extension module

2011-10-04 Thread Martin v. Löwis
decide the buffer API is stable, the structure is locked until Python 4. - PyType_FromSpec() does not call PyType_Ready(), which caused crashes in __new__. Oops :-) Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/m

Re: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module

2011-10-04 Thread Martin v. Löwis
he stable ABI, unfortunately, there is no easy technique for Unix achieving the same. Regards, Martin ___ 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] [Python-checkins] cpython: Optimize string slicing to use the new API

2011-10-04 Thread Martin v. Löwis
tring. Or you allocate a temporary buffer of (1<<(kind-1)) * slicelength bytes, copy the slice, allocate the target object with PyUnicode_FromKindAndData, and release the temporary buffer. Regards, Martin ___ Python-Dev mailing list Python-Dev@pyth

Re: [Python-Dev] [Python-checkins] cpython: Optimize string slicing to use the new API

2011-10-04 Thread Martin v. Löwis
Am 04.10.11 19:50, schrieb Antoine Pitrou: On Tue, 04 Oct 2011 19:49:09 +0200 "Martin v. Löwis" wrote: +result = PyUnicode_New(slicelength, PyUnicode_MAX_CHAR_VALUE(self)); This is incorrect: the maxchar of the slice might be smaller than the maxchar of the input string.

Re: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module

2011-10-04 Thread Martin v. Löwis
Am 04.10.11 21:06, schrieb Amaury Forgeot d'Arc: 2011/10/4 "Martin v. Löwis": - _PyBytes_Resize() is missing; I moved it under a Py_LIMITED_API section. ??? Are you proposing to add _PyBytes_Resize to the Py_LIMITED_API set of functions? It's not even an API functio

Re: [Python-Dev] [Python-checkins] cpython: Optimize string slicing to use the new API

2011-10-05 Thread Martin v. Löwis
ge out. If people use the API incorrectly, they will get incorrect results. It's useful to have checks in debug mode, but that's the most that people should reasonably expect. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org ht

Re: [Python-Dev] Using PEP384 Stable ABI for the lzma extension module

2011-10-05 Thread Martin v. Löwis
n the memory allocator, a copy can be avoided. That's why the "str += str" hack is much more efficient under Linux than Windows, AFAIK. Even Linux will have to copy a block on realloc in certain cases, no? Regards, Martin ___ Python-Dev

Re: [Python-Dev] What it takes to change a single keyword.

2011-10-05 Thread Francisco Martin Brugue
Just Info on the links: http://docs.python.org/devguide/compiler.html provides info on how it all hangs together). Those: [1] Skip Montanaro’s Peephole Optimizer Paper (http://www.foretec.com/python/workshops/1998-11/proceedings/papers/monta

Re: [Python-Dev] [Python-checkins] cpython: Fix find_module_path(): make the string ready

2011-10-06 Thread Martin v. Löwis
+if (PyUnicode_READY(path_unicode)) +return -1; + I think we need to discuss/reconsider the return value of PyUnicode_READY. It's defined to give -1 on error currently. If that sounds good, then the check for error should be a check that it is -1. Regards, M

Re: [Python-Dev] What it takes to change a single keyword.

2011-10-06 Thread Francisco Martin Brugue
On 10/06/2011 12:00 AM, Brett Cannon wrote: > Please file a bug about the dead links so we can fix/remove them. > it's done in http://bugs.python.org/issue13117 (and I've also tried with a patch). Cheers, francis ___ Python-Dev mailing list Python-

Re: [Python-Dev] check for PyUnicode_READY look backwards

2011-10-06 Thread Martin v. Löwis
READY checks, 106 take the form if (PyUnicode_READY(foo) == -1) return NULL; 30 tests take the form that you mention. I believe all of those have been added by Victor, who just didn't follow the convention. So, Victor: please correct them. Regar

Re: [Python-Dev] Rename PyUnicode_KIND_SIZE ?

2011-10-06 Thread Martin v. Löwis
, and we have to review and revoke those that are not useful. (Of course, some of those that did get added by the PEP may also not be useful). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pytho

Re: [Python-Dev] check for PyUnicode_READY look backwards

2011-10-07 Thread Martin v. Löwis
read in Python, e.g. when checking return values from PyObject_SetAttrString, BaseException_init, PyThread_create_key, PyObject_DelAttrString, etc. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listi

[Python-Dev] PyUnicode_KIND changed

2011-10-07 Thread Martin v. Löwis
After discussion with several people, I changed PyUnicode_KIND to have values of 1,2,4, respectively, thus reflecting the element size of the string numerically. As a consequence, the PyUnicode_CHARACTER_SIZE and PyUnicode_KIND_SIZE macros are now gone. Regards, Martin

[Python-Dev] Identifier API

2011-10-08 Thread Martin v. Löwis
peed-up of 30% (notice that "i | d" invokes the above PyObject_CallMethod call). Regards, Martin ___ 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] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-08 Thread Martin v. Löwis
uot; is correct; we don't have any untrusted code in Python. We trust all committers, as do we trust the integrity of the repository server. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Bring new features to older python versions

2011-10-08 Thread Martin v. Löwis
(there are other reasons for me to consider hacks like this, such as when supporting multiple versions is just not feasible, but I wouldn't use a hack for convenience reasons). People that do feel the same way as you have probably started their own emulation layers already,

Re: [Python-Dev] Identifier API

2011-10-13 Thread Martin v. Löwis
tricky part in C is to keep track of all the code paths. This API hides this by putting the initialization into the callee (PyObject_GetAttrId and friends), hence the (unlikely) failure to initialize the string is reported in the same code path as the (very plausible

Re: [Python-Dev] Identifier API

2011-10-13 Thread Martin v. Löwis
An alternative I am fond of is to to avoid introducing a new type, and simply initialize a PyObject * and register its address. -1 on that, because of the lack of error checking. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Packaging and binary distributions for Python 3.3

2011-10-13 Thread Martin v. Löwis
lenvs that have linked the installation, and warn the user that the file is still in use in certain locations. Likewise, automated download might pick an MSI file, and tell it not to place itself into the actual Python installation, but instead into a location where pysetup will find it. Regar

Re: [Python-Dev] Identifier API

2011-10-13 Thread Martin v. Löwis
be documented at all outside of the header file, or if, in what document. Currently, this very point is documented in the header file. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev U

Re: [Python-Dev] Packaging and binary distributions for Python 3.3

2011-10-14 Thread Martin v. Löwis
odules). In addition, bdist_wininst is better wrt. to repeated installations. I'd prefer a setup though where the same package can work in multiple installations without requiring physical copies. Regards, Martin ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Identifier API

2011-10-14 Thread Martin v. Löwis
Am 13.10.11 20:38, schrieb Barry Warsaw: On Oct 13, 2011, at 08:08 PM, Martin v. Löwis wrote: Py_CONST_STRING or Py_IDENTIFIER would be fine with me. Given that everything else uses "Id" in their name, Py_IDENTIFIER is probably better? I agree that either is fine, with a slight

Re: [Python-Dev] Packaging and binary distributions for Python 3.3

2011-10-14 Thread Martin v. Löwis
, so they could only use the packaging API when installing into 3.3 or newer. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/pyt

Re: [Python-Dev] Packaging and binary distributions for Python 3.3

2011-10-14 Thread Martin v. Löwis
a tutorial, I could provide input. I'm clearly unqualified to write such a document, both for language barrier reasons, and because I continue to fail guessing what precisely it is that people don't understand. Regards, Martin ___ Python-Dev

Re: [Python-Dev] Packaging and binary distributions for Python 3.3

2011-10-14 Thread Martin v. Löwis
. Regards, Martin ___ 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] Identifier API

2011-10-14 Thread Martin v. Löwis
ll of some kind, which it would not be. Regards, Martin ___ 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] Identifier API

2011-10-15 Thread Martin v. Löwis
e second one to determine whether it's the right string). The Py_IDENTIFIER API can do the lookup in constant time for all but the first call. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue #13156: revert changeset f6feed6ec3f9, which was only relevant for native

2011-10-15 Thread Martin v. Löwis
done deal, but: no. If a patch is reverted, the NEWS entry that got in with it gets out again on reversal. The NEWS file is for users of the release; there is no point telling them that a change was made first, and than got undone. Regards, Martin

Re: [Python-Dev] Modules of plat-* directories

2011-10-23 Thread Martin v. Löwis
rted. That no bug is being reported means that they either work fine, or nobody uses them. In the former case, removing them will break somebody's code. In the latter case, nothing is gained by either keeping or removing them. So why remove them? Regards, Martin _

Re: [Python-Dev] Modules of plat-* directories

2011-10-23 Thread Martin v. Löwis
ically generated. If the output is bogus, users just won't use the fragments that are bogus. Other fragments work just fine, and can be used. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyt

Re: [Python-Dev] memcmp performance

2011-10-23 Thread Martin v. Löwis
ould they not be needed anymore. Regards, Martin ___ 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] Modules of plat-* directories

2011-10-23 Thread Martin v. Löwis
ain will vary from system to system. People should read the manual of their operating system to find out what all the constants mean (or perhaps the source code of their operating system in case the constants are undocumented even by the system vendor - which many of

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Martin v. Löwis
on this proposal. People that explicitly use bytes for file names deserve to get whatever exact platform semantics the platform has to offer. This is true on Unix, and it is also true on Windows. Regards, Martin ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Martin v. Löwis
; For > example: it's difficult to write such characters directly with the keyboard. > I > bet that very few people will notify the change. Except people running into the very issues you are trying to resolve. I'm not sure these people are really helped by having their application

Re: [Python-Dev] Modules of plat-* directories

2011-10-25 Thread Martin v. Löwis
Am 24.10.2011 14:06, schrieb Victor Stinner: > There are open issues related to plat-XXX. > > Le Lundi 24 Octobre 2011 00:03:42 Martin v. Löwis a écrit : >> no, we make no changes to them unless a user actually requests a change > > Matthias Klose asked for socket SIO* c

Re: [Python-Dev] Emit a BytesWarning on bytes filenames on Windows

2011-10-29 Thread Martin v. Löwis
ssue and > a recommendation to always use unicode is sufficient (ie, we can't > deprecate it and a new BytesWarning seems gratuitous.) That sounds all fine to me. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] Emit a BytesWarning on bytes filenames on Windows

2011-10-30 Thread Martin v. Löwis
Unix. It splits into the "we only care about Unix" crowd (A), the "we want correctness everywhere" crowd (B), and the "we want portable code" crowd (C). (A) can accept the deprecation. (B) will support it. Only (C) might protest, as we are going to break their code, hence

Re: [Python-Dev] Packaging and binary distributions

2011-10-31 Thread Martin v. Löwis
from that? My >> (current) answer is that I don't know. The packaging module as it >> stands only offers the legacy bdist_xxx formats, so the answer is "run >> pysetup run bdist_wininst on it". If that breaks (as it is likely to - >> wininst format isn'

Re: [Python-Dev] draft PEP: virtual environments

2011-11-01 Thread Martin v. Löwis
'stop':'''\ #!/bin/sh echo stop ''' }}} Then, your install_scripts would take a dictionary filename:script contents. That's just as easily extensible. Regards, Martin ___ 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] Unicode exception indexing

2011-11-03 Thread Martin v. Löwis
kwards compatibility. It is now always a typedef for wchar_t, which makes it a 16-bit type on Windows. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pyth

Re: [Python-Dev] Unicode exception indexing

2011-11-03 Thread Martin v. Löwis
the exception object, and adjust it before returning it. The implementation is fairly straight-forward, just a little expensive (in the case of non-BMP strings on Windows). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.pytho

Re: [Python-Dev] Unicode exception indexing

2011-11-03 Thread Martin v. Löwis
w knowing that it's actually feasible to be fully backwards compatible); if nobody speaks up, I go ahead and accept the breakage. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsu

Re: [Python-Dev] Unicode exception indexing

2011-11-04 Thread Martin v. Löwis
u, Victor, and Guido tell me not to worry - so I won't :-) Regards, Martin ___ 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] Why does _PyUnicode_FromId return a new reference?

2011-11-06 Thread Martin v. Löwis
in the API (with PyArg_ParseTuple being the notable exception where borrowed references are a good idea). Now, practicality beats purity, so the real answer is: I just didn't consider that it might return a borrowed reference. Regards, Martin ___ Python-Dev m

Re: [Python-Dev] Packaging and binary distributions

2011-11-06 Thread Martin v. Löwis
uld generate custom actions that run the "proper" setup.cfg hooks (I presume - I have no idea what a setup.cfg hook actually is). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pytho

[Python-Dev] PEP 382 specification and implementation complete

2011-11-06 Thread Martin v. Löwis
was much easier to implement than in the first version (plus I understand import.c better now). This implementation now features .pyp directories, zipimporter support, documentation and test cases. As the next step, I'd like to advance this to ask for pronounceme

Re: [Python-Dev] PEP 382 specification and implementation complete

2011-11-06 Thread Martin v. Löwis
ry once they can drop support for pre-3.3 releases). Regards, Martin ___ 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] PEP 382 specification and implementation complete

2011-11-06 Thread Martin v. Löwis
rious extensions), or a directory with special properties. So extending this should be "easy". Also, the number of tools that emulate the Python import algorithm is rather small. Tools that merely inspect __path__ after importing a package will continue to work just fine even under PEP 38

Re: [Python-Dev] PyDict_Get/SetItem and dict subclasses

2011-11-06 Thread Martin v. Löwis
7;s not certain that the object really is of the base class (unless I missed that somebody already did, and that any remaining occurrences would be just minor bugs). Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/m

Re: [Python-Dev] Packaging and binary distributions

2011-11-08 Thread Martin v. Löwis
ackaging, similar to how the bdist_wininst executable is part of distutils. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/p

Re: [Python-Dev] [Python-checkins] cpython: quote the type name for improved readability

2011-11-09 Thread Martin v. Löwis
s more readable, quoted type names are rather >> rare >> if not pretty much unprecedented in core exception messages, so this is >> definitely not the only place that would need changing. >> >> However, note that arbitrarily chan

Re: [Python-Dev] unicode_internal codec and the PEP 393

2011-11-09 Thread Martin v. Löwis
hen be closest to the real representation. As that is likely not very useful, and might break some applications of the encoding (if there are any at all) which might expect to pass unicode-internal strings across Python versions, I would then also deprecate the encoding. Regards, Martin ___

Re: [Python-Dev] [Python-checkins] cpython: quote the type name for improved readability

2011-11-09 Thread Martin v. Löwis
to create deliberately confusing error messages, though, such as py> class your:pass ... py> next(your()) Traceback (most recent call last): File "", line 1, in TypeError: your object is not an iterator Regards, Martin

Re: [Python-Dev] unicode_internal codec and the PEP 393

2011-11-09 Thread Martin v. Löwis
ng that, and deprecating the encoding sounds fine to me as well. Regards, Martin ___ 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] order of Misc/ACKS

2011-11-11 Thread Martin v. Löwis
fine as well, and be more practical. In general, it's not possible to provide a "correct" alphabetic order. For example, in German, 'ö' sorts after 'o', whereas in Swedish, it sorts after 'z'. In fact, in German, we ha

Re: [Python-Dev] Hashable memoryviews

2011-11-13 Thread Martin v. Löwis
lready the issue that equality may not be transitive wrt. to buffer objects (e.g. a == memoryview(a) == memoryview(b) == b, but a != b). As that would be a bug in either a or b, failure to hash consistently would be a bug as well. Regards, Martin ___ Py

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-13 Thread Martin v. Löwis
imilar to _Py_PackageContext should be possible. Regards, Martin ___ 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] urllib.request.urlopen struggling in Windows 7

2011-11-14 Thread Martin v. Löwis
ssue, i.e. the server somehow closes the connection without providing all the data it ought to provide. If that's the issue, Python can do nothing about it - you need to fix the server. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] how to find the file path to an extension module at init time?

2011-11-14 Thread Martin v. Löwis
likely to break anything" really means it practice "it probably will break somebody's code". Policies are there to be followed, and this one I personally feel strongly about. If it means that users can get certain Cython features only with Python 3.x, the better. Regards,

Re: [Python-Dev] PyUnicode_Resize

2011-11-23 Thread Martin v. Löwis
careful on this particular > issue (which is not well documented today). See above. I think there actually is no issue in the first place. Please do correct me if I'm wrong. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Long term development external named branches and periodic merges from python

2011-11-24 Thread Martin v. Löwis
> It would be nice if I could just specify both the feature branch *and* > the branch to diff against rather than having to work out why Roundup is > guessing wrong... Why would you not diff against the default branch? Regards, Martin ___ P

Re: [Python-Dev] Long term development external named branches and periodic merges from python

2011-11-30 Thread Martin v. Löwis
not yet in cpython, leaving only the changes in your ancestry that come from cpython. max() then finds the most recent such change, which will be the "default" parent of your last merge, or the branch point if you haven't merged after branching. HTH, Martin __

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread Martin v. Löwis
name, and b) means that the name actually doesn't matter (but the file name extension would). UUIDs would work, as would the name of the portion/distribution. I think the specific choice of name will confuse people into interpreting things in the file name that aren't really inten

Re: [Python-Dev] STM and python

2011-12-04 Thread Martin v. Löwis
you really are unaware of any effort, try googling to find http://www.kamaelia.org/STM http://peak.telecommunity.com/DevCenter/TrellisSTM http://bugs.python.org/issue12850 http://dl.acm.org/citation.cfm?id=1978911 http://www-sal.cs.uiuc.edu/~zilles/papers/python_htm.dls2006.pdf and more R

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-05 Thread Martin v. Löwis
(e.g. none), we must assume that it was deliberate, and that any resulting failures are desired. People do such stuff for security reasons, and side-stepping their enforcement is not appropriate for Python to do. Regards, Martin ___ Python-Dev mailing lis

Re: [Python-Dev] [Python-checkins] cpython (2.7): PDB now will properly escape backslashes in the names of modules it executes.

2011-12-07 Thread Martin v. Löwis
a test case, in particular if it tests the value of a tau constant in the math module. There can't be any more precise documentation of the test purpose. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-08 Thread Martin v. Löwis
ns/libraries that only support 2.6+. In addition, there also is another option: - use 2to3, in some form So you have already three solutions which are all transitional in some sense, and you want yet another option? I fail to see why this option is more practical than the options that are alrea

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-08 Thread Martin v. Löwis
t for a Python 3 migration this decade. And people using it can happily continue to use Python 2. If they don't have a need to port their code to Python 3, they are not concerned by whether you use a u prefix for strings in Python 3 or not. Regards, Martin _

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-09 Thread Martin v. Löwis
insists that they are str (and doesn't accept bytes). This is fairly uncommon as a problem, though, and is also solved in Python 2.6, which does accept Unicode strings as keyword parameter names. Regards, Martin ___ Python-Dev mailing list Python-D

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-09 Thread Martin v. Löwis
hey differ only (slightly) in how you spell Unicode literals, but all provide for explicit spelling of Unicode literals when applied. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Uns

<    37   38   39   40   41   42   43   44   45   46   >