Re: codecs.register_error for strict, unicode.encode() and str.decode()

2012-07-27 Thread Peter Otten
Alan Franzoni wrote: Hello, I think I'm missing some piece here. I'm trying to register a default error handler for handling exceptions for preventing encoding/decoding errors (I know how this works and that making this global is probably not a good practice, but I found this strange

Re: from future import pass_function

2012-07-27 Thread Ulrich Eckhardt
Am 26.07.2012 09:50, schrieb Mark Lawrence: And if we could persuade the BDFL to introduce braces, we could have {() and }() What do you mean persuade? Braces work perfectly: def foo(): {} grin, duck and run faster as the impacts get closer Uli --

Re: Generating valid identifiers

2012-07-27 Thread Laszlo Nagy
As a side note, the odds of having at least one hash collision among multiple tables are known as the birthday problem. At 4 hex digits there are 65536 possible digests, and it turns out that at 302 tables there is a 50% chance that at least one pair of those names have the same 4-digit

Re: Generating valid identifiers

2012-07-27 Thread Laszlo Nagy
Unless an attacker can select the field names, in which case they may be able to improve those odds significantly. In the case of MD5, they can possibly improve those odds to 1 in 1, since MD5 is vulnerable to collision attacks. Not so for some (all?) of the SHA hashes, at least not yet, but

regexps to objects

2012-07-27 Thread andrea crotti
I have some complex input to parse (with regexps), and I would like to create nice objects directy from them. The re module doesn't of course try to conver to any type, so I was playing around to see if it's worth do something as below, where I assign a constructor to every regexp and build an

Re: Generating valid identifiers

2012-07-27 Thread Laszlo Nagy
With 16 ** 10 possible digests, the probability of collision hits 50% at 1234605 tables Actually, I'm using base64 encoding. So it is 64**10. I guess using 6 characters will enough. -- http://mail.python.org/mailman/listinfo/python-list

Re: regexps to objects

2012-07-27 Thread Peter Otten
andrea crotti wrote: I have some complex input to parse (with regexps), and I would like to create nice objects directy from them. The re module doesn't of course try to conver to any type, so I was playing around to see if it's worth do something as below, where I assign a constructor to

Re: reloading code and multiprocessing

2012-07-27 Thread andrea crotti
2012/7/25 andrea crotti andrea.crott...@gmail.com: I would also like to avoid this in general, but we have many subprocesses to launch and some of them might take weeks, so we need to have a process which is always running, because there is never a point in time where we can just say let's

Re: ANN: dbf.py 0.94.003

2012-07-27 Thread Ethan Furman
Simon Cropper wrote: On 27/07/12 05:31, Ethan Furman wrote: A few more bug fixes, and I actually included the documentation this time. :) It can be found at http://python.org/pypi/dbf, and has been tested on CPythons 2.4 - 2.7, and PyPy 1.8. [snip] Ethan, That's great. Can you comment on

dynamic setattr

2012-07-27 Thread Mariano Di Felice
Hi, I have a property file (.ini) that has multiple sections and relative keys, as default structure. Now, I would like to export from my utility class methods getter and setter. I have started as is: class Utility: keys = {STANDUP: [st_key1, st_key2, st_key3, st_key4],

Re: dynamic setattr

2012-07-27 Thread Steven D'Aprano
On Fri, 27 Jul 2012 05:49:45 -0700, Mariano Di Felice wrote: Hi, I have a property file (.ini) that has multiple sections and relative keys, as default structure. Have you looked at Python's standard INI file library? http://docs.python.org/library/configparser.html Now, I would like

Re: dynamic setattr

2012-07-27 Thread Mariano Di Felice
Hi Steven, Sorry for inconvenients. I've posted unsyntax example just typing from here, just for exaplain my problem Finally, I don't understand why every set_key set value on wrong section/key. I think setattr syntax is correct, but it doesn't works! About java/python concept, yeah! You all

argparse limitations

2012-07-27 Thread Benoist Laurent
Hi, I'm impletting a tool in Python. I'd like this tool to behave like a standard unix tool, as grep for exemple. I chose to use the argparse module to parse the command line and I think I'm getting into several limitations of this module. First Question. How can I configure the the

Re: argparse limitations

2012-07-27 Thread Oscar Benjamin
On 27 July 2012 15:26, Benoist Laurent beno...@ibpc.fr wrote: Hi, I'm impletting a tool in Python. I'd like this tool to behave like a standard unix tool, as grep for exemple. I chose to use the argparse module to parse the command line and I think I'm getting into several limitations of

PyCon for students?

2012-07-27 Thread Devin Jeanpierre
Hey guys, I recently saw a post saying that PyCon for students' price was dropped to $100. If you are trying to attract students, why not move PyCon to take place during the summer? As far as I know, summer vs spring makes no difference to any members of the general working population (except for

Re: Initial nose experience

2012-07-27 Thread Roy Smith
In article roy-f2685a.08422113072...@news.panix.com, Roy Smith r...@panix.com wrote: Lastly, nose, by default, doesn't say much. When things go wrong and you have no clue what's happening, --verbose and --debug are your friends. I found another example of nose not saying much, and this

Re: argparse limitations

2012-07-27 Thread Benoist Laurent
Le Jul 27, 2012 à 4:43 PM, Oscar Benjamin a écrit : On 27 July 2012 15:26, Benoist Laurent beno...@ibpc.fr wrote: Hi, I'm impletting a tool in Python. I'd like this tool to behave like a standard unix tool, as grep for exemple. I chose to use the argparse module to parse the command

Re: argparse limitations

2012-07-27 Thread Peter Otten
Benoist Laurent wrote: I'm impletting a tool in Python. I'd like this tool to behave like a standard unix tool, as grep for exemple. I chose to use the argparse module to parse the command line and I think I'm getting into several limitations of this module. First Question. How can I

Re: argparse limitations

2012-07-27 Thread Ian Kelly
On Fri, Jul 27, 2012 at 9:19 AM, Benoist Laurent beno...@ibpc.fr wrote: That's the solution I came to. But I'm not very happy with this since I can definitively not make my program act as a standard unix tool. Any other solution? I don't understand; that's pretty much the same way that

Re: argparse limitations

2012-07-27 Thread Ian Kelly
On Fri, Jul 27, 2012 at 10:26 AM, Ian Kelly ian.g.ke...@gmail.com wrote: It may be a bit awkward having to type -i once per file in the command line, but it does clear up the ambiguity. Or you could bite the bullet and make the input files argument part of the subparser, which you may find

Re: argparse limitations

2012-07-27 Thread Benoist Laurent
Yes basically looks like you get it. I have to further test it but my first impression is that it's correct. So actually the point was to use nargs=?. Thank you very much. Ben Le Jul 27, 2012 à 5:44 PM, Peter Otten a écrit : Benoist Laurent wrote: I'm impletting a tool in Python. I'd

Re: PyCon for students?

2012-07-27 Thread Michael Hrivnak
Having a conference during the summer is generally more expensive, because you have to compete with tourists for lodging and such. For this reason, summer-time conventions are often in places where nobody wants to be during the summer, like Phoenix. That said, Santa Clara probably isn't a cheap

Search and replace text in XML file?

2012-07-27 Thread todd . tabern
I'm looking to search an entire XML file for specific text and replace that text, while maintaining the structure of the XML file. The text occurs within multiple nodes throughout the file. I basically need to replace every occurrence C:\Program Files with C:\Program Files (x86), regardless of

Re: Search and replace text in XML file?

2012-07-27 Thread Jason Friedman
I'm looking to search an entire XML file for specific text and replace that text, while maintaining the structure of the XML file. The text occurs within multiple nodes throughout the file. I basically need to replace every occurrence C:\Program Files with C:\Program Files (x86),

[issue15461] os.stat() 's inappropriate behavior when dealing with a broken link in linux systems.

2012-07-27 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: For the sake of completeness: what you're looking for is os.lstat. -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15461 ___

[issue14578] importlib doesn't check Windows registry for paths

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: So I tried to make proper changes in _bootstrap.py, and regenerate importlib.h on Linux. I don't have any Windows machine; all this is completely untested, but at least it can help some Windows developer to finish the work, and write

[issue14578] importlib doesn't check Windows registry for paths

2012-07-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14578 ___ ___ Python-bugs-list mailing

[issue12034] check_GetFinalPathNameByHandle() suboptimal

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thank you, patch looks fine to me. It will have to wait for after the 3.3 release, though, since we are now in feature freeze. -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker

[issue15465] Improved documentation for C API version info

2012-07-27 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: As far as I can tell, the only mentions of the C API version macros are: 1. In the prose for the stable ABI section (incidentally: this section has a typo in the title) 2. In the documentation for sys.hexversion There should be a clear API

[issue15465] Improved documentation for C API version info

2012-07-27 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15465 ___ ___

[issue14578] importlib doesn't check Windows registry for paths

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I would really like to release beta2 this weekend. Is it possible to get this resolved by then? At worse, perhaps 3.3 can be released without this feature. I don't know who relies on it. -- nosy: +pitrou

[issue15463] test_faulthandler can fail if install path is too long

2012-07-27 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: faulthandler has arbitrary limits to avoid an unlimited loop if some data are corrupted. #define MAX_STRING_LENGTH 100 #define MAX_FRAME_DEPTH 100 #define MAX_NTHREADS 100 The string limit is maybe too short. MAX_STRING_LENGTH can be

[issue14578] importlib doesn't check Windows registry for paths

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: pywin32 used to install modules this way, but it seems it doesn't anymore: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/file/16707e6f1624/pywin32_postinstall.py#l307 # It is possible people with old versions installed with

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-27 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Any objections to committing this before beta2? What about the len view-len change: Does that look reasonable? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834

[issue12556] Disable size checks in mmap.mmap()

2012-07-27 Thread Ricky Ng-Adam
Ricky Ng-Adam rnga...@lophilo.com added the comment: I find this resolution to rejected somewhat questionable. It has been pointed that the mmap behavior in Python differs from the behavior of the underlying mmap as defined by the system documentation. I think the incorrect assumption here

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Here is a minimal patch against default. It is a clear improvement on the current situation, even though it still cannot handle the case class Error(Exception): def __init__(self, x): Exception.__init__(self) self.x = x

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Added file: http://bugs.python.org/file26537/init_args.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1692335 ___

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d2f448dbc30d by Richard Oudkerk in branch 'default': Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path. http://hg.python.org/cpython/rev/d2f448dbc30d -- nosy: +python-dev

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here's a patch. A new project, _freeze_importlib, has the necessary prerequisites and runs the executable, generating importlib.h, as a post-build step. I'm not sure if we should make this project a pre-requisite of any other

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: There should be an actual pickling / unpickling test, so that this doesn't regress by mistake. Le vendredi 27 juillet 2012 à 11:01 +, Richard Oudkerk a écrit : Changes by Richard Oudkerk shibt...@gmail.com: Added file:

[issue15041] tkinter documentation: update see also list

2012-07-27 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Ok -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15041 ___ ___ Python-bugs-list

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: ExceptionTests.testAttributes already checks the attributes of unpickled copies (using all protocols). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1692335

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: ExceptionTests.testAttributes already checks the attributes of unpickled copies (using all protocols). Ok, sorry for the noise then. -- ___ Python tracker rep...@bugs.python.org

[issue15466] Python/importlib.h is different on 32bit and 64bit

2012-07-27 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: As shown in a patch in issue15431, frozen.c does not output the same data on different platforms. The first difference looks like this (extracted from the patch): -101,73,255,255,255,255,0,0,0,0,40,10,0,0,0,117, +

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: IMO dependencies is not a big issue here. In the worst case, the developer can build a second time... I think your patch won't work on Unix machines: _freeze_importlib.c is linked with all Python files *except* frozen.c which defines

[issue15466] Python/importlib.h is different on 32bit and 64bit

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I realize that uppercase I and lowercase L are easily confused: On first row, 'I' (=TYPE_INT64) followed by 0x on 8 bytes. On second row, 'l' (=TYPE_LONG) followed by 3 followed by 0x (in 3 chunks of 15 bits).

[issue1062277] Pickle breakage with reduction of recursive structures

2012-07-27 Thread Stefan Mihaila
Changes by Stefan Mihaila mstefa...@gmail.com: -- nosy: +mstefanro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1062277 ___ ___ Python-bugs-list

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Georg, need a call on how close you are to cutting beta 2 and whether you want this to wait until rc1. -- nosy: +benjamin.peterson, georg.brandl priority: normal - release blocker ___ Python tracker

[issue15466] Python/importlib.h is different on 32bit and 64bit

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I suggest to remove this distinction, and allow TYPE_INT64 on all platforms. You have to find a 64-bit C int type that works on all platforms and for which a PyLongAsXXX() function exists, though. Or perhaps you want to restrict yourself to

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Summary of my review for Georg's benefit: I had one minor formatting nit with the patch (which Stefan can easily fix before committing), but it otherwise looked fine to me. I also agree that the old implicit truncation was unusable in

[issue15466] Python/importlib.h is different on 32bit and 64bit

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: My primary goal is to have a stable importlib.h, and currently all developer work on machines where PY_LONG_LONG is 64bit. So the restriction is OK. -- ___ Python tracker

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Okay, so LGTM. Let’s ask the RMs if this is a new behavior or a bugfix. -- nosy: +benjamin.peterson, georg.brandl versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2012-07-27 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4e85e4743757 by Richard Oudkerk in branch '2.7': Issue #6056: Make multiprocessing use setblocking(True) on the sockets it uses. http://hg.python.org/cpython/rev/4e85e4743757 New changeset 290f04722be3 by Richard

[issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py

2012-07-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Compare: running the command above without warnings is not sufficient for PyPI to convert the content successfully. being able to run the command above without warnings is not sufficient to be sure that PyPI will convert the content

[issue15364] sysconfig confused by relative paths

2012-07-27 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The current patch should be fine, although it is IMHO not the long-term solution. For installed python's get_config_var('srcdir') still lies, but now at least returns slightly more sane path. As I noted before the real problem is that

[issue9269] Cannot pickle self-referencing sets

2012-07-27 Thread Stefan Mihaila
Stefan Mihaila mstefa...@gmail.com added the comment: Attaching patch for fixing a test and adding better testing of sets. -- Added file: http://bugs.python.org/file26539/sets-test.patch ___ Python tracker rep...@bugs.python.org

[issue9269] Cannot pickle self-referencing sets

2012-07-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: belopolsky - dependencies: -Pickle breakage with reduction of recursive structures stage: needs patch - patch review versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue14330] don't use host python, use host search paths for host compiler

2012-07-27 Thread Matthias Klose
Matthias Klose d...@debian.org added the comment: just back in DE today, but still travelling. Won't be able to look at this before late Monday. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14330

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Temporarily making this a blocker to see if Georg considers this a bugfix or feature. -- nosy: +benjamin.peterson priority: critical - release blocker ___ Python tracker rep...@bugs.python.org

[issue15466] Python/importlib.h is different on 32bit and 64bit

2012-07-27 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15466 ___ ___ Python-bugs-list

[issue14135] check for locale changes in test.regrtest

2012-07-27 Thread Atsuo Ishimoto
Atsuo Ishimoto ishim...@gembook.org added the comment: Patch to check if locale was changed. Since I'm not sure where to put tests for test.regrtest, I created new file, test.test_regrtest. -- keywords: +patch nosy: +ishimoto Added file:

[issue15467] Updating __sizeof__ tests

2012-07-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka storch...@gmail.com: The proposed patches move to test.support some functions, which will be useful for testing __sizeof__. The next few patches will use it. Also in 3.3 some bugs have fixed, now n is used for Py_ssize_t and Py_hash_t (which is not long

[issue15467] Updating __sizeof__ tests

2012-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file26542/sizeof_tests-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15467 ___

[issue15467] Updating __sizeof__ tests

2012-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file26543/sizeof_tests-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15467 ___

[issue9216] FIPS support for hashlib

2012-07-27 Thread Daniel Holth
Daniel Holth dho...@fastmail.fm added the comment: While you are at it, can you edit the docs to put md5() at the bottom of the page at the back of the list in a 2-point font and raise a DeprecationWarning(This function is totally lame, and it is slower than SHA-3, get with the program.) the

[issue9216] FIPS support for hashlib

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: While you are at it, can you edit the docs to put md5() at the bottom of the page at the back of the list in a 2-point font and raise a DeprecationWarning(This function is totally lame, and it is slower than SHA-3, get with the program.) the

[issue15468] Edit docs to hide hashlib.md5()

2012-07-27 Thread Daniel Holth
New submission from Daniel Holth dho...@fastmail.fm: md5() has been obsolete since 1996. It has no place as the first item in hashlib's list of guaranteed to be available hashes, and it doesn't work when Python has been compiled to be FIPS-compliant. The documentation should be edited to make

[issue15469] Correct __sizeof__ support for deque

2012-07-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka storch...@gmail.com: Here is a patch that implements correct __sizeof__ for collections.deque. Test depends on issue15467. -- components: Library (Lib) files: deque_sizeof.patch keywords: patch messages: 166578 nosy: storchaka priority: normal

[issue15469] Correct __sizeof__ support for deque

2012-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +rhettinger Added file: http://bugs.python.org/file26545/deque_sizeof-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15469

[issue15469] Correct __sizeof__ support for deque

2012-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file26546/deque_sizeof-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15469 ___

[issue15470] Stuck/hang when reading ssl object

2012-07-27 Thread Seamus McKenna
New submission from Seamus McKenna seamus.mcke...@intunenetworks.com: My python scripting has been running for several weeks periodically sending out emails. However the script has been stuck for the last 24 hrs. No parts of my script have been executed in this period. On terminating the

[issue15467] Updating __sizeof__ tests

2012-07-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The problem is that this adds new features to test_support, which can only be done in 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15467

[issue15411] os.chmod() does not follow symlinks on Windows

2012-07-27 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15411 ___ ___

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: BTW, BaseException_init() has the code Py_XDECREF(self-args); self-args = args; Py_INCREF(self-args); Presumably the Py_XDECREF(self-args) would be better replaced by Py_CLEAR(self-args)? --

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Thank you. I see how I must change the linkage on PC Only, although I wonder why tuen unix version isn't simply doing something similar.. The marshaled code was indeed created using 64 bits. I was unsure whether to include that

[issue14578] importlib doesn't check Windows registry for paths

2012-07-27 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: I would really like to release beta2 this weekend. Is it possible to get this resolved by then? As others stated, I'm not sure it's entirely necessary. Given the two dependencies that need to be fixed before this one can move forward, I

[issue15468] Edit docs to hide hashlib.md5()

2012-07-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15468 ___ ___

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If you look at Makefile.pre.in, you'll see that on Unix it builds a special binary: Modules/_freezeimportlib.c; it uses most of Python machinery (except importlib, of course), and manually open importlib/_bootstrap.py, compiles it,

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- Removed message: http://bugs.python.org/msg166584 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15431 ___

[issue15471] importlib's __import__() argument style nit

2012-07-27 Thread Barry A. Warsaw
New submission from Barry A. Warsaw ba...@python.org: Very minor style nit. In general, it's not considered good style to use mutable objects in default argument values. importlib's _bootstrap.__import__() does just this for its globals, locals, and fromlist arguments. The implementation

[issue15468] Edit docs to hide hashlib.md5()

2012-07-27 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: The only edit that is needed is for md5 to be documented as unavailable when Python has been compiled in FIPS-compliant mode. Most of the world does not and will never use that mode. md5 is still a perfectly good algorithm for many uses and

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: (Sorry for the previous message, it was wrong, and I also pressed the wrong button...) A Unix Makefile cannot stand circular dependencies, so _freezeimportlib.c cannot depend on frozen.o. OTOH it's not simple to have almost-similar

[issue15470] Stuck/hang when reading ssl object

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, the traceback shows it's stuck trying to read from the network. It doesn't mean it's stuck in the ssl library; unless your script was taking 100% CPU when you killed it, it was most likely waiting for the peer (a SMTP server, I guess) to

[issue15431] Cannot build importlib.h on Windows

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'll wait for an update for the 64 bit issue. I don't think it's necessary, it's a pretty minor issue since the generated bytecode is portable anyway. -- dependencies: -Python/importlib.h is different on 32bit and 64bit nosy: +pitrou

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Presumably the Py_XDECREF(self-args) would be better replaced by Py_CLEAR(self-args)? Ah, yes, definitely. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1692335

[issue15464] ssl: add set_msg_callback function

2012-07-27 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com added the comment: That is one way to do it. But it would be better to use a local variable rather than an attribute of the class (because otherwise you have to worry about resetting the value if more than one test uses the same pattern). Something

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Or you could simply Py_INCREF(args) before the Py_XDECREF... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1692335 ___

[issue15468] Edit docs to hide hashlib.md5()

2012-07-27 Thread Daniel Holth
Daniel Holth dho...@fastmail.fm added the comment: Not to mention its continued popularity as a password hash, surpassed only by double-rot13. You've convinced me, it is reasonable to continue to support, nay, recommend md5 for the non-FIPS world. This hash function continues to have raving

[issue15472] Itertools doc summary table misdocuments some arguments

2012-07-27 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: In the tables near the top of http://docs.python.org/library/itertools , some functions like cycle have an example that uses “seq”, which is interpreted as “sequence” but the functions do work with any iterable. -- assignee:

[issue15473] importlib no longer uses imp.NullImporter

2012-07-27 Thread Barry A. Warsaw
New submission from Barry A. Warsaw ba...@python.org: I think this is mostly just out of date documentation, but I want to get Brett's feedback. The sys module has this to say about sys.path_importer_cache: A dictionary acting as a cache for finder objects. The keys are paths that have been

[issue1234674] filecmp.cmp's shallow option

2012-07-27 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- nosy: +cjerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1234674 ___ ___

[issue15468] Edit docs to hide hashlib.md5()

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The hashlib doc starts with Warning: Some algorithms have known hash collision weaknesses, see the FAQ at the end (the FAQ at the end is a link to a Wikipedia article). The sentence Included are the FIPS secure hash algorithms SHA1, SHA224,

[issue15460] SQLite cursor.description is not DB-API compatible

2012-07-27 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python, tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15460

[issue15439] Include Misc/ACKS names into the documentation

2012-07-27 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15439 ___ ___

[issue15439] Include Misc/ACKS names into the documentation

2012-07-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: OK, I propose to completely drop the Doc/ACKS.txt from the documentation, and replace it with the words Sounds good to me. -- ___ Python tracker rep...@bugs.python.org

[issue15460] SQLite cursor.description is not DB-API compatible

2012-07-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15460 ___ ___ Python-bugs-list mailing

[issue15418] 2to3 docs should mention setup.py fixes required to install compatible packages in Python 3

2012-07-27 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15418 ___ ___

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Or you could simply Py_INCREF(args) before the Py_XDECREF... But won't self-args point to a broken object while any callbacks triggered by Py_XDECREF() are run? An alternative would be tmp = self-args; self-args = args;

[issue15467] Updating __sizeof__ tests

2012-07-27 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Can we get around this by renaming check_sizeof into _check_sizeof? Or would we have to duplicate these auxiliary functions in every test file with __sizeof__ test? -- ___ Python tracker

[issue15474] Differentiate decorator and decorator factory in docs

2012-07-27 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: Some of the confusion encountered when writing decorators arise from the difference between a decorator (@something) and a decorator factory (@something(args)). It would help to adopt this clearer terminology in our docs: a decorator takes

  1   2   >