[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Merlijn van Deen
Merlijn van Deen added the comment: Thanks for your responses! @Ezio: 1) I can see your point. On the other hand, I also think it is helpful to have a prominent note on this - the first thing people see after following the instructions is a huge list of build errors (see the bottom of this po

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread ドミトリ ステパヌシキン
ドミトリ ステパヌシキン added the comment: I embedded 2.7.2 static in iOS test app, and, at least "print "something"" is worked. Now I *sigh* need to make it compile and work on iPhone Simulator. I'll try hard, and upload working script, if I'll can fix this mess. --

[issue14879] invalid docs for subprocess exceptions with shell=True

2012-05-21 Thread anatoly techtonik
New submission from anatoly techtonik : http://docs.python.org/library/subprocess.html#exceptions documentation is wrong at least for the case when shell=True on Linux. An attempt to execute a non-existent file with: process = subprocess.Popen("sdfsdf", shell=True, stdout=subprocess.PIPE, s

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread ドミトリ ステパヌシキン
ドミトリ ステパヌシキン added the comment: actually I changed all, that was needed to build Python static library for iOS device(BTW it doesn't work for simulator, I got configure errors, I can't(or have no time if u want) to resolve), but not much changes. Want to see working script? OK, attached. Teste

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread Ronald Oussoren
Ronald Oussoren added the comment: The build script you mentioned seems to be for python 2.6, did you have to change anything beyond the version numbers to get it to build python 3.2 as well? -- ___ Python tracker

[issue1191964] asynchronous Subprocess

2012-05-21 Thread anatoly techtonik
anatoly techtonik added the comment: What is the status? What is required to get this into 3.3? See also issue14872. -- nosy: +techtonik ___ Python tracker ___ ___

[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread anatoly techtonik
anatoly techtonik added the comment: The problem with memory is more actual for machines with SSD where swap is usually turned off and /tmp files are located on memory disk. Hitting memory limit often means hard reset. My process is pretty generic that uses all streams, and I don't know how t

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue14775] Dict untracking can result in quadratic dict build-up

2012-05-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Okay, found it. The problem is _PyDict_MaybeUntrack() is potentially O(n), so calling it in every GC collection can produce quadratic runtimes when a dict is building up. Attached patch (for 3.3) only calls it in the older collections. Not sure this should be

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread ドミトリ ステパヌシキン
ドミトリ ステパヌシキン added the comment: thank You for answer. my problem was finally solved by using build script from https://github.com/cobbal/python-for-iphone and patch from http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html -- _

[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Ross Lagerwall
Ross Lagerwall added the comment: Well if you're *certain* that the process is only using one stream, then you can just use read/write on that stream. If not, it probably means you have to use either threads or select/poll. This is a known issue with subprocess; there are a few proposals on t

[issue7719] distutils: ignore .nfsXXXX files

2012-05-21 Thread Éric Araujo
Éric Araujo added the comment: Thanks, will apply. -- stage: test needed -> commit review ___ Python tracker ___ ___ Python-bugs-list

[issue14878] send statement from PEP342 is poorly documented.

2012-05-21 Thread Stephen Lacy
New submission from Stephen Lacy : There's reasonable documentation of the yield statement for most python versions under Section 6: Simple Statements, particularly 6.8 "The Yield Statement" (http://docs.python.org/release/2.7/reference/simple_stmts.html#the-yield-statement) But, there's no m

[issue7719] distutils: ignore .nfsXXXX files

2012-05-21 Thread Jeff Ramnani
Jeff Ramnani added the comment: Attached the updated patch. I have added a .nfs file to test_prune_file_list in test_sdist. I've also cleaned up the documentation to read a little better (IMO). -- Added file: http://bugs.python.org/file25668/issue7719-nfs_silly_rename.patch ___

[issue7719] distutils: ignore .nfsXXXX files

2012-05-21 Thread Jeff Ramnani
Jeff Ramnani added the comment: Hynek, I would indeed like to update this patch. I will make the updates you have suggested. -- ___ Python tracker ___

[issue4033] python search path - .pth recursion

2012-05-21 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +brett.cannon, gagenellina, gbloisi versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Pyth

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Éric Araujo
Éric Araujo added the comment: I’m also not sure of what you meant with “the *python* package”. -- nosy: +eric.araujo ___ Python tracker ___

[issue8954] wininst regression: errors when building on linux

2012-05-21 Thread Aaron Staley
Aaron Staley added the comment: I was looking over this patch (as it relates to my bug report: http://bugs.python.org/issue14877?@ok_message=msg%20161314%20created%3Cbr%3Eissue%2014877%20message_count%2C%20messages%20edited%20ok&@template=item) and noticed that this line: +if (not sel

[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2012-05-21 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +brian.curtin, tim.golden stage: -> needs patch versions: -Python 3.4 ___ Python tracker ___ ___ P

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Ezio Melotti
Ezio Melotti added the comment: 3 comments on the patch: 1) I don't think this should be mentioned in the quick start; 2) You added a link to the build_dependencies target in the build_dependencies section, why? 3) Hyphens in rst should be done with '--', not '-'. -- nosy: +brian.curti

[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2012-05-21 Thread Aaron Staley
Aaron Staley added the comment: Sorry, minor correction: We could just rely on plat_name for 64bit. All that is needed is for this table: if self.target_version < "2.4": bv = 6.0 else: bv = 7.1 to be updated to python2.

[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2012-05-21 Thread Aaron Staley
New submission from Aaron Staley : On a *nix system, bdist_wininst.get_exe_bytes will always return an open wininst-6.0.exe. However, Windows python2.7 is compiled against msvc 9.0 and ideally would take an installer based on wininst-9.0.exe. Windows-64bit needs an installer based on winins

[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Daniel Swanson
Daniel Swanson added the comment: what sort of machine has infinite memory? -- nosy: +weirdink13 ___ Python tracker ___ ___ Python-bu

[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue2771] Test issue

2012-05-21 Thread R. David Murray
R. David Murray added the comment: This is a test email reply with no MIME header. -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue14674] Link to & explain deviations from RFC 4627 in json module docs

2012-05-21 Thread Chris Rebert
Chris Rebert added the comment: Hopefully final revision. Thanks for the quick response Éric! Changes: - Cover `ensure_ascii` parameter per latest review comment - Add enhanced "Character Encodings" section for 2.x backport -- Cover `encoding` parameter & restrictions -- Cover non-implementatio

[issue14876] IDLE highlighting theme does not preview with user-selected fonts

2012-05-21 Thread Andrew McChildren
New submission from Andrew McChildren : When changing theme colors, preview window uses only default font -- components: IDLE messages: 161309 nosy: Andrew.McChildren priority: normal severity: normal status: open title: IDLE highlighting theme does not preview with user-selected fonts t

[issue1602] windows console doesn't print or input Unicode

2012-05-21 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1602] windows console doesn't print or input Unicode

2012-05-21 Thread Glenn Linderman
Glenn Linderman added the comment: I actually had to go back to 3.1.2 to get it to run, I guess I had never run with Unicode output after installing 3.2. So it isn't an incompatibility between 3.2.2 and 3.2.3, but more likely a change between 3.1 and 3.2 that invalidates this patch and worka

[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset c13066f752a8 by Ezio Melotti in branch '2.7': #14875: Use float('inf') instead of float('1e6') in the json module. http://hg.python.org/cpython/rev/c13066f752a8 New changeset 06f21c6e0f2b by Ezio Melotti in branch '3.2': #14875: Use float('inf'

[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-05-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: I believe too many issues are getting confused here. Even though the symptom appears to be the same (a complaint about _struct not being importable), the causes might be completely different, as all kinds of different configure options, compilers, and Linux

[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> ezio.melotti nosy: +ezio.melotti type: enhancement -> behavior versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread R. David Murray
Changes by R. David Murray : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue14875] Unusual way of doing 'Inf' in json library

2012-05-21 Thread Sasha B
New submission from Sasha B : If you have a look at the file 'python/Lib/json/encode.py', on line 30 it says: # Assume this produces an infinity on all machines (probably not guaranteed) INFINITY = float('1e6') FLOAT_REPR = repr Isn't float('Inf') an accepted way of doing this?

[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think the note for communicate() just means that you might get MemoryError (or some other exception) if the output is too big. But I agree it is ambiguous. communicate() uses select() on Unix and threads on Windows, so deadlocks should not be possible.

[issue14874] Faster charmap decoding

2012-05-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file25666/bench-diff.py ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14874] Faster charmap decoding

2012-05-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file25665/charmapdecodebench.py ___ Python tracker ___ ___ Python-bugs-list m

[issue14775] Slow unpickling of certain dictionaries in python 2.7 vs python 2.6

2012-05-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As I understand it (from issue #4074) tuples of atomic types are supposed to > be untracked. Actually, it is done lazily: >>> t = 1,2 >>> gc.is_tracked(t) True >>> gc.collect() 0 >>> gc.is_tracked(t) False -- __

[issue14874] Faster charmap decoding

2012-05-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Charmap decoders are not as important as UTF decoders, but are still widely used. In Python 3.3 with PEP 393 they slowed down 4x. The proposed patch restores the performance. Optimized only the most common case, when the decoder is specified by the UCS2

[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-05-21 Thread Richard West
Richard West added the comment: I also had an ImportError on _struct module during 'make install' when building 2.7.3 from source configured with --enable-shared. My solution, which *seems* to have worked, is simple: $ make -i install $ make install My guess is that the part of the 'ma

[issue4033] python search path - .pth recursion

2012-05-21 Thread Matt B
Changes by Matt B : -- nosy: +Matt.B ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Merlijn van Deen
New submission from Merlijn van Deen : The amount of errors in the solution during the windows build was surprising to me - I interpreted it as if python was not built correctly. Upon further inspection, just some extension modules were not built due to missing dependencies, and the interprete

[issue14674] Link to & explain deviations from RFC 4627 in json module docs

2012-05-21 Thread Éric Araujo
Changes by Éric Araujo : -- stage: needs patch -> commit review title: Add link to RFC 4627 from json documentation -> Link to & explain deviations from RFC 4627 in json module docs ___ Python tracker

[issue14674] Add link to RFC 4627 from json documentation

2012-05-21 Thread Éric Araujo
Éric Araujo added the comment: A message should have been sent to pyb...@rebertia.com. -- ___ Python tracker ___ ___ Python-bugs-list

[issue14651] pysetup run cmd can't handle option values in the setup.cfg

2012-05-21 Thread Éric Araujo
Éric Araujo added the comment: I have fixed the other bug in distutils2 (to be ported soon to packaging in 3.3). I wrote a test for this bug but the fix was not enough. Need to investigate more. -- ___ Python tracker

[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2012-05-21 Thread Merlijn van Deen
Merlijn van Deen added the comment: To confirm this behaviour is still current: Python 3.3.0a1+ (default:958a98bf924e+, May 21 2012, 22:18:16) [GCC 4.5.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ntpath >>> ntpath.normcase(r"c:\mixedCASE") 'c:\\

[issue14775] Slow unpickling of certain dictionaries in python 2.7 vs python 2.6

2012-05-21 Thread stw
stw added the comment: One other thing - python 2.7 added the is_tracked function to the gc module. As I understand it (from issue #4074) tuples of atomic types are supposed to be untracked. However, in python 2.7: >>> gc.is_tracked((1, 2)) True >>> gc.is_tracked("hello") True -- __

[issue14872] subprocess is not safe from deadlocks

2012-05-21 Thread anatoly techtonik
New submission from anatoly techtonik : There is no way to write a program in Python capable to process large/unlimited output coming from a subprocess stream without deadlocks. http://docs.python.org/library/subprocess.html#subprocess.Popen.communicate "Note The data read is buffered in me

[issue14775] Slow unpickling of certain dictionaries in python 2.7 vs python 2.6

2012-05-21 Thread stw
stw added the comment: Thanks for the nod to the pickletools module. The structure of the streams do change between python 2.6 and 2.7, at least for files created with cPickle. You can see this from the file sizes that I quoted in my previous post. Below are some snippets of the disassemblies

[issue13399] Don't print traceback for unrecognized actions, commands and options in packaging

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d4098ce0087 by Éric Araujo in branch 'default': Tighten tests for #13399 http://hg.python.org/distutils2/rev/7d4098ce0087 -- ___ Python tracker _

[issue14733] Custom commands don't work

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 70831fde0ec4 by Éric Araujo in branch 'default': Have pysetup read setup.cfg early to find custom commands (#14733). http://hg.python.org/distutils2/rev/70831fde0ec4 -- nosy: +python-dev ___ Python track

[issue12937] distutils2: install action should support same options as install command

2012-05-21 Thread Éric Araujo
Éric Araujo added the comment: The command line parsers need a thorough cleanup before this can be implemented. Ideally with a new, clean system the install action would just pass all its options to the install command and let it do option validation. -- dependencies: +Rewrite the co

[issue14871] Rewrite the command line parsers and actions system used in distutils2

2012-05-21 Thread Éric Araujo
New submission from Éric Araujo : At present distutils2/packaging uses many command line parsers: - one parser for commands and their options implemented in the dist.Distribution class, inherited from distutils and based on fanncy_getopt; - another parser for pysetup actions and options implem

[issue14844] netrc does not handle accentuated characters

2012-05-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Do you have a small script to reproduce the issue? -- nosy: +amaury.forgeotdarc stage: -> test needed ___ Python tracker ___ ___

[issue14862] fdopen not listed in __all__ of os.py

2012-05-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: I found two more: P_NOWAITO and _exit. Attached an updated patch. -- Added file: http://bugs.python.org/file25662/issue14862_v2.patch ___ Python tracker __

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-21 Thread Zachary Ware
Zachary Ware added the comment: Ezio's version looks pretty good to me. About the only quibble I can think of is the removal of the example uses; they still apply and do help the point. Just tacking on "Classic examples of tuples include (x, y) coordinate pairs and database records." to the

[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Andrew McNabb
Andrew McNabb added the comment: > Maybe I'm confused, but the presence of "/net/prodigy" is *not* > the issue here, and what gets mounted is *not* "/net/prodigy", > but "/net/prodigy/tmp" (do "mount" to confirm or dispute). No, /net/prodigy is the mountpoint in this case: amcnabb@sage:~ :) mo

[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Of course, I would love to see clear documentation of how the kernel > is defined to behave in this situation. It would certainly be > intuitive for mkdir("/net/prodigy/tmp") to force a mount of > "/net/prodigy", but defined behavior isn't always intuit

[issue14617] confusing docs with regard to __hash__

2012-05-21 Thread Ethan Furman
Ethan Furman added the comment: Are the changes good? Can they be commited? -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14867] chm link missing from 2.7.3 download page

2012-05-21 Thread Ned Deily
Ned Deily added the comment: Thanks for the report! The link has been added to the 2.7.3 download page. -- nosy: +benjamin.peterson, loewis, ned.deily -docs@python resolution: -> fixed stage: -> committed/rejected status: open -> closed title: chm link missing from 2.7 download page

[issue14862] fdopen not listed in __all__ of os.py

2012-05-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: Perhaps a little less contrived from libc_wrapper import fdopen from os import * where libc_wrapper might be a module built on top of ctypes. -- ___ Python tracker

[issue14702] os.makedirs breaks under autofs directories

2012-05-21 Thread Andrew McNabb
Andrew McNabb added the comment: > Which one-line fix do you propose? Doing a stat("/net/prodigy/tmp") before mkdir("/net/prodigy/tmp") is an extremely simple workaround. Of course, I would love to see clear documentation of how the kernel is defined to behave in this situation. It would cer

[issue14036] urlparse insufficient port property validation

2012-05-21 Thread Ezio Melotti
Ezio Melotti added the comment: > Ezio, I noticed that you changed from pending to open. That was an accident, I just meant to add my self to the nosy. I didn't have time yet to read all the messages and comment on the issue. -- ___ Python tracker

[issue14036] urlparse insufficient port property validation

2012-05-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: pass_to_cython(urlparse("http://google.de:99**99[to be calculated]").port) is no different than sending pass_to_cython(99**99[to be calculated]) In that case, would the former make a security loop hole in urlparse? Looks pretty contrived to

[issue14036] urlparse insufficient port property validation

2012-05-21 Thread zulla
zulla added the comment: we should at least check if the .port attribute is an intereger >= 1 and <= 65535. _because_ this is the only valid port range. otherwise, it is no valid port. but it may be a integer overflow attack attempt when a developer uses .port, he is counting on the result be

[issue14036] urlparse insufficient port property validation

2012-05-21 Thread zulla
zulla added the comment: Your comment is completely senseless, sorry. Of course such high port numbers do not exist. An attacker is counting on that. Imagine something like that pass_to_cython(urlparse("http://google.de:99**99[to be calculated]").port) -- ___

[issue14036] urlparse insufficient port property validation

2012-05-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: I am not sure if anything should be done to this request. Saying that int("99",10) is converting to 99L in Python2.7 it is a bug/security issue is hypothetical. Practically, such high port numbers cannot exist.

[issue14862] fdopen not listed in __all__ of os.py

2012-05-21 Thread Meador Inge
Meador Inge added the comment: > can you give me an example of how it could break working code? This is a bit contrived, but: # my fdopen def fdopen(fd): pass fdopen(1) # some stuff from os import * # more stuff fdopen(1) Here is a patch for 3.3 tip. After reviewing the 'os' module

[issue14136] Simplify PEP 409 command line test and move it to test_cmd_line_script

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02f13577b6fe by Nick Coghlan in branch 'default': Close #14136 by cleaning up the PEP 409 command line test (patch by Ethan Furman) http://hg.python.org/cpython/rev/02f13577b6fe -- nosy: +python-dev resolution: -> fixed stage: needs patch

[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2012-05-21 Thread Shy
Shy added the comment: For some reason this patch is disabled with #ifdefs when Py_ENABLE_SHARED is not defined. I'm compiling python as a static lib and have unresolved externals for both these functions: _Py_ActivateActCtx, _Py_DeactivateActCtx -- nosy: +shooshx __

[issue13585] Add contextlib.ExitStack

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ef66c73b1e1 by Nick Coghlan in branch 'default': Close #13585: add contextlib.ExitStack to replace the ill-fated contextlib.nested API http://hg.python.org/cpython/rev/8ef66c73b1e1 -- nosy: +python-dev resolution: -> fixed stage: -> com

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Most of the time, embedding python in this way requires precise control over PYTHONPATH and PYTHONHOME. Did you try to modify them? Something like this worked for me: putenv("PYTHONPATH=/path/to/python-3.2.3/Lib"); Py_SetPythonHome(L"/path/to/python-

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís
Lluís added the comment: Thanks for the explanation, I didn't know of the exact behavior of __debug__. I close ticket. -- resolution: -> works for me status: open -> closed ___ Python tracker ___

[issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation

2012-05-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: os.utime() uses the same notation: os.utime(path[, times, *, ns=(atime_ns, mtime_ns)]) -- nosy: +petri.lehtinen title: os.utimensat's method description uses wrong notation -> Descriptions of os.utime() and os.utimensat() use wrong notation __

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread R. David Murray
R. David Murray added the comment: I was definitely wrong about the "obvious" part, then. The 'if __debug__:' idiom is completely optimized away by -O, just like asserts are. That is, in -O mode, there is no if test, the code block is just omitted entirely. Having said that, though, I can't

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think that doing direct flistdir/fstatat calls would be more complex. We already have directory walking implemented (in default_rmtree), and I think the fd-based calls could nicely integrate with that. I'll provide a patch. -- __

[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: I agree. I’ve committed the uncontroversial and mostly unrelated 3.x patch and will look at the special cases of 2.7 now. -- ___ Python tracker _

[issue14870] os.utimensat's method description uses wrong notation

2012-05-21 Thread Hynek Schlawack
New submission from Hynek Schlawack : It says: > os.utimensat(dirfd, path[, atime=(atime_sec, atime_nsec), mtime=(mtime_sec, > mtime_nsec), flags=0]) > Updates the timestamps of a file with nanosecond precision. The atime and > mtime tuples default to None, which sets those values to the curre

[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d13fdd97cc8e by Hynek Schlawack in branch '3.2': #14804: Remove [] around optional arguments with default values http://hg.python.org/cpython/rev/d13fdd97cc8e New changeset 2293eba03348 by Hynek Schlawack in branch 'default': #14804: Remove [] arou

[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread R. David Murray
R. David Murray added the comment: Interesting. _checkquote doesn't even exist in the Python3 version of imaplib. -- components: +email -Extension Modules nosy: +barry, r.david.murray ___ Python tracker _

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís
Lluís added the comment: David, the problem is that if you have the logging inside a loop, the interpreter will have to evaluate the condition every time. With an assert you guarantee that *no code* is executed. I know that we can find thousands of ways to do that, even writing a dynamic pro

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread R. David Murray
R. David Murray added the comment: I would also, however, not be a typical Python coding pattern. Functions normally return None by default. The 'assertor True' pattern makes it reasonably clear what the intent is, which just having logging return True would not, particularly. As for e

[issue14866] 2.x, 3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread ドミトリ ステパヌシキン
ドミトリ ステパヌシキン added the comment: I tried look as deep as I can. The result from 3.2.3 port: it fails in Python/getargs.c:convertsimple():line 709, error "signed integer is less than minimum". It parses some parameters, and we have an error on last, 5th parameter. I really have no idea what hap

[issue14469] Python 3 documentation links

2012-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: http://permalink.gmane.org/gmane.comp.python.devel/132675 -- ___ Python tracker ___ ___ Python-bu

[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14869] imaplib erronously quotes atoms such as flags

2012-05-21 Thread Daniel Kinzler
New submission from Daniel Kinzler : imap consideres flags to be atoms, and atoms should not be quoted. Attempting to use a quoted flag with e.g. STORE +FLAGS will cause some servers, like dovecot, to return an error. However, imaplib apparently auto-quotes all parameters that contain a backs

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Martin proposed > to > re-implement os.fwalk inside of rmdir which I’m -1 > on. I agree that it isn't worth the hassle.

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís
Lluís added the comment: storchaka, you're right, but since non of the debug(), info() etc. functions have a return value, it would cause no trouble and would be neater to add a "return True". I'm not sure, but probably also more efficient. -- ___

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: assert logging.debug("This is a test.") or True -- nosy: +storchaka ___ Python tracker ___ ___ Py

[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Petri Lehtinen
Petri Lehtinen added the comment: The 3.x patch looks good to me. What comes to the 2.7 patch, there's at least the problem with fmtparam in the csv module (should be **fmtparams instead of [, fmtparam]). And that's were I stopped reviewing, so there may also be other errors. Maybe the proble

[issue14804] Wrong defaults args notation in docs

2012-05-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: Now we’re all on the same page – any opinions on the patches themselves? :) -- ___ Python tracker ___

[issue14868] Allow log calls to return True for code optimization.

2012-05-21 Thread Lluís
New submission from Lluís : One of the problems with the logging library is that it can affect code performance when logging calls are over-utilized. One possible solution would be to allow the compiler to remove logging calls when code is optimized with "python -O" by wrapping log calls with

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-21 Thread Hynek Schlawack
Hynek Schlawack added the comment: A small docs update: I don't list the possible functions for onerror at all anymore, as that list is likely to grow and is a PITA to maintain. People shouldn’t rely on a certain set of functions here. Martin proposed

[issue9554] test_argparse.py: use new unittest features

2012-05-21 Thread Radu Voicilas
Radu Voicilas added the comment: Hi Eric, Denver's patch should apply correctly from the root. Also, I've made the changes you mention: try: except: assert has been replaced by: with self.assertRaises() -- Added file: http://bugs.python.org/file25659/test_argparse.py.take2