[issue1387483] sys.path

2013-04-05 Thread Charles-François Natali
Charles-François Natali added the comment: > I am not sure about what use cases could be broken by the above change, do > you have examples? > Normal use cases of symbolic links have to do with linking entire folders, > not individual files, and that behaviour would not be broken by such a >

[issue1387483] sys.path[0] when executed thru a symbolic link

2013-04-05 Thread Charles-François Natali
Charles-François Natali added the comment: I've no clue what happened to the issue title (I just replied to the email, and the title changed)... -- title: sys.path -> sys.path[0] when executed thru a symbolic link ___ Python tracker

[issue6419] Broken test_kqueue.py on OpenBSD

2013-04-05 Thread Charles-François Natali
Charles-François Natali added the comment: test_kqueue now passes on NetBSD (can't tell for OpenBSD, all buildbots are offline). I'm closing this, feel free to repon in case of problem. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _

[issue17638] test_ssl failure

2013-04-05 Thread Charles-François Natali
New submission from Charles-François Natali: test_ssl is failing on one the NetBSD buildbots: http://buildbot.python.org/all/builders/x86%20NetBSD%205.1.2%20%5BSB%5D%203.x/builds/1129/steps/test/logs/stdio """ == ERROR: test_opt

[issue17638] test_ssl failure

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, that exception is raised when the OpenSSL version doesn't have the HAVE_SSL_CTX_CLEAR_OPTIONS macro, which appeared in 0.9.8m. But the OpenSSL version on that buildbot identifies itself as "OpenSSL 0.9.9-dev 09 May 2008", which is logically posterior to

[issue1387483] sys.path[0] when executed thru a symbolic link

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Thanks for your example. > That's AFAICT exacyly the problem reported by the OP on OS-X. You are right, I mis-read the original problem. IMHO, the example you quote is "unexpected". The purpose of symbolic links is to create a "virtual" image of a str

[issue17639] symlinking .py files creates unexpected sys.path[0]

2013-04-05 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson: When .py files are assembled into a directory structure using direct symbolic links to the files, something odd happens to sys.path[0]. Consider this file structure: /pystuff/ foo.py -> /scripts/foo.py bar.py -> /libs/bar.py foo.py contains the l

[issue17639] symlinking .py files creates unexpected sys.path[0]

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: btw, this is the opposite issue to issue #1387483 -- ___ Python tracker ___ ___ Python-bugs-

[issue1387483] sys.path[0] when executed thru a symbolic link

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Closign this again. Opened up a new issue: http://bugs.python.org/issue17639 -- status: open -> closed ___ Python tracker ___

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: This problem also affects processes started by multiprocessing (although it is fixed in http://hg.python.org/sandbox/sbt#spawn). As far as I am concerned O_NOINHERIT should really have been applied by default in Python 3. You only get inheritable fds on Wind

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Like I mentioned on python-dev, it worries me a bit that this could be considered "unexpected", i.e. when there is a conflict between a legitimage attribute member of a module, and a submodule of the same name. Also, I wonder if this isn't a bigger cha

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-05 Thread STINNER Victor
STINNER Victor added the comment: See also the PEP 433 which proposes to disable file descriptor inherance by default. 2013/4/5 Richard Oudkerk : > > Richard Oudkerk added the comment: > > This problem also affects processes started by multiprocessing (although it > is fixed in http://hg.python

[issue17453] logging.config.fileConfig error

2013-04-05 Thread Hervé Coatanhay
Hervé Coatanhay added the comment: Yes it does. I fixed my configuration generation and everything is running as expected. Thanks. -- ___ Python tracker ___ ___

[issue17639] symlinking .py files creates unexpected sys.path[0]

2013-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: Adding Guido & Ned, as my recollection is that some of the weirdness in the sys.path[0] symlink resolution was to placate the test suite on Mac OS X (at least, that was a cause of failures in the initial runpy module implementation until Guido tracked down the d

[issue17639] symlinking .py files creates unexpected sys.path[0]

2013-04-05 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Brett Cannon
Brett Cannon added the comment: It won't conflict with attributes. Only if the attribute does not exist on the module already will it fall back to sys.modules. If the import finished then any attribute created from the import will already be there and thus not be an issue. But to make sure th

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: While I'm happy that this is being ackowledged as a problem, I'm not sure changing the "import x from y" semantics is necessarily a good idea. I mean, it is obvious to me that it means "import x, then getattr(x, "y")". I presume that is the meaning m

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Charles-François Natali
Charles-François Natali added the comment: > How does the test suite react if you change the order of application to > resolve symlinks only after dropping the file name from the path? Note that this will break things, see e.g. http://bugs.python.org/issue1387483#msg186063 The only backward co

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Brett Cannon
Brett Cannon added the comment: By declaring what the semantics will be to make the case even possible we are not breaking anything but making something possible. IOW it isn't even an edge case to me since there is no working case to compare against. =) --

[issue17637] Mention "What's New" in devguide's patch guidelines

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is more the duty of the committer IMO. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17637] Mention "What's New" in devguide's patch guidelines

2013-04-05 Thread Brett Cannon
Brett Cannon added the comment: Yes, but that doesn't mean it shouldn't be written down in the devguide (with appropriate note) that committers need to be thinking about this. Start good habits early. =) -- ___ Python tracker

[issue17640] from distutils.util import byte_compile hangs

2013-04-05 Thread Dmitry Sivachenko
New submission from Dmitry Sivachenko: The following problem exists in python3.3.0 and python3.3.1rc1. >From the command line it works: root@dhcp175-40-red:~ # python3 Python 3.3.1rc1 (default, Apr 5 2013, 18:03:56) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd10 Type "help", "copyright",

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Guido van Rossum
Guido van Rossum added the comment: Do not "fix" this. It is an intentional feature. There is a common pattern where one or more Python scripts are collected in some "bin" directory (presumably on the user's $PATH) as symlinks into the directory where they really live (not on $PATH, nor on sys

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: I'll add it to the list of docs updates for post-PEP 432 (similar to the import system in general finally getting reference docs in 3.3 following the migration to importlib, I hope to have improved import state initialisation docs for 3.4 if I successfully tame

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: 1) _I_ am not using symlinks this way. The hadoop scheduling processor is. This means that we cannot use Python for it withouth hacking the scripts for the special case. Presumably applications are not generally breaking when run in an artificial fi

[issue17637] Mention "What's New" in devguide's patch guidelines

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Then it should probably go in http://docs.python.org/devguide/committing.html -- ___ Python tracker ___

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: Not currently, because interpreter startup is a mess already. Overriding sys.path[0] initialisation is on the list for 3.4 already, I'm just advising strongly against piling any more complexity on top of the current rickety structure until we do something about

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sure there's some change that can be made to the scripts that solves this locally, without requiring any changes to Python. -- ___ Python tracker

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-04-05 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +stoneleaf ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Yes, of course. But I still maintain that the failure of python to work with a linktree of .py files, where the destination position of said links is arbitrary, is rather unusual, and IMHO violates the principle of least surprise. In this case, the e

[issue13922] argparse handling multiple "--" in args improperly

2013-04-05 Thread paul j3
paul j3 added the comment: There are several problems with the patch provided in msg156315 This description: "Added patch so that only the first '--' is removed by an argparse.PARSE or argparse.REMAINDER argument." should read "Added patch so that only the first '--' is removed by arguments

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: On Fri, Apr 5, 2013 at 9:07 AM, Kristján Valur Jónsson wrote: > But I can think of contrived examples where this could break things: > #a.py: > from .b import util > > #b.py > from . import a > from .util import util > > Because of the circular import order, b.u

[issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib}

2013-04-05 Thread Marten Lehmann
Marten Lehmann added the comment: Which bug ID? Couldn't find it anywhere in the previous comments. -- ___ Python tracker ___ ___ Pyth

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: Actually, after a little reflection, I can see that there are more complex conditions to analyze, if 'b' doesn't import 'b.util', but some other module imports b and sets b.util. But that's just freaking insane and whoever does that probably deserves whatever th

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: ...and I thought of *one* more way to trigger the changed behavior, which looks like: #b.py from .b import util import .a util = util.util #b/util.py def util(): pass (with the other files the same as before). I'm including it only for completeness' sake, bec

[issue17641] ssl module doc unification

2013-04-05 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': I noticed 2.X version of ssl module doc does not mention different socket methods (sendall(), accept(), etc) whereas the 3.X version does. Patch in attachment unifies the 2 docs. -- assignee: docs@python components: Documentation keywords: easy, ne

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Wow, Good analysis Phillip. So, we agree that the fallback still is a sensible fallback? Then everything is fine and I'll put my official +1 stamp of approval on this. Now... should we consider the current behavious to be a bug? 2.7 sure could do wit

[issue2292] Missing *-unpacking generalizations

2013-04-05 Thread Jeff Kaufman
Jeff Kaufman added the comment: What would it take to get this moving again? -- nosy: +Jeff.Kaufman ___ Python tracker ___ ___ Python-b

[issue6696] Profile objects should be documented

2013-04-05 Thread Tom Pinckney
Tom Pinckney added the comment: Updated based on Ezio's comments. -- Added file: http://bugs.python.org/file29683/patch3.diff ___ Python tracker ___ __

[issue2292] Missing *-unpacking generalizations

2013-04-05 Thread R. David Murray
R. David Murray added the comment: Someone needs to write the PEP. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Phillip J. Eby
Phillip J. Eby added the comment: I don't care much one way or the other about it being considered a bug in 2.x, but it might be worth considering a bug in 3.x. Either way, though, the language reference for "from import" should reflect the change, and "alternative implementations" should be inf

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Brett Cannon
Brett Cannon added the comment: It is not a bug but a change in semantics to accommodate a use-case so this will only be going into Python 3.4. -- ___ Python tracker ___ ___

[issue17343] Add a version of str.split which returns an iterator

2013-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 on os.walk returning an iterator. The API is already a bit challenging for some and our experience with itertools.groupby() is that returning an inner iterator can be very confusing. -- nosy: +rhettinger ___

[issue17343] Add a version of str.split which returns an iterator

2013-04-05 Thread Alex Gaynor
Alex Gaynor added the comment: Raymond: Is that for the wrong ticket, or was the message incorrect? :) -- ___ Python tracker ___ ___ P

[issue17343] Add a version of str.split which returns an iterator

2013-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Alex, it was response to Terry's message: http://bugs.python.org/issue17343#msg183782 FWIW, I'm +1 on an iterator version of str.split(). I'm not sure yet that it would be worthwhile to propagate the idea to other string-like objects though. -- _

[issue17641] ssl module doc unification

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch seems to be missing. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17641] ssl module doc unification

2013-04-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Shame on me and my scatterbrained head! =) -- keywords: +patch Added file: http://bugs.python.org/file29684/ssl-doc.patch ___ Python tracker

[issue17620] Python interactive console doesn't use sys.stdin for input

2013-04-05 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17641] ssl module doc unification

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Giampaolo Rodola' added the comment: > > Shame on me and my scatterbrained head! =) Thanks, looks fine to me! -- ___ Python tracker ___

[issue17637] Mention "What's New" in devguide's patch guidelines

2013-04-05 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13922] argparse handling multiple "--" in args improperly

2013-04-05 Thread paul j3
paul j3 added the comment: There's another 'feature' to the patch proposed here. It only deletes the first '--' in the list of strings passed to '_get_values' for a particular action. parser = argparse.ArgumentParser() parser.add_argument('foo') parser.add_argument('bar', nargs='*

[issue17469] Fix sys.getallocatedblocks() when running on valgrind

2013-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2bf154ca43c6 by Antoine Pitrou in branch 'default': Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks() when running on valgrind. http://hg.python.org/cpython/rev/2bf154ca43c6 -- nosy: +python-dev __

[issue17469] Fix sys.getallocatedblocks() when running on valgrind

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed, thank you! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 ___ Python tracker _

[issue16551] Cleanup the pure Python pickle implementation

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks fine to me. Do you want to go ahead? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue16804] python3 -S -m site fails

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch works ok here, but should there be a test too? -- ___ Python tracker ___ ___ Python-bugs-list

[issue15596] pickle: Faster serialization of Unicode strings

2013-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ping? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue16102] uuid._netbios_getnode() is outdated

2013-04-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16432] Template strings documentation in Python 3 refers to % substitution in present tense

2013-04-05 Thread Andrew Gorcester
Changes by Andrew Gorcester : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue17641] ssl module doc unification

2013-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 03c65fc349c0 by Giampaolo Rodola' in branch '2.7': #17641: 2.X / 3.X ssl doc unification http://hg.python.org/cpython/rev/03c65fc349c0 -- nosy: +python-dev ___ Python tracker

[issue17641] ssl module doc unification

2013-04-05 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue17449] dev guide appears not to cover the benchmarking suite

2013-04-05 Thread Edmond Burnett
Changes by Edmond Burnett : -- nosy: +edmond.burnett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17639] symlinking .py files creates unexpected sys.path

2013-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: The reason I haven't documented sys.path[0] initialisation is because I know I don't fully understand it. Path initialisation in general has a lot of historical quirks, particularly once symlinks are involved. -- ___ Py

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2013-04-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker ___

[issue17642] IDLE add font resizing hot keys

2013-04-05 Thread Raymond Hettinger
New submission from Raymond Hettinger: Add the standard hot keys for resizing fonts (i.e. on a Mac, CMD-plus and CMD-minus). -- components: IDLE keywords: easy messages: 186118 nosy: rhettinger priority: normal severity: normal stage: needs patch status: open title: IDLE add font resizi

[issue13922] argparse handling multiple "--" in args improperly

2013-04-05 Thread paul j3
paul j3 added the comment: I am working on an alternative solution that moves the '--' removal to the consume_positionals() method, and only does it if there is a corresponding '-' in the arg_strings_pattern. -- ___ Python tracker