[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Meador Inge
Changes by Meador Inge : -- stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-li

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Meador Inge
Meador Inge added the comment: > Cool. The test can still be committed in that branch too. The regression test for this issue was already committed for 2.7 in bcc7bf3963cc as a part of creating the unit test baseline. I just committed the bug fix to 3.2 and default. Thanks for the fix Sjoe

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 661fb211f220 by Meador Inge in branch '3.2': Issue #12618: py_compile cannot create files in current directory http://hg.python.org/cpython/rev/661fb211f220 New changeset e3647275f468 by Meador Inge in branch 'default': Issue #12618: py_compile can

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Éric Araujo
Éric Araujo added the comment: > I have attached an updated patch with a unit test. LGTM. > Also, this is not an issue for Python 2.7. The 2.7 implementation assumes any > directories mentioned in the path already exist. Cool. The test can still be committed in that branch too. -- as

[issue12618] py_compile cannot create files in current directory

2011-11-26 Thread Meador Inge
Meador Inge added the comment: > we don’t know what people do with symlinks and relative paths out > there, so I’d prefer adding a safe special case* rather than always > calling abspath. What do you think? Éric, I agree. I didn't know about the strange symlink + relative path behavior wit

[issue12618] py_compile cannot create files in current directory

2011-11-26 Thread Meador Inge
Meador Inge added the comment: The tests are fixed now. A relative path was being computed, but on Windows the current working directory drive and the drive of the relative path we were computing was different (and so this test bug would *not* be seen if running on a Windows box with a singl

[issue12618] py_compile cannot create files in current directory

2011-11-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset b23453530d5f by Meador Inge in branch '2.7': Issue #12618: fix py_compile unit tests to handle different drives on Windows http://hg.python.org/cpython/rev/b23453530d5f New changeset 7097d52cacee by Meador Inge in branch '3.2': Issue #12618: fix py

[issue12618] py_compile cannot create files in current directory

2011-11-26 Thread Meador Inge
Meador Inge added the comment: On Sat, Nov 26, 2011 at 7:17 AM, Antoine Pitrou wrote: > The tests break on the Windows buildbots: I am investigating now. -- ___ Python tracker __

[issue12618] py_compile cannot create files in current directory

2011-11-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: The tests break on the Windows buildbots: == ERROR: test_relative_path (test.test_py_compile.PyCompileTests) -- Traceback (mo

[issue12618] py_compile cannot create files in current directory

2011-11-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset bcc7bf3963cc by Meador Inge in branch '2.7': Issue #12618: create unit tests for the py_compile module http://hg.python.org/cpython/rev/bcc7bf3963cc New changeset 2be3a2e63683 by Meador Inge in branch '3.2': Issue #12618: create unit tests for the

[issue12618] py_compile cannot create files in current directory

2011-11-25 Thread Meador Inge
Meador Inge added the comment: Éric, sure, I will commit the tests sometime today. Then I will respond to the 'os.path.abspath' question as well. -- ___ Python tracker ___ ___

[issue12618] py_compile cannot create files in current directory

2011-11-23 Thread Éric Araujo
Éric Araujo added the comment: Meador, maybe you would like to commit the tests (except for the one that’s the object of this report) yourself? I don’t mind doing it, but as you have push rights now maybe you prefer to have your name directly associated with your work. -- _

[issue12618] py_compile cannot create files in current directory

2011-11-21 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12618] py_compile cannot create files in current directory

2011-11-21 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch Meador, I hadn’t realized we had no tests for py_compile (it is however used in test_import and test_compileall). I think it would be nice to commit the tests first (except for the one that’s the object of this bug report) in order to have

[issue12618] py_compile cannot create files in current directory

2011-10-25 Thread Meador Inge
Meador Inge added the comment: I think it might be easier to just always use the absolute path rather than looking at the directory length. Maybe something like the attached. I added unit tests as well. -- nosy: +meador.inge stage: test needed -> patch review Added file: http://bugs

[issue12618] py_compile cannot create files in current directory

2011-10-25 Thread Éric Araujo
Éric Araujo added the comment: I can reproduce in 3.2 and 3.3. I’ll commit a test and patch when I get the time, or another dev can take this over. -- ___ Python tracker ___ _

[issue12618] py_compile cannot create files in current directory

2011-10-24 Thread Sjoerd de Vries
Sjoerd de Vries added the comment: Hi Éric, There you go, adapted from http://effbot.org/librarybook/py-compile.htm : # File: py-compile-example-1.py import py_compile # explicitly compile this module py_compile.compile("py-compile-example-1.py","py-compile-example-1.pyc")

[issue12618] py_compile cannot create files in current directory

2011-10-21 Thread Éric Araujo
Éric Araujo added the comment: Sjoerd, can you paste the code that produces the bug? It would help create a test. -- ___ Python tracker ___ ___

[issue12618] py_compile cannot create files in current directory

2011-07-29 Thread Éric Araujo
Changes by Éric Araujo : -- keywords: +easy nosy: +eric.araujo stage: -> test needed versions: +Python 2.7, Python 3.3 ___ Python tracker ___ ___

[issue12618] py_compile cannot create files in current directory

2011-07-24 Thread Nick Coghlan
Nick Coghlan added the comment: It's rare to receive fixes from Windows users that don't have a dev environment set up (i.e. they just edited their stdlib code in place, or copied it and created a modified version). Thanks for persisting in the face of invalid assumptions on our part. --

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Sjoerd de Vries
Sjoerd de Vries added the comment: Good to hear that the patch is helpful. Again, I am just trying to be a helpful user, making a (very very little) contribution to make Python better. I am not a Python dev at all: Python is already awesome enough for me, no desire to change it :-) I just wa

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Georg Brandl
Georg Brandl added the comment: Well, we can work with this patch. Thanks. Yes, we can diff against 3.2, but for that you would have at least needed to specify * that you worked on a released version * and that that version is 3.2 Otherwise, we cannot know what to diff against. Note that e

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: It's a context patch, not a unified patch, and it is reversed :) . -- ___ Python tracker ___ _

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Sjoerd de Vries
Sjoerd de Vries added the comment: Makes no sense to me: since I don't have the trunk version, I can only diff -c against 3.2 release. Doing a diff against trunk is 1 sec of work for you. But I am just being a helpful user; so if a diff is what you want, here it is. No trouble for me, since I

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Georg Brandl
Georg Brandl added the comment: It might work right now, but in case the file changes before your change can be processed, we will lose the previous changes if we just copy in your new file. IOW, you're making our work much harder and your change is less likely to be applied. -- nosy

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Sjoerd de Vries
Sjoerd de Vries added the comment: The attached file just works. You can diff with trunk, or wherever python devs store the latest version. -- ___ Python tracker ___ ___

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Please create a patch in unified format. -- nosy: +Arfrever ___ Python tracker ___ ___

[issue12618] py_compile cannot create files in current directory

2011-07-23 Thread Sjoerd de Vries
New submission from Sjoerd de Vries : When you specify cfile to be in the current directory, an error occurs (line 133). I have fixed the file, see attached -- components: Library (Lib) files: py_compile.py messages: 140940 nosy: sjdv1982 priority: normal severity: normal status: open t