[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.12.2014 19:02, Antoine Pitrou wrote: > Sticking to bitness should be easy (although I wonder if it would be > desirable for platforms with fat binaries - Ned?). If we can go the extra > mile and include platform identification all the b

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Note that there's a difference between the platform's architecture (which is what get_platform() returns) and the pointer size of the currently running Python executable. On 64-bit Linux, it's rather rare to have an application built as 32-

[issue19676] Add the "namereplace" error handler

2014-11-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The patch looks good. One nit: the name buffer length should be NAME_MAXLEN instead of 100. -- ___ Python tracker <http://bugs.python.org/issue19

[issue22929] cp874 encoding almost empty

2014-11-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: BTW: The table on the wiki page shows the same undefined chars. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22929] cp874 encoding almost empty

2014-11-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I'm not sure I understand the bug report. What's the problem ? :-) The codec is a charmap codec generated from the file MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT (http://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT) This ma

[issue22863] https://docs.python.org/ should make a true 2.7.8 version available

2014-11-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 14.11.2014 22:35, Terry J. Reedy wrote: > New stuff is marked "New in version 2.7.9.", etc. The Idle chapter > (reletively new in the Library Reference itself) has the same problem if new > or quasi-new features in micro-releases a

[issue22866] ssl module in 2.7.9 should provide a way to configure default context options

2014-11-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Hmm, since neither create_default_context() nor _create_stdlib_context() are used by any other stdlib modules, I guess the removal of SSLv3 doesn't really make much difference for existing Python 2.7 applications. I was irritated by the function

[issue22866] ssl module in 2.7.9 should provide a way to configure default context options

2014-11-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 14.11.2014 01:29, Benjamin Peterson wrote: > > But you can reenable SSLv3 by alerting the context and monkeypatching as > described in the PEP. Well, I can monkeypatch the ssl module of course, but that's not really the point here. I

[issue22866] ssl module in 2.7.9 should provide a way to configure default context options

2014-11-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 13.11.2014 22:03, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Per http://legacy.python.org/dev/peps/pep-0476/#opting-out the only way to do > these things is horrednously ugly because it's hardly (if eve

[issue22866] ssl module in 2.7.9 should provide a way to configure default context options

2014-11-13 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: With the backport of the Python 3 ssl module, the default context options of the ssl module were changed. While this provides better security in many cases, it also causes breakage with servers or clients which do not support TLSv1 and later. The ssl

[issue22863] https://docs.python.org/ should make a true 2.7.8 version available

2014-11-13 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: The documentation shown for Python 2.7.8 currently includes 2.7.9 parts, e.g. for the ssl modules (https://docs.python.org/2.7/library/ssl.html). Since there were so many changes to the ssl module for 2.7.9 which are not available in 2.7.8, I think it

[issue22846] distutils needlessly fails to build apsw

2014-11-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Shouldn't this be fixed in the APSW setup.py ? The patch is you are proposing looks harmless, but it can also mask programming errors in setup.py. -- nosy: +lemburg ___ Python tracker <http://bugs.py

[issue22789] Compress the marshalled data in PYC files

2014-11-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 08.11.2014 10:28, Serhiy Storchaka wrote: > Compressing pyc files one by one wouldn't save much space because disk space > is allocated by blocks (up to 32 KiB on FAT32). If the size of pyc file is > less than block size, we will not gain

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Looking at recent comments on the gevent ticket, the 2.7.9 changes are already causing problems for people since apparently the changes were backported to 2.7.8 by some vendors. https://github.com/gevent/gevent/issues/477

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 07.11.2014 13:12, Antoine Pitrou wrote: > > It's not a mere matter of putting back the code... The 3.x ssl implementation > which was backported uses a slightly different approach from the 2.x > implementation, so it's not obvi

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 07.11.2014 12:49, Marc-Andre Lemburg wrote: >> BTW: The sslwrap_simple() API was also removed in 2.7.9. > > Scratch that. I was in the wrong work dir :-) Hmm, even though the API is still there, it uses _ssl.sslwrap() as well, so it won&#x

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 07.11.2014 11:30, Marc-Andre Lemburg wrote: > BTW: The sslwrap_simple() API was also removed in 2.7.9. Scratch that. I was in the wrong work dir :-) -- ___ Python tracker <http://bugs.python.org/issu

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 07.11.2014 11:52, Arfrever Frehtes Taifersar Arahesis wrote: > > Arfrever Frehtes Taifersar Arahesis added the comment: > >> No, the use of the underscore in _ssl is per convention that C >> implementation part of stdlib modules a

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 07.11.2014 11:12, Arfrever Frehtes Taifersar Arahesis wrote: > > Arfrever Frehtes Taifersar Arahesis added the comment: > > _ssl has leading underscore. > Privateness is "inherited", so both A._B.C and A._B._D are private. No,

[issue22438] eventlet broke by python 2.7.x

2014-11-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Even though it may have been considered a private API (*), users certainly won't understand that their application just broke because of a Python patch level release upgrade, so if possible, I think the API should be added back and flagged as &qu

[issue22789] Compress the marshalled data in PYC files

2014-11-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.11.2014 10:41, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > This is similar to the idea of loading the stdlib from a zip file (but less > intrusive and more debugging-friendly). The time savings will depend on

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-10-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jean Christophe: Please have a look at the patch for ticket http://bugs.python.org/issue22681 as example of the doc patch. Thanks. -- ___ Python tracker <http://bugs.python.org/issue21

[issue18348] Additional code pages for EBCDIC

2014-10-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I don't think we should add more EBCDIC codecs to Python's stdlib. It would be better to put a Python package on PyPI which people using these encodings can use. -- ___ Python tracker <http://bu

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.10.2014 11:13, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> Test failed due to mismatch between glibc and X11 locale.alias (issue20087). >> In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and i

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.10.2014 10:38, Marc-Andre Lemburg wrote: > > What I don't understand is why the above case failed. That mapping > wasn't changed by the patch, AFAICT. Ah, the change is in the second patch round you applied, which is not on the

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.10.2014 10:24, STINNER Victor wrote: > > STINNER Victor added the comment: > > A lot of buildbot failed. Example: > > http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/2692/ste

[issue20079] Add support for glibc supported locales

2014-10-01 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 01.10.2014 09:52, Serhiy Storchaka wrote: > > The makelocalealias.py generates only a list of removes and updates, not > additions. Ah, ok. > I recommend first apply issue20076, it will eliminate most additions. Agreed. Please apply

[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks, Serhiy The patch looks good. Please apply. -- ___ Python tracker <http://bugs.python.org/issue20076> ___ ___ Pytho

[issue20079] Add support for glibc supported locales

2014-10-01 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks, Serhiy. The patch looks good, except for one nit: the makelocalealias.py normaly also generates a list of changes and these are put at the top of the locale_alias dictionary. Could you add that as well

[issue4093] add gc/memory management tests to pybench

2014-09-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think it's better to keep pybench speed performance oriented and rather use a new tool for memory performance tests. I've recently done a lightning talk at PyCon UK on the subject and found the current tools we have for memory tes

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2014-09-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 23.09.2014 13:12, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Draft docstring for that version > > def convert_surrogates(data, errors='replace'): > """Convert escaped su

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2014-09-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Don't like the function name :-) How about codecs.filter_non_utf8_data(), since that's closer to what the function is really doing and doesn't require knowledge about what "surrogateescape" is.

[issue22166] test_codecs leaks references

2014-09-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 15.09.2014 15:19, STINNER Victor wrote: > > STINNER Victor added the comment: > > IMO test_codecs_fix1.patch is still needed. > > Review of Nick's change: > > +interp = PyThreadState_GET()->interp; > +if

[issue9951] introduce bytes.hex method

2014-09-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.09.2014 01:04, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Just as a recap of at least some of the *current* ways to do a bytes -> hex > conversion: > >>>> import codecs >>>> codecs.

[issue22166] test_codecs leaks references

2014-09-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 06.09.2014 21:14, Nick Coghlan wrote: > > This investigation also showed why the original tests that used a > non-unique name didn't work: the codec was getting cached the first time > through and hence not seeing the different codecs re

[issue22166] test_codecs leaks references

2014-09-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 06.09.2014 15:03, Nick Coghlan wrote: > A "codecs._forget_codec" helper in the C module would be all that was needed > to handle it. Other implementations could then also use that to clear their > own internal cache (if they have on

[issue22311] Pip 404's

2014-08-31 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 31.08.2014 11:34, Wilberto Morales wrote: > > New submission from Wilberto Morales: > > I know that issues like this one are usually on the users(my) fault, but I > think pip might be broken this time for real. > > Every time I r

[issue22224] docs.python.org is prone to political blocking in Russia

2014-08-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.08.2014 19:14, Donald Stufft wrote: > > For now I think Fastly has sufficiently handled the issue to not require some > sort of backup system to need to be put in place. They are going to let me > know how they are going to handle it l

[issue22224] docs.python.org is prone to political blocking in Russia

2014-08-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.08.2014 09:28, Georg Brandl wrote: > > We know, but this will happen to any sites that have content hosted by a CDN > such as Fastly. I think we should have additional fallback domains setup that go to frontend.python.org and then also get

[issue22224] docs.python.org is prone to political blocking in Russia

2014-08-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: It looks like the IP address is being used by some viruses/trojans: https://www.virustotal.com/en/ip-address/185.31.17.175/information/ It may help using e.g. b.global-ssl.fastly.net as CNAME for docs.python.org (e.g. by adding it to the /etc/hosts

[issue22128] patch: steer people away from codecs.open

2014-08-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Pointing people to io.open() as alternative to codecs.open() is a good idea, but that doesn't make codecs.open() less useful. The reason why codecs.open() uses binary mode is to avoid issues with automatic newline conversion getting in the way o

[issue21777] Separate out documentation of binary sequence methods

2014-07-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Why are you removing guarantees like these from the str docs: "The original string is returned if *width* is less than or equal to ``len(s)``." ? This doesn't seem to have anything to do with documenting bytes and bytearrays. --

[issue12808] Coverage of codecs.py

2014-06-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The patch would have to be updated to 3.5 (part of it no longer applies), but other than that I think it's fine. It may make sense to readd the comment for .getstate() to keep the state as simple as possible ("The implementation should make sur

[issue13074] Improve documentation of locale encoding functions

2014-06-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The two functions serve a different purpose. getdefautltlocale() specifically avoids calling setlocale() and is thread-safe on Unix. It's purpose is to return the default locale string, not only the encoding. getpreferredencoding() only return

[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-06-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 24.06.2014 11:44, Serhiy Storchaka wrote: > > Note that 'raw-unicode-escape' is used in pickle protocol 0. Changing it can > break compatibility. Indeed. unicode-escape was also designed to be able to read back raw-unicode-esca

[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The unicode-escape codec was used in Python 2 to convert Unicode literals in source code to Unicode objects. Before PEP 263, Unicode literals in source code were interpreted as Latin-1. See http://legacy.python.org/dev/peps/pep-0263/ for details. The

[issue21308] PEP 466: backport ssl changes

2014-06-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.06.2014 16:38, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > MAL - agreed on the version numbering implications of treating OpenSSL CVE's > as CPython CVE's, but I think Guido pretty much answered that when h

[issue21308] PEP 466: backport ssl changes

2014-06-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.06.2014 09:26, Nick Coghlan wrote: > > 2.7.8 will likely be earlier than expected in order to address the latest > OpenSSL update for the Windows installers. So while the likely time frame for > this hasn't changed (i.e. Novembe

[issue21789] Broken link to PEP 263 in Python 2.7 error message

2014-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 17.06.2014 15:00, Jan Varho wrote: > > New submission from Jan Varho: > > When trying to run a file with non-ASCII symbols without declaring an > encoding, python 2.7 gives the following error: > > File "foo.py",

[issue21789] Broken link to PEP 263 in Python 2.7 error message

2014-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 17.06.2014 15:03, M.-A. Lemburg wrote: > On 17.06.2014 15:00, Jan Varho wrote: >> >> New submission from Jan Varho: >> >> When trying to run a file with non-ASCII symbols without declaring an >> encoding, pyt

[issue21772] platform.uname() not EINTR safe

2014-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 17.06.2014 11:21, STINNER Victor wrote: > > STINNER Victor added the comment: > > "I'm not sure whether using os.fsencoding() is a good idea. The encoding used > by uname is not defined anywhere and it's possible that Py

[issue21772] platform.uname() not EINTR safe

2014-06-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I'm not sure whether using os.fsencoding() is a good idea. The encoding used by uname is not defined anywhere and it's possible that Python using a wrong encoding may cause the call to fail (e.g. in case the host name includes non-ASCII cha

[issue21736] Add __file__ attribute to frozen modules

2014-06-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 15.06.2014 01:53, Nick Coghlan wrote: > > Can we just drop "__file__" and set the origin for frozen modules to > something that includes the original file name? This wouldn't really help, because too much code out there uses th

[issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3

2014-06-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: FWIW: This still happens with the Python 3.4.1 release version. Here's a similar error report for Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=622060 They patched the compiler, so I guess I'll have to find a more recent gcc for the

[issue21749] pkgutil ImpLoader does not support frozen modules

2014-06-13 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : Removed file: http://bugs.python.org/file35617/pkgutil-frozen-modules-support.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21749] pkgutil ImpLoader does not support frozen modules

2014-06-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Here's an updated patch for Python 3.4.1 that doesn't use the awkward style :-) -- Added file: http://bugs.python.org/file35619/pkgutil-frozen-modules-support.patch ___ Python tracker <http://bu

[issue21749] pkgutil ImpLoader does not support frozen modules

2014-06-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 13.06.2014 18:49, Jim Jewett wrote: > > As best I can tell, this renames the original get_code to _get_code, and then > delegates to it after handling the imp.PY_FROZEN case ... why not just add > imp.PY_FROZEN to the if/elif chain in

[issue21749] pkgutil ImpLoader does not support frozen modules

2014-06-13 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: This leads to problems when using runpy, since it relies on pkgutil to find importers. In Python 2, ImpLoader is used by ImpImporter which is used as fallback importer by get_importer(). get_importer() is used by runpy to implement e.g. the -m option

[issue21736] Add __file__ attribute to frozen modules

2014-06-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 12.06.2014 18:35, Barry A. Warsaw wrote: > > I'm -0 on this patch. I can understand that in some sense, frozen modules do > semantically have an associated file, but OTOH, once they're frozen the > connection to their file is

[issue21737] runpy.run_path() fails with frozen __main__ modules

2014-06-12 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- keywords: +patch Added file: http://bugs.python.org/file35596/FrozenImporter-without-__main__-support.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21737] runpy.run_path() fails with frozen __main__ modules

2014-06-12 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: The logic in runpy.run_path() assumes that removing the __main__ entry from sys.modules is enough to be able to use the module search logic for e.g. importing packages and ZIP files (with embedded __main__.py files). In Python 3.4 (and probably also 3.3

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: While the current patch does not resolve the issue, I'm leaving the issue closed and have instead opened a new Issue21736 which tracks the idea to add a __file__ attribute to frozen modules per de

[issue21736] Add __file__ attribute to frozen modules

2014-06-12 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- keywords: +patch Added file: http://bugs.python.org/file35595/__file__-for-frozen-modules.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21736] Add __file__ attribute to frozen modules

2014-06-12 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: The missing __file__ attribute on frozen modules causes lots of issues with the stdlib (see e.g. Issue21709 and the stdlib test suite) and other tools that expect this attribute to always be present. The attached patch for 3.4.1 adds this attribute to

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.06.2014 13:22, Vinay Sajip wrote: > > Vinay Sajip added the comment: > >> Please also add some comment explaining why this is done in this way. > > Natürlich :-) Prima :-) >> it may be worthwhile introducing some g

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.06.2014 12:32, Vinay Sajip wrote: > > Vinay Sajip added the comment: > >> _srcfile is only used to identify the caller's stack frame > > Not quite. It's also used to indicate whether findCaller() should be called >

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.06.2014 11:25, Vinay Sajip wrote: > > Vinay Sajip added the comment: > >> Could you please use a fix that works for Python tools in general? > > I suggested an alternative implementation altogether in Issue #16778, but it &g

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Hi Vinaj, thanks for the patch, but it doesn't really help outside of py2exe. The sys.frozen flag is not an official Python API and it's unlikely to become one, since you can freeze the whole application or just parts of it, which sys.frozen wo

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The issue is similar to Issue20884. -- ___ Python tracker <http://bugs.python.org/issue21709> ___ ___ Python-bugs-list mailin

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-10 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: It is not when freezing the logging package, so any use of the logging package fails: >>> import logging Traceback (most recent call last): File "", line 1, in File "/importlib/_bootstrap.py", line 2237, in _fin

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 10.06.2014 18:28, Steve Dower wrote: > > The one concession that the Windows dev is willing to make is for logging, in > which case the version number should be read as a string from a standard DLL > like kernel32.dll. This would be app

[issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code()

2014-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The fix is easy. Simply change the call to: return types.CodeType(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize, co.co_flags, co.co_code, tuple(consts

[issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code()

2014-06-10 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: Here's the code: def replace_paths_in_code(self, co): ... return types.CodeType(co.co_argcount, co.co_nlocals, co.co_stacksize, co.co_flags, co.co_code, tuple(consts), co.co_

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I don't have a Windows 8.1 handy, but if "ver" reports the correct version, why not have platform.win32_ver() use _syscmd_ver() in case the other APIs report "6.2.9200" and then have win32_ver() the higher version ?! FWIW: I

[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 19.05.2014 12:24, Christian Heimes wrote: > > How about you take my back port from > https://bitbucket.org/tiran/backports.pbkdf2/ and remove all Python 3.x > related code? :) I spent a lot of time to make the code as fast as possible

[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Some comments: * Python 2.7 ships with OpenSSL 0.9.8 on Windows, so the Python version will always get used on that platform, so it needs to be fast. * The iterations loop should use xrange instead of range * The .encode('ascii') in _long_t

[issue21470] Better seeding for the random module

2014-05-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 13.05.2014 11:06, Antoine Pitrou wrote: > > Is ~/.rnd any kind of serious? It hasn't been modified since two weeks on my > system (which is rebooted every day). The file is apparently only updated if you use one the OpenSSL commands whic

[issue21470] Better seeding for the random module

2014-05-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: neologix: According to man rand(3ssl), OpenSSL uses an internal state of 1023 bytes for the RNG. You only see it reading 32 bytes from /dev/urandom in the strace because it has already loaded 1024 bytes from the RNG state file ~/.rng before adding

[issue7850] platform.system() should be "macosx" instead of "Darwin" on OSX

2014-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Removing 2.7 as target, since this is a new feature. -- versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/issue7

[issue7850] platform.system() should be "macosx" instead of "Darwin" on OSX

2014-05-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Caelyn: Thanks for the patch. Some comments: * Please use aliased=False instead of aliased=0 in the patch. * It would be great if you could enhance the test a bit to actually check the return value. This would need a mock of the os.uname API for the test

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: FWIW: I don't think we need to manage the news entries in the NEWS file. Instead, we could simply add a field to the bug tracker called "news entry" and populate that as necessary. During release, this information can then be used to create

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-03-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks for your answers. I think the best way forward would be to some up with an official encoding map of the TCVN 5712:1999 encoding, translate that into a format that gencodec.py can use and then add the generated codec to Python 3.5. We can then add the

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-03-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Retargeting to 3.5, since all other releases don't allow addition of new features. -- versions: +Python 3.5 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/is

[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-03-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Some comments: * Please provide some background information how widely the encoding is used. I get less than 1000 hits in Google when looking for "TCVN 5712:1993". Now, the encoding was a standard in Vietnam, but it has been updated in 1999 to

[issue16047] Tools/freeze no longer works in Python 3

2014-03-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Christian, please open a separate ticket for your problem. This ticket is about getting freeze, the tool itself, working, not any other issue you may find with the resulting frozen binary. Thanks, -- Marc-Andre Lemburg eGenix.com

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Wait, Brett :-) The issue that Christian mentioned was just a side discussion. We still need to fix the main problem. -- resolution: invalid -> status: closed -> open ___ Python tracker

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.03.2014 19:41, M.-A. Lemburg wrote: > I'll have to have a look at how the pyscopg2 package normally > imports its C extension. It's likely that they will have to use > something like this to make things work for frozen app

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.03.2014 19:27, Brett Cannon wrote: > > Brett Cannon added the comment: > > OK, so trying to import around the package was definitely why the first > instance didn't work so that's all expected. > > As for the fail

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.03.2014 17:47, Christian Bachmaier wrote: > > Christian Bachmaier added the comment: > >> To test what I asked for, please run freeze on this script: >> >> """ >> import _psycopg2 Sorry. The abo

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.03.2014 16:21, Christian Bachmaier wrote: > > Sorry I forgot: PyRun seems only support Python 2.x. Right, because PyRun uses freeze and freeze currently does not work for Python 3. Which is what this ticket is all about and why I opened it. T

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.03.2014 13:02, Christian Bachmaier wrote: > > Christian Bachmaier added the comment: > > # ldd hello > linux-vdso.so.1 => (0x7fffd677e000) > libpython3.4m.so.1.0 => > /usr/lib/x86_64-lin

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.03.2014 11:37, Christian Bachmaier wrote: > > Martin: this is clearly a bug, as it is now (Python 3.3 onwards) impossible > to use an external module (in a .so) from a frozen binary. Are you sure about this ? If you freeze an applicat

[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Will these patches still make it into the Python 3.4 branch ? -- ___ Python tracker <http://bugs.python.org/issue16

[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 21.03.2014 12:42, Donald Stufft wrote: > >>> If we enforce a specific set of ciphers per default and a user finds >>> that a server he wants to communicate with for example only supports >>> RC4 ciphers, because that's

[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 21.03.2014 00:10, Donald Stufft wrote: > >> We shouldn't do this in Python for the same reason we're not including >> a predefined set of CA root certificates with the distribution. > > The difference here is tha

[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.03.2014 21:52, Alex Gaynor wrote: > > It's also worth noting that users appear to be FAR more likely to have an up > to date Python than they are an up to date OpenSSL, meaning that if a change > needs to be made, we're much

[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.03.2014 23:36, Donald Stufft wrote: > > Donald Stufft added the comment: > > I'm still looking into what "HIGH" entails across all the various OpenSSLs > that are in production that I can access. That "FUD"

[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.03.2014 15:11, Donald Stufft wrote: > > The compatibility of this is pretty good. The only time this should cause a > connection to *fail* is if a server is using an insecure cipher and in that > case you can re-enable it by simply

[issue20906] Issues in Unicode HOWTO

2014-03-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 20.03.2014 11:49, Graham Wideman wrote: > >> An encoding is a mapping of characters to ordinals, nothing more or less. > > In unicode, the mapping from characters to ordinals (code points) is not the > encoding. It's the mapp

[issue20906] Issues in Unicode HOWTO

2014-03-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Just to clarify a few things: On 20.03.2014 00:50, Graham Wideman wrote: > > I think part of the ambiguity problem here is that there are two subtly but > importantly different ideas here: > > 1. Python string (capable of representing a

<    1   2   3   4   5   6   7   8   9   10   >