Leo 5.0 beta 2 released

2014-11-18 Thread edreamleo
Leo 5.0b2 is now available at: http://sourceforge.net/projects/leo/files/Leo/ This release fixes several installation issues and updates installation instructions for Linux/Ubuntu. Leo is a PIM, an IDE and an outliner. Video tutorials: http://leoeditor.com/screencasts.html Text tutorials:

Re: How modules work in Python

2014-11-18 Thread Larry Hudson
First, I'll repeat everybody else: DON'T TOP POST!!! On 11/16/2014 04:41 PM, Abdul Abdul wrote: Dave, Thanks for your nice explanation. For your answer on one of my questions: *Modules don't have methods. open is an ordinary function in the module.* Isn't method and function used

Re: caught in the import web again

2014-11-18 Thread Charles T. Smith
On Tue, 18 Nov 2014 00:00:42 -0700, Michael Torrie wrote: On 11/17/2014 03:45 PM, Steven D'Aprano wrote: Circular dependencies are not just a problem in Python, they are a problem throughout most of software design. Personally I find that duck typing eliminates a lot of the circular

How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
I have this simple code that load any Qt Designer .UI file: from PySide.QtCore import QFile from PySide.QtGui import QApplication from PySide.QtUiTools import QUiLoader def loadui(file_name): loader = QUiLoader() uifile = QFile(file_name) uifile.open(QFile.ReadOnly) ui = loader.load(uifile)

Re: How to access Qt components loaded from file?

2014-11-18 Thread Vincent Vande Vyvre
Le 18/11/2014 13:18, Juan Christian a écrit : I have this simple code that load any Qt Designer .UI file: from PySide.QtCore import QFile from PySide.QtGui import QApplication from PySide.QtUiTools import QUiLoader def loadui(file_name): loader = QUiLoader() uifile = QFile(file_name)

Re: How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
Many thanks, worked. The only problem now is that I don't have auto-complete for anything, because of this approach... I'll have to check the doc more regularly. ^^ On Tue Nov 18 2014 at 10:48:44 AM Vincent Vande Vyvre vincent.vande.vy...@telenet.be wrote: Le 18/11/2014 13:18, Juan Christian a

ANN: Leo 5.0 beta 2 released

2014-11-18 Thread edreamleo
Leo 5.0b2 is now available at: http://sourceforge.net/projects/leo/files/Leo/ This release fixes several installation issues and updates installation instructions for Linux/Ubuntu. Leo is a PIM, an IDE and an outliner. Video tutorials: http://leoeditor.com/screencasts.html Text tutorials:

Re: How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
I was doing some tests, then I tried this: app = QApplication(sys.argv) MainWindow = loadui(main.ui) MainWindow.btn.clicked.connect(MainWindow.txtbox.setText(test())) MainWindow.show() app.exec_() But I get RuntimeError: Failed to connect signal clicked()., why? The syntax is correct, I don't

Re: caught in the import web again

2014-11-18 Thread Ian Kelly
On Mon, Nov 17, 2014 at 6:20 PM, Dave Angel da...@davea.name wrote: Ian Kelly ian.g.ke...@gmail.com Wrote in message: On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel da...@davea.name wrote: In a module that might get tangled in a cycle, avoid global code that depends on other modules. Instead

Re: How to access Qt components loaded from file?

2014-11-18 Thread Vincent Vande Vyvre
Le 18/11/2014 15:49, Juan Christian a écrit : I was doing some tests, then I tried this: app = QApplication(sys.argv) MainWindow = loadui(main.ui) MainWindow.btn.clicked.connect(MainWindow.txtbox.setText(test())) MainWindow.show() app.exec_() But I get RuntimeError: Failed to connect signal

Re: How to access Qt components loaded from file?

2014-11-18 Thread Juan Christian
You can't have a slot like this: MainWindow.btn.clicked.connect(MainWindow.txtbox.setText(test())) because that's mean: connect to the return of MainWindow.txtbox.setText(test()) and it's not possible at this stage of your program. Use instead a function:

Re: caught in the import web again

2014-11-18 Thread Dave Angel
Ian Kelly ian.g.ke...@gmail.com Wrote in message: On Mon, Nov 17, 2014 at 6:20 PM, Dave Angel da...@davea.name wrote: Ian Kelly ian.g.ke...@gmail.com Wrote in message: On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel da...@davea.name wrote: In a module that might get tangled in a cycle, avoid

Re: caught in the import web again

2014-11-18 Thread Chris Angelico
On Wed, Nov 19, 2014 at 6:09 AM, Dave Angel da...@davea.name wrote: I once worked on (and then fixed) a build system that could not complete a build from clean. It needed some pieces from a previous build in order to get to the point where it was ready to build those pieces. Recursive

Re: How modules work in Python

2014-11-18 Thread sohcahtoa82
On Tuesday, November 18, 2014 12:14:15 AM UTC-8, Larry Hudson wrote: First, I'll repeat everybody else: DON'T TOP POST!!! On 11/16/2014 04:41 PM, Abdul Abdul wrote: Dave, Thanks for your nice explanation. For your answer on one of my questions: *Modules don't have methods. open is

How do you download and install HTML5TreeBuilder ?

2014-11-18 Thread Simon Evans
Dear Programmers, I have installed the HTMLParserTreebuilder and LXMLTreeBuilder downloads to my Python2.7 console, using the Windows Console 'pip install' procedure. I downloaded HTML5 files and installed them to my Python2.7 directory, and went through the 'pip install' procedure, but this

Re: How do you download and install HTML5TreeBuilder ?

2014-11-18 Thread John Gordon
In bbeeb470-aff9-4634-be0a-f9534b0ed...@googlegroups.com Simon Evans musicalhack...@yahoo.co.uk writes: I downloaded HTML5 files and installed them to my Python2.7 directory, and went through the 'pip install' procedure, but this did not work. html5lib-0.999(1).tar.gz html5lib-0.999.tar.gz

Re: How do you download and install HTML5TreeBuilder ?

2014-11-18 Thread Mark Lawrence
On 18/11/2014 21:55, Simon Evans wrote: Dear Programmers, I have installed the HTMLParserTreebuilder and LXMLTreeBuilder downloads to my Python2.7 console, using the Windows Console 'pip install' procedure. I downloaded HTML5 files and installed them to my Python2.7 directory, and went

Re: How to fix those errors?

2014-11-18 Thread Steven D'Aprano
Roy Smith wrote: In article 54694389$0$13001$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Chris Angelico wrote: You should be able to use two semicolons, that's equivalent to one colon right? ChrisA (No, it isn't, so don't take

Re: caught in the import web again

2014-11-18 Thread Dave Angel
Chris Angelico ros...@gmail.com Wrote in message: On Wed, Nov 19, 2014 at 6:09 AM, Dave Angel da...@davea.name wrote: I once worked on (and then fixed) a build system that could not complete a build from clean. It needed some pieces from a previous build in order to get to the point where

Re: How do you download and install HTML5TreeBuilder ?

2014-11-18 Thread Simon Evans
re: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Intel Atompip install html5lib Downloading/unpacking html5lib Running setup.py (path:c:\users\intela~1\appdata\local\temp\pip_build_Intel At om\html5lib\setup.py) egg_info for

Re: How to access Qt components loaded from file?

2014-11-18 Thread Chris Angelico
On Wed, Nov 19, 2014 at 5:15 AM, Juan Christian juan0christ...@gmail.com wrote: Thanks, it's working. What would be a professional approach if I want to constantly call a URL to get it's content and access this data within the GUI? Constantly doesn't make much sense when you're talking about

scipy shape

2014-11-18 Thread Abdul Abdul
I came across an example that starts as follows: from scipy.ndimage import filters img = zeros(im.shape) What does the second line mean here? Is it setting the image pixels to zero? What is shape here? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: scipy shape

2014-11-18 Thread MRAB
On 2014-11-19 02:30, Abdul Abdul wrote: I came across an example that starts as follows: from scipy.ndimage import filters img = zeros(im.shape) What does the second line mean here? Is it setting the image pixels to zero? What is shape here? It looks like it might be using numpy. If 'im' is

Re: How to fix those errors?

2014-11-18 Thread alex23
On 17/11/2014 1:06 PM, Chris Angelico wrote: You could then name it in Hebrew: Paamayim Nekudotayim. There is excellent precedent for this - it's done by a language in whose footsteps Python strives to follow. The first time I got a T_PAAMAYIM_NEKUDOTAYIM error, I just about flipped my desk

Re: Trouble getting full response content from PATCH request

2014-11-18 Thread Cameron Simpson
On 17Nov2014 20:26, John Gordon gor...@panix.com wrote: I'm working with a third-party API and I'm seeing some behavior that I can't explain. The API uses the HTTP PATCH operation to set user passwords, and in case of unacceptable passwords, the response is supposed to be an HTML document

Re: How to fix those errors?

2014-11-18 Thread Chris Angelico
On Wed, Nov 19, 2014 at 2:02 PM, alex23 wuwe...@gmail.com wrote: On 17/11/2014 1:06 PM, Chris Angelico wrote: You could then name it in Hebrew: Paamayim Nekudotayim. There is excellent precedent for this - it's done by a language in whose footsteps Python strives to follow. The first time

Re:scipy shape

2014-11-18 Thread Dave Angel
Abdul Abdul abdul.s...@gmail.com Wrote in message: I came across an example that starts as follows: from scipy.ndimage import filters img = zeros(im.shape) What does the second line mean here? Is it setting the image pixels to zero? What is shape here? This example is incomplete.

Re: How modules work in Python

2014-11-18 Thread Larry Hudson
On 11/18/2014 12:59 PM, sohcahto...@gmail.com wrote: On Tuesday, November 18, 2014 12:14:15 AM UTC-8, Larry Hudson wrote: First, I'll repeat everybody else: DON'T TOP POST!!! On 11/16/2014 04:41 PM, Abdul Abdul wrote: Dave, Thanks for your nice explanation. For your answer on one of my

[issue22095] Use of set_tunnel with default port results in incorrect post value in host header

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If call _get_hostport() in set_tunnel() then it should be removed in _tunnel(). As for tests, it would be better do not rely on implementation details. Instead you can monkey-patch the send() method of of HTTPConnection instance and check passed argument.

[issue22891] code removal from urllib.parse.urlsplit()

2014-11-18 Thread Alexander Todorov
Alexander Todorov added the comment: Does test cases pass after removal of those lines? (I will be surprised) Yes they do. Also see my detailed explanation above, there's no reason for test cases to fail. -- ___ Python tracker

[issue22314] pydoc.py: TypeError with a $LINES defined to anything

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch nosy: +serhiy.storchaka stage: - patch review type: - behavior versions: +Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37219/pydoc_ttypager_lines.patch ___

[issue22367] Please add F_OFD_SETLK, etc support to fcntl.lockf

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - needs patch versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22367 ___

[issue22370] pathlib OS detection

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - pitrou nosy: +pitrou, serhiy.storchaka type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22370 ___

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Chris. PyObject_REPR() is used only in Python/compile.c just before calling Py_FatalError(). So refcount leaks doesn't matter in these cases. PyObject_REPR() is expanded to deprecated _PyUnicode_AsString which is not defined if

[issue22652] Add suggestion about keyword arguments to this error message: builtins.TypeError: my_func() takes 1 positional argument but 2 were given

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22652 ___

[issue22895] regression introduced by the fix for issue #22462

2014-11-18 Thread Matthias Klose
New submission from Matthias Klose: the fix for issue #22462 introduces a regression in the test_pyexpat test cases. I'm not yet sure why. This is only seen when running the testsuite from the installed location, which shouldn't matter. Tried to run the tests with a stripped executable in

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread STINNER Victor
STINNER Victor added the comment: PyObject_REPR() is expanded to deprecated _PyUnicode_AsString which is not defined if Py_LIMITED_API is defined. PyObject_REPR() is still defined if Py_LIMITED_API is defined, I just checked. -- nosy: +haypo ___

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyObject_REPR() is still defined if Py_LIMITED_API is defined, I just checked. But it is expanded to undefined name. So it is not usable in any case. -- ___ Python tracker rep...@bugs.python.org

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread STINNER Victor
STINNER Victor added the comment: PyObject_REPR.patch: the first part looks good to me. For the second part, you can use PySys_FormatStderr() which is more complex but more correct: it formats the string as Unicode and then encode it to stderr encoding. PyUnicode_FromFormatV() is probably

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka wrote: But it is expanded to undefined name. So it is not usable in any case. Ah correct, I didn't notice _PyUnicode_AsString in the expanded result (I checked with gcc -E). When Py_LIMITED_API is set, PyObject_REPR(o) is expanded to

[issue22895] regression introduced by the fix for issue #22462

2014-11-18 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22895 ___ ___

[issue22462] Modules/pyexpat.c violates PEP 384

2014-11-18 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22462 ___ ___

[issue22895] regression introduced by the fix for issue #22462

2014-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please post the traceback. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22895 ___ ___ Python-bugs-list

[issue22370] pathlib OS detection

2014-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds reasonable, indeed. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22370 ___

[issue22367] Please add F_OFD_SETLK, etc support to fcntl.lockf

2014-11-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22367 ___ ___ Python-bugs-list mailing

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: PyObject_REPR() is expanded to deprecated _PyUnicode_AsString which is not defined if Py_LIMITED_API is defined. So it is unlikely that third-party code uses it Py_LIMITED_API is the stable ABI. Most third-party code doesn't use it, so it may still use

[issue22895] regression introduced by the fix for issue #22462

2014-11-18 Thread Matthias Klose
Matthias Klose added the comment: [258/383] test_pyexpat test test_pyexpat failed -- Traceback (most recent call last): File /usr/lib/python3.4/test/test_pyexpat.py, line 432, in test_exception parser.Parse(babc//b/a, 1) File ../Modules/pyexpat.c, line 405, in StartElement File

[issue22113] memoryview and struct.pack_into

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is similar to issue10212. Here is a patch which makes struct.pack_into() support new buffer protocol. Something similar should be applied to 3.x because PyObject_AsWriteBuffer() is deprecated and not safe. -- assignee: -

[issue22895] test failure introduced by the fix for issue #22462

2014-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. So, this is not a regression: the failing test was introduced in #22462 and probably would have not worked before, either. The problem is that ../Modules/pyexpat.c makes sense from the checkout directory but not necessarily from the install location.

[issue22896] Don't use PyObject_As*Buffer() functions

2014-11-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyObject_AsCharBuffer(), PyObject_AsReadBuffer() and PyObject_AsWriteBuffer() release the buffer right after acquiring and return a pointer to released buffer. This is not safe and could cause issues sooner or later. These functions shouldn't be used in

[issue22608] test_socket fails with sem_init: Too many open files

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to merge issue22608 and issue22610 and also clean up other long living event objects in tests. -- nosy: +serhiy.storchaka stage: - needs patch versions: +Python 3.4, Python 3.5 ___ Python tracker

[issue10599] sgmllib.parse_endtag() is not respecting quoted text

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Library (Lib) -None nosy: +ezio.melotti versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10599

[issue18637] mingw: export _PyNode_SizeOf as PyAPI for parser module

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - commit review type: enhancement - behavior versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue18637] mingw: export _PyNode_SizeOf as PyAPI for parser module

2014-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb25629d2a46 by Serhiy Storchaka in branch '2.7': Issue #18637: Fixed an error in _PyNode_SizeOf declaration. https://hg.python.org/cpython/rev/eb25629d2a46 New changeset ab3e8aab7119 by Serhiy Storchaka in branch '3.4': Issue #18637: Fixed an

[issue18637] mingw: export _PyNode_SizeOf as PyAPI for parser module

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18637 ___

[issue18637] mingw: export _PyNode_SizeOf as PyAPI for parser module

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Definitely this was a bug. Thank you Roumen for your patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18637 ___

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For the second part, you can use PySys_FormatStderr() which is more complex but more correct PySys_FormatStderr() is more heavy function, it depends on working sys.stderr and codecs. Taking into account the lack of tests we should be careful with such

[issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19670 ___ ___

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 18/11/2014 17:39, Serhiy Storchaka a écrit : Py_LIMITED_API is the stable ABI. Most third-party code doesn't use it, so it may still use PyObject_REPR(). So we should just add a warning? This macro is not documented anywhere. Well we can still remove

[issue17750] allow the testsuite to run in the installed location

2014-11-18 Thread Matthias Klose
Changes by Matthias Klose d...@debian.org: -- dependencies: +test failure introduced by the fix for issue #22462 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17750 ___

[issue21266] test_zipfile fails to run in the installed location

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21266 ___

[issue21032] Socket leak if HTTPConnection.getresponse() fails

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please submit a contributor form (https://www.python.org/psf/contrib/) Martin? -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - patch review versions: +Python 3.5 ___ Python tracker

[issue20948] -Wformat=2 -Wformat-security findings

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +haypo, pitrou, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20948 ___

[issue20082] Misbehavior of BufferedRandom.write with raw file in append mode

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach stage: - patch review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue20066] PyStructSequence_NewType() not setting proper heap allocation flag?

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue15729. -- components: +Interpreter Core nosy: +serhiy.storchaka stage: - needs patch versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue15729] PyStructSequence_NewType enhancement

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue20066. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15729 ___ ___

[issue21266] test_zipfile fails to run in the installed location

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue17753 (test_write_filtered_python_package was added later). -- resolution: - duplicate stage: - resolved status: open - closed superseder: - test_zipfile: requires write access to test and email.test

[issue22825] Modernize TextFile

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So you suggest just close this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22825 ___ ___

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch. -- Added file: http://bugs.python.org/file37221/PyObject_REPR_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22453 ___diff

[issue22113] memoryview and struct.pack_into

2014-11-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think you forgot to upload your patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22113 ___ ___

[issue22113] memoryview and struct.pack_into

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. Here is it. -- keywords: +patch Added file: http://bugs.python.org/file37222/struct_pack_into_memoryview.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22113

[issue22897] IDLE - MacOS: freeze on non-ASCII save with open debugger

2014-11-18 Thread Boris
New submission from Boris: When attempting to save a file containing an Aring; character with the debugger open, IDLE freezes with/or without partially opening the warning window. (Mac OS X 10.9.5, IDLE running python 2.7.5). Reproducible steps: - Create and save file with one line: 1+1 # A

[issue21280] shutil.make_archive() with default root_dir parameter raises FileNotFoundError: [Errno 2] No such file or directory: ''

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- assignee: - serhiy.storchaka keywords: +patch nosy: +hynek, serhiy.storchaka, tarek stage: - patch review type: - behavior versions: +Python 3.5 Added file: http://bugs.python.org/file37223/shutil_make_archive_in_curdir.patch

[issue20156] bz2.BZ2File.read() does not treat growing input file properly

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka priority: normal - low versions: +Python 3.5 -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20156

[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21775 ___ ___ Python-bugs-list

[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Go ahead Greg. -- assignee: - gward nosy: +serhiy.storchaka stage: - commit review versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21775

[issue20948] -Wformat=2 -Wformat-security findings

2014-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset d6d2549340cb by Victor Stinner in branch 'default': Issue #20948: Inline makefmt() in unicode_fromformat_arg() https://hg.python.org/cpython/rev/d6d2549340cb -- nosy: +python-dev ___ Python tracker

[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-11-18 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to write a unit test, maybe using unittest.mock to mock most parts? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21775

[issue20948] -Wformat=2 -Wformat-security findings

2014-11-18 Thread STINNER Victor
STINNER Victor added the comment: The format parameter passed to sprintf() is created by makefmt() function. In Python 3.5, makefmt() has a few parameters. The code is simple and looks safe. The makefmt() function was much more complex in Python 3.3, it had more parameters: zeropad, width and

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread STINNER Victor
STINNER Victor added the comment: PyObject_REPR_2.patch looks good to me, but it should only be applied to Python 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22453 ___

[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-18 Thread A. Jesse Jiryu Davis
New submission from A. Jesse Jiryu Davis: Running a unittest suite for Motor, my MongoDB driver which uses PyMongo, greenlet, and Tornado. The suite commonly segfaults during interpreter shutdown. I've reproduced this crash with Python 3.3.5, 3.4.1, and 3.4.2. Python 2.6 and 2.7 do *not*

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset e339d75a21d5 by Serhiy Storchaka in branch 'default': Issue #22453: Removed non-documented macro PyObject_REPR(). https://hg.python.org/cpython/rev/e339d75a21d5 -- nosy: +python-dev ___ Python tracker

[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-18 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: The crash can ignore whether or not I specify -Wignore on the python command line. I was hoping to avoid the crash by short-circuiting the ResourceWarning code path, since the following line appears in the backtrace: #5 PyErr_WarnFormat

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 342a619cdafb by Serhiy Storchaka in branch '3.4': Issue #22453: Warn against the use of leaking macro PyObject_REPR(). https://hg.python.org/cpython/rev/342a619cdafb New changeset 6e26b5291c41 by Serhiy Storchaka in branch '2.7': Issue #22453:

[issue22894] unittest.TestCase.subTest causes all subsequent tests to be skipped in failfast mode

2014-11-18 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22894 ___ ___ Python-bugs-list

[issue22453] PyObject_REPR macro causes refcount leak

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your reviews Victor and Antoine. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22453

[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-18 Thread Ryan Chartier
New submission from Ryan Chartier: While the parse_request is handling the requestline, it tries to force the string into iso-8859-1 using an unsupported syntax. Line #274 in server.py requestline = str(self.raw_requestline, 'iso-8859-1') Obviously, python complains. TypeError: decoding str

[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-18 Thread Georg Brandl
Georg Brandl added the comment: With the vanilla BaseHTTPRequestHandler, this shouldn't happen. self.raw_requestline is read from a socket file, which returns bytes, so they can be decoded using str(bytes, encoding). Can you please check if there are any third-party packages involved that

[issue22370] pathlib OS detection

2014-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb1d7eac601d by Antoine Pitrou in branch '3.4': Close #22370: Windows detection in pathlib is now more robust. https://hg.python.org/cpython/rev/cb1d7eac601d New changeset 712f246da49b by Antoine Pitrou in branch 'default': Close #22370: Windows

[issue22897] IDLE hangs on OS X with Cocoa Tk if encoding dialog is required during save

2014-11-18 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. It appears that all that is needed to trigger the hang is any operation that invokes the IDLE EncodingMessage dialog (Non-ASCII found, yet no encoding declared. Add a line like [...]) in IOBinding.py during a Save when IDLE is linked with

[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running

2014-11-18 Thread Ethan Furman
Ethan Furman added the comment: From a post by Ian Kelly (https://mail.python.org/pipermail/python-list/2014-November/681073.html) -- In fact it seems the behavior does differ between Python 2.7 and Python 3.4: $ cat testatexit.py

[issue22825] Modernize TextFile

2014-11-18 Thread Éric Araujo
Éric Araujo added the comment: Yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22825 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18905] pydoc -p 0 says the server is available at localhost:0

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With the patch resolved address 127.0.0.1 is printed instead of localhost. self.address[0] can be used to match current behavior of 2.7 and 3.x. And why not just initialize the url attribute in server_activate()? -- assignee: - serhiy.storchaka

[issue18731] Increased test coverage for uu and telnet

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test_encode_defaults is failed now. Don't use hardcoded filename length. And I don't understand the purpose of changes in uu.py. -- versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue22825] Modernize TextFile

2014-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your response. This was a part of large patch about migration to use of with (issue22826 and issue22831 are other parts). -- resolution: - rejected stage: patch review - resolved status: open - closed