[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread R. David Murray
R. David Murray added the comment: Here is a version that keeps things clean by not diplaying the traceback. The ctl-c does have an effect, but not a visible one unless one pays careful attention :) -- Added file: http://bugs.python.org/file38731/catch_additional_interrupt.patch

[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-03-29 Thread Robert Collins
Robert Collins added the comment: Implementation wise: this is not part of the generic rendering-of-tracebacks; I'd like to make the traceback new stuff be tastefully extensible - I'd be inclined to do this with a per-frame-callback on render (so we don't pay overhead on unrendered tb's) and

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6b41566ca28 by Victor Stinner in branch 'default': Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps https://hg.python.org/cpython/rev/f6b41566ca28 New changeset 0a8015a4ff97 by Victor Stinner in branch 'default': Issue

[issue23745] Exception when parsing an email using email.parser.BytesParser

2015-03-29 Thread R. David Murray
R. David Murray added the comment: The issue arose from the duplicated parameter name. I fixed it by (mostly) copying the error recovery used by the older api (get_param). Note that you don't need to specify both policy and _class. If you use the new policies (such as default), it

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Paul Rubin
Ben Finney ben+pyt...@benfinney.id.au writes: Then you're not in a position to defend the claim. I'm addressing my critical inquiry to the person who made the claim that they “get screwed by Python 3”. I'd say that the screw was expecting the migration to be easier than it actually was. This

[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Also incorporate __mul__ and __imul__. d = deque('abc') d * 3 deque(['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']) d *= 2 d deque(['a', 'b', 'c', 'a', 'b', 'c']) -- keywords: +needs review -patch title: Support __add__

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: I rewrite the implementation of this issue 2 or 3 times. At the end, I decided to rewrite it again with a more incremental approach: add the new API, use the new API, and then drop slowly the old API. I was used to rewrite the implementation multiple times to

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Chris Angelico
On Mon, Mar 30, 2015 at 12:08 PM, Paul Rubin no.email@nospam.invalid wrote: Saran Ahluwalia ahlusar.ahluwa...@gmail.com writes: cross-platform... * Monitors a folder for files that are dropped throughout the day I don't see a cross-platform way to do that other than by waking up and scanning

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Ben Finney
Paul Rubin no.email@nospam.invalid writes: I don't know that I'd say that the language or ecosystem is responsible. Then you're not in a position to defend the claim. I'm addressing my critical inquiry to the person who made the claim that they “get screwed by Python 3”. -- \ “Fox News

[issue23754] Add a new os.read_into() function to avoid memory copies

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: Why do you want to optimize the pure Python FileIO? I gave more examples than FileIO in this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23754

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Ben Finney
Paul Rubin no.email@nospam.invalid writes: Ben Finney ben+pyt...@benfinney.id.au writes: Why are you discussing it as though Python 3 is at fault? What do you expect to change *about Python 3* that would address the perceived problem? Whose responsibility is it to do that? Those

[issue23752] Cleanup io.FileIO

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset bc2a22eaa0af by Victor Stinner in branch 'default': Issue #23752: When built from an existing file descriptor, io.FileIO() now only https://hg.python.org/cpython/rev/bc2a22eaa0af -- nosy: +python-dev ___

Re: Sudoku solver

2015-03-29 Thread Seymore4Head
On Sun, 29 Mar 2015 23:17:23 +0100, BartC b...@freeuk.com wrote: On 29/03/2015 22:21, Mark Lawrence wrote: On 28/03/2015 23:50, BartC wrote: On 28/03/2015 03:39, Sayth wrote: Good test for pypy to see where it's speed sits between C and Python. Python 3.1: 1700 seconds (normal Python

[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-29 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: PEP 475: handle EINTR in the socket module - PEP 475: handle EINTR in the socket module (connect) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23618

[issue23485] PEP 475: handle EINTR in the select and selectors module

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: Ok, here is a first patch just for select.select(). It took me some time to write this small patch, because I wanted first to push my new API to handle time in pytime.h (Issue #22117). The new time C API has been merged. -- keywords: +patch Added

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Rustom Mody
On Monday, March 30, 2015 at 8:37:13 AM UTC+5:30, Chris Angelico wrote: On Mon, Mar 30, 2015 at 1:51 PM, Paul Rubin wrote: One way is take reports like John's seriously and receive them with thanks, instead of attacking the messenger. If a messenger wants to be thanked, he should start by

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Paul Rubin
Rustom Mody rustompm...@gmail.com writes: On a more serious note you can (and IMHO should) orthogonalize: 1. John I dont appreciate your tone 2. John thank your for the bug-report Fair enough, but I'd split #2 into 2a. John, thank you for the bug report describing specific problems we can

[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e1234208bab by Victor Stinner in branch 'default': Issue #23694: Fix usage of _Py_open() in the _posixsubprocess module https://hg.python.org/cpython/rev/2e1234208bab -- ___ Python tracker

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ef2cacec2e9 by Victor Stinner in branch '2.7': Issue #22390: Fix test_gzip if unicode filename doesn't work https://hg.python.org/cpython/rev/6ef2cacec2e9 -- ___ Python tracker rep...@bugs.python.org

[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-03-29 Thread Nick Coghlan
New submission from Nick Coghlan: A colleague just ran into the issue where they created a json.py module in their local directory and broke a previously working program. I picked up on the mistake when I saw the following traceback snippet: Traceback (most recent call last): File

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Paul Rubin
Saran Ahluwalia ahlusar.ahluwa...@gmail.com writes: cross-platform... * Monitors a folder for files that are dropped throughout the day I don't see a cross-platform way to do that other than by waking up and scanning the folder every so often (once a minute, say). The Linux way is with inotify

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: Ok, I'm quite API with the new API and I have what I need to rework the select module for the PEP 475, so I close this issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Carl Meyer
On 03/29/2015 09:30 PM, Michael Torrie wrote: What does this have to do with Python itself? I'm not completely sure, but maybe it's about the Python community. What's the way forward? I have no idea. At the very least John is frustrated by the community's lack of apparent interest in

[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The second (exception == NULL) check in _Py_PrintFatalError() looks suspicious. When it is possible? And if it is possible, can it cause leaks? -- ___ Python tracker rep...@bugs.python.org

[issue19023] ctypes docs: Unimplemented and undocumented features

2015-03-29 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- components: -Tests nosy: +berker.peksag versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19023 ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset d938533b43f7 by Victor Stinner in branch 'default': Issue #22117: Fix usage of _PyTime_AsTimeval() https://hg.python.org/cpython/rev/d938533b43f7 New changeset 49d3ff81f31f by Victor Stinner in branch 'default': Issue #22117: Add assertions to

[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread Martin Panter
Martin Panter added the comment: I think your patch should be fine for all practical cases I can think of. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23792 ___

[issue23752] Cleanup io.FileIO

2015-03-29 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23752 ___

[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-03-29 Thread Nick Coghlan
Nick Coghlan added the comment: I had an idea for a possible importlib.util API to support this capability: an ignore_entries=0 default arg to https://docs.python.org/dev/library/importlib.html#importlib.util.find_spec The new arg would say how many found entries to skip when looking for the

[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-03-29 Thread Ethan Furman
Ethan Furman added the comment: Patch looks good. Changing the raised exceptions to ValueError would require deprecation periods. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23466 ___

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Paul Rubin
Ben Finney ben+pyt...@benfinney.id.au writes: Which doesn't address the assertion that this is somehow a special responsibility of “Python 3”, which I asked critical questions about. Python 3 in those sorts of contexts refers to the whole ecosystem including the 3rd party libs. I don't know

[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: Changing the raised exceptions to ValueError would require deprecation periods. bytes%args is not a new feature of python 3.5? It sounds strange to deprecate a part of a new feature. -- ___ Python tracker

[issue23755] tempfile.NamedTemporaryFile should be able to toggle delete

2015-03-29 Thread Martin Panter
Martin Panter added the comment: I think I have often passed delete=False because of the documented deficiency with Windows (see Issue 14243). Depending on the outcome of that issue, allowing for deletion after close() might be useful too. BTW, monkey-patching __del__() probably won’t work if

[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be rename _PyTime_AsTimeval_impl() to _PyTime_AsTimeval_noraise() and check a result to raise an exception in _PyTime_AsTimeval()? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue23758] Improve documenation about num_params in sqlite3 create_function and create_aggregate

2015-03-29 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag, ghaering stage: - patch review versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23758

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Paul Rubin
Ben Finney ben+pyt...@benfinney.id.au writes: Why are you discussing it as though Python 3 is at fault? What do you expect to change *about Python 3* that would address the perceived problem? Whose responsibility is it to do that? Those questions seem unfair to me. Nagle posted an experience

[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-03-29 Thread Robert Collins
Robert Collins added the comment: Why limit this to just stdlib shadowing? A local module can shadow a top level module-or-package across the board. If we don't limit it to stdlib names, it becomes a lot easier to implement. -- ___ Python tracker

[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: That last commit fixed compatibility with Django. Good. Instead of an assert(), you could use Py_FatalError() at the end of _Py_CheckFunctionResult(). _Py_CheckFunctionResult() now calls Py_FatalError() in debug mode. By the way, I fixed various issues

[issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

2015-03-29 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: https://hg.python.org/cpython/rev/2a336cc29282 changed stacklevel of some deprecation warnings. However new value is still not useful, because either _frozen_importlib or importlib/_bootstrap.py is now mentioned in deprecation warnings:

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread John Nagle
On 3/29/2015 6:03 PM, Paul Rubin wrote: Those questions seem unfair to me. Nagle posted an experience report about a real-world project to migrate a Python 2 codebase to Python 3. He reported hitting more snags than some of us might expect purely from the Python 3 propaganda (oh, just run the

[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2015-03-29 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +alex, christian.heimes, dstufft ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23804 ___ ___

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: On Windows, test_idle modifies os.environ: TCL_xxx and TIX_xxx (sorry for xxx, I don't remember the full variable name) are added. And test_platform modifies os.environ['PATH']. -- ___ Python tracker

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Jon Ribbens
On 2015-03-29, John Nagle na...@animats.com wrote: The Python 2 module fcgi is gone in Python 3. The Python 3 documentation at https://docs.python.org/3/howto/webservers.html recommends flup and links here: https://pypi.python.org/pypi/flup/1.0 That hasn't been updated since 2007, and

[issue21076] Turn signal.SIG* constants into enums

2015-03-29 Thread Ethan Furman
Ethan Furman added the comment: Okay, in a perfect world that _enum_to_int function would be unnecessary, but as Serhiy pointed out the C code is doing pointer comparison, so unless the exact same int is passed in it does not work. I'm looking at adjusting the C code. --

[issue23745] Exception when parsing an email using email.parser.BytesParser

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc10c52c6539 by R David Murray in branch '3.4': #23745: handle duplicate MIME parameter names in new parser. https://hg.python.org/cpython/rev/dc10c52c6539 New changeset fe9a578d5f38 by R David Murray in branch 'default': Merge: #23745: handle

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Chris Angelico
On Mon, Mar 30, 2015 at 1:51 PM, Paul Rubin no.email@nospam.invalid wrote: One way is take reports like John's seriously and receive them with thanks, instead of attacking the messenger. If a messenger wants to be thanked, he should start by not attacking the recipients. Respect goes both ways.

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Michael Torrie
On 03/29/2015 04:58 PM, Ben Finney wrote: You have provided none for your assertion that an unmaintained third-party library is somehow a special failure of Python 3. A language is only as good as its libraries, either the standard library that ships with the language, or third-party libraries.

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Chris Angelico
On Mon, Mar 30, 2015 at 3:35 PM, Paul Rubin no.email@nospam.invalid wrote: 2b. John, thank you for describing your experience and making the community's picture of the current overall state of Python 3 more accurate. It was apparently a bit too rosy before, and we should avoid fostering

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Mon, Mar 30, 2015 at 1:51 PM, Paul Rubin no.email@nospam.invalid wrote: One way is take reports like John's seriously and receive them with thanks, instead of attacking the messenger. Please note that, where John Nagle has made supportible

[issue23729] Import ElementTree documentation for namespaces and XPath

2015-03-29 Thread Martin Panter
Martin Panter added the comment: Reopening because I think there are some review comments that need addressing, at least the fromstring() one. I’m happy to make a patch if necessary. -- status: closed - open ___ Python tracker rep...@bugs.python.org

[issue23802] patch: __deepcopy__ memo dict argument usage

2015-03-29 Thread Daniel Shahaf
New submission from Daniel Shahaf: In the 'copy' module documentation, it wasn't fully clear to me how __deepcopy__ implementations should treat the memo dict argument. The attached patch clarifies that __deepcopy__ implementations should treat the memo dict argument as an opaque type.

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The test_urandom_fd_non_inheritable is constantly failed on AMD64 OpenIndiana 2.7 buildbot. http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%202.7/builds/2727/steps/test/logs/stdio

SOAPpy proxy through NTLM

2015-03-29 Thread pfaff . christopherj
Hello, I am trying to build a python script to auto create RFC's (Reason For Change). The web service is using SOAP API 1.1, and requires ntlm authentication. I have tried several methods to start this process without success. I found that I could connect via NTLM and it returned the

TCP sockets python timeout public IP adresss

2015-03-29 Thread bobbydeep
I am trying to communicate between a server and client using TCP sockets. Server code: import socket import sys # Create a TCP/IP socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Bind the socket to the port server_address = ('my-server-ipadress', 1999)

[issue23796] BufferedReader.peek() crashes if closed

2015-03-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23796 ___ ___ Python-bugs-list

Re: Sudoku solver

2015-03-29 Thread Steven D'Aprano
On Sun, 29 Mar 2015 03:10 pm, Chris Angelico wrote: On Sun, Mar 29, 2015 at 2:06 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 29 Mar 2015 10:50 am, BartC wrote: (X is my own interpreted language, which is where my interest in this is. This had been generally

[issue23797] Mac OS X locale setup in thread happens sometime after run() is called

2015-03-29 Thread Barry Alan Scott
Barry Alan Scott added the comment: I should point out using Python2.7 with wxPython I do not see this issue. This issue was exposed during my efforts to port pysvn from py2.7+wxPython to py3.4+wxpython-phoenix. I do setup locale on the main thread very early before starting the background

Addendum to Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Saran Ahluwalia
On Sunday, March 29, 2015 at 7:33:04 AM UTC-4, Saran Ahluwalia wrote: Below are the function's requirements. I am torn between using the OS module or some other quick and dirty module. In addition, my ideal assumption that this could be cross-platform. Records refers to contents in a file.

[issue23806] documentation for no_proxy is missing from the python3 urllib documentation

2015-03-29 Thread R. David Murray
New submission from R. David Murray: no_proxy (and what notation it supports) is mentioned in the python2 urllib docs, but not in the python3 docs. -- assignee: docs@python components: Documentation messages: 239493 nosy: docs@python, r.david.murray priority: normal severity: normal

Re: PiCxx

2015-03-29 Thread Michael Torrie
On 03/29/2015 04:20 AM, Robert Kern wrote: On 2015-03-25 15:45, π wrote: Hello Python people, I've made a C++ wrapper for Python. I've called it PiCxx and put it up here: https://github.com/p-i-/PiCxx Please consider using a recognized open source license. Your project looks interesting,

[issue23805] _hashlib compile error?

2015-03-29 Thread R. David Murray
R. David Murray added the comment: Well, you'll need to look in your build log to see why _hashlib failed to compile or failed to be usable. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23805

[issue23803] str.partition() is broken in 3.4

2015-03-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: lgtm -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23803 ___ ___ Python-bugs-list mailing list

[issue23807] Improved test coverage for calendar.py command line

2015-03-29 Thread Thana Annis
New submission from Thana Annis: Added a test to ensure that --locale cannot be called without --encoding. This is targeting lines 654-656 of calendar.py. -- components: Tests files: test_calendar.patch keywords: patch messages: 239494 nosy: Bwaffles priority: normal severity: normal

Re: PiCxx

2015-03-29 Thread Dotan Cohen
On Sun, Mar 29, 2015 at 1:20 PM, Robert Kern robert.k...@gmail.com wrote: Please consider using a recognized open source license. Your project looks interesting, but I won't touch it with the current license. http://opensource.org/licenses I agree about the licensing. Many devs won't even

[issue23602] Implement __format__ for Fraction

2015-03-29 Thread Tuomas Suutari
Tuomas Suutari added the comment: Thanks for the comments again! I fixed the format(F(4, 27), '.1f') - 0.2 issue Serhiy Storchaka reported. Fix for that was as simple as adding one to the precision the decimals are calculated in, but while adding test cases for that I realized two new things:

Re: Sudoku solver

2015-03-29 Thread BartC
On 29/03/2015 13:01, BartC wrote: On 29/03/2015 11:35, Steven D'Aprano wrote: Anyway, we don't really know where the confusion lies. Perhaps the description is misleading, or I'm just confused, or Bart's idea of brute force is not the same as my idea of brute force, or perhaps he really is a

[issue23803] str.partition() is broken in 3.4

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset c23713af8be7 by Serhiy Storchaka in branch '3.4': Issue #23803: Fixed str.partition() and str.rpartition() when a separator https://hg.python.org/cpython/rev/c23713af8be7 New changeset c48637f57e2b by Serhiy Storchaka in branch 'default': Added

[issue23771] Timeouts on x86 Ubuntu Shared 3.x buildbot

2015-03-29 Thread STINNER Victor
STINNER Victor added the comment: This build was only triggered by one changeset 0b99d7043a99: Issue #23694: Enhance _Py_open(), it now raises exceptions. I was reproduce to issue on a buildbot and I got access to the buildbot. Using gdb, I saw that a process was stuck in

[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-03-29 Thread Nick Coghlan
Nick Coghlan added the comment: On the implementation front, +1 for looking at a per-frame callback API rather than hardcoding this directly into the existing traceback rendering code. -- ___ Python tracker rep...@bugs.python.org

[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-03-29 Thread Nick Coghlan
Nick Coghlan added the comment: I proposed limiting it to stdlib names as that's the case where we see the most beginner confusion (experimenting with sockets in a file named socket.py, etc), and the one where we can generate a comprehensive list of known module names ahead of time (so in

[issue23770] Rework how exceptions are handled in the parser module (in validate_repeating_list())

2015-03-29 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Rework of exceptions are handled in the parser module (in validate_repeating_list()) - Rework how exceptions are handled in the parser module (in validate_repeating_list()) ___ Python

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Ben Finney
John Nagle na...@animats.com writes: CPAN, the Perl module archive, has some curation and testing. PyPi lacks that, which is how we end up with situations like this, where there are 11 ways to do something, most of which don't work. That is a valid criticism of PyPI, and more broadly of the

[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-29 Thread Martin Panter
Martin Panter added the comment: Patch v9: * Incorporated _PaddedFile.rewind() into seek() for simplicity * Reverted to support fast-forwarding in non-seekable streams again * Factored common checks into _check_can_seek() * Documented “mtime” attribute and implemented it as a read-only

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread INADA Naoki
I agree with you. Web programmers should use maintained libraries. In web world, most common libraries maintained are support Python 3. I (maintainer of PyMySQL and mysqlclient) uses Python 3 for daily job, and use Python 2 only for test my libraries. On Mon, Mar 30, 2015 at 12:50 PM, Carl

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread Rustom Mody
On Monday, March 30, 2015 at 10:05:37 AM UTC+5:30, Paul Rubin wrote: 2b. John, thank you for describing your experience and making the community's picture of the current overall state of Python 3 more accurate. It was apparently a bit too rosy before, and we should avoid fostering unrealistic

Re: Sudoku solver

2015-03-29 Thread BartC
On 29/03/2015 11:35, Steven D'Aprano wrote: That's why I can't help but feel that, *given the description we've seen*, perhaps Bart's brute force code doesn't actually solve the problem, and that's why it is so fast. I'm reminded of the recent thread where somebody claimed to have a significant

[issue23805] _hashlib compile error?

2015-03-29 Thread Freddy
New submission from Freddy: I just installed Python 3.5.0a2 from Source. Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux [264/392] test_hashlib /root/Downloads/Python-3.5.0a2/Lib/test/test_hashlib.py:52: UserWarning: Did a C extension fail to compile? No module named '_hashlib' warnings.warn('Did a

Re: Addendum to Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Dave Angel
On 03/29/2015 07:37 AM, Saran Ahluwalia wrote: On Sunday, March 29, 2015 at 7:33:04 AM UTC-4, Saran Ahluwalia wrote: Below are the function's requirements. I am torn between using the OS module or some other quick and dirty module. In addition, my ideal assumption that this could be

[issue23802] patch: __deepcopy__ memo dict argument usage

2015-03-29 Thread R. David Murray
R. David Murray added the comment: I would rather say simply The memo dictionary should be treated as an opaque object. On the other hand, I doubt we will ever change the structure of the memo dict, because I'm sure that somewhere out there there is code that is *not* treating it as opaque

Re: Python 2/3 versus Perl 5/6

2015-03-29 Thread Steven D'Aprano
On Sun, 29 Mar 2015 06:36 am, Mario Figueiredo wrote: On Sat, 28 Mar 2015 21:32:31 +1100, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The famous Perl coder Allison Randal writes about why Perl is not dead (it's just pining for the fjords *wink* ) and contrasts the Perl 5/6

Re: Addendum to Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Saran A
Thank you for the feedback - I have only been programming for 8 months now and am fairly new to best practice and what is considered acceptable in public forums. I appreciate the feedback on how to best address this problem. On Sunday, March 29, 2015 at 8:33:43 AM UTC-4, Peter Otten wrote:

[issue23746] sysconfg.is_python_build() is buggy

2015-03-29 Thread Anand B Pillai
Changes by Anand B Pillai anandpil...@letterboxes.org: -- nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23746 ___ ___

Re: Addendum to Strategy/ Advice for How to Best Attack this Problem?

2015-03-29 Thread Peter Otten
Saran Ahluwalia wrote: On Sunday, March 29, 2015 at 7:33:04 AM UTC-4, Saran Ahluwalia wrote: Below are the function's requirements. I am torn between using the OS module or some other quick and dirty module. In addition, my ideal assumption that this could be cross-platform. Records refers to

[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2015-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Victor? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22390 ___ ___ Python-bugs-list mailing list

[issue23746] sysconfg.is_python_build() is buggy

2015-03-29 Thread Anand B Pillai
Changes by Anand B Pillai anandpil...@letterboxes.org: -- assignee: - docs@python components: +Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23746 ___

[issue23801] cgi.FieldStorage has different (wrong?) behavior on Python3 than Python2

2015-03-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: The loop might be more elegantly expressed as for line in self.fp: self.bytes_read += len(line) if line.strip() != b-- + self.innerboundary: break but otherwise lgtm -- nosy: +benjamin.peterson

[issue23801] cgi.FieldStorage has different (wrong?) behavior on Python3 than Python2

2015-03-29 Thread R. David Murray
R. David Murray added the comment: The code you are modifying looks completely wrong-headed to me. Unfortunately I don't have time to rewrite the cgi module right now :). Given that, your fix looks fine: the first part of a multipart (up to the first inner boundary) is the 'preamble', which

Re: Sudoku solver

2015-03-29 Thread Marko Rauhamaa
Mark Lawrence breamore...@yahoo.co.uk: One thing I have come to rely on over the years is never, ever trust your gut instincts about Python performance, you're almost inevitably wrong. When I first came across the Norvig solver I made a change, purely for fun, to replace two calls to len()

[issue23602] Implement __format__ for Fraction

2015-03-29 Thread Stefan Behnel
Stefan Behnel added the comment: Meaning, something like this should work: x = (nom * 10**(prec+1)) // den if x % 10 5: x = x // 10 else: x = x // 10 + 1 print('%s.%s' % (x[:-prec], x[-prec:])) -- ___ Python tracker

[issue23602] Implement __format__ for Fraction

2015-03-29 Thread Stefan Behnel
Stefan Behnel added the comment: Or, speaking of division with remainder: n, r = divmod(nom * 10**prec, den) if r * 5 = den: n += 1 x = str(n) print('%s.%s' % (x[:-prec], x[-prec:])) ... minus the usual off-by-one that the tests would quickly find :) --

Re: Sudoku solver

2015-03-29 Thread Marko Rauhamaa
BartC b...@freeuk.com: As Chris mentioned, when I say 'faster than C', I mean X running my algorithm was faster then C running Marko's algoritim (on Ian's data). This was just an illustration of algorithm being more important than language. Be careful with the benchmark comparisons. Ian's

Re: Sudoku solver

2015-03-29 Thread Mark Lawrence
On 29/03/2015 19:03, Marko Rauhamaa wrote: BartC b...@freeuk.com: As Chris mentioned, when I say 'faster than C', I mean X running my algorithm was faster then C running Marko's algoritim (on Ian's data). This was just an illustration of algorithm being more important than language. Be

[issue23602] Implement __format__ for Fraction

2015-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that Decimal is not needed for Fraction.__format__ (and I'm not sure that issue23602v4.patch is correct). The correct way to format Fraction as fixed-precision decimal is to use Fraction.__round__() or similar algorithm. The implementation can look

[issue23808] Symlink to directory on Windows 8

2015-03-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Looks as a symlink on Windows 8 can has the FILE_ATTRIBUTE_DIRECTORY flag. http://buildbot.python.org/all/builders/AMD64%20Windows8%203.4/builds/348/steps/test/logs/stdio == FAIL:

[issue22500] Argparse always stores True for positional arguments

2015-03-29 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - not a bug stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22500 ___

[issue23807] Improved test coverage for calendar.py command line

2015-03-29 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch! I thought line 654-656 was already tested by self.assertFailure('-L', 'en'). -- nosy: +berker.peksag, serhiy.storchaka stage: - patch review versions: +Python 3.4 ___ Python tracker

Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread John Nagle
The Python 2 module fcgi is gone in Python 3. The Python 3 documentation at https://docs.python.org/3/howto/webservers.html recommends flup and links here: https://pypi.python.org/pypi/flup/1.0 That hasn't been updated since 2007, and the SVN repository linked there is gone. The recommended

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-29 Thread Joshua Bronson
Joshua Bronson added the comment: Quoting Victor Stinner: I may workaround the bug during Python finalization if more users report this issue. Read the above so reporting I'm hitting this too fwiw. Thanks for the great work on asyncio. -- nosy: +jab

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-03-29 Thread Joshua Bronson
Joshua Bronson added the comment: Not sure if it's related / helpful but just in case, since upgrading from 3.4.2 to 3.4.3, I'm now seeing this printed to stderr sometimes when my program exits: Exception ignored in: Exception ignored in: Exception ignored in: Exception ignored in: Exception

[issue23602] Implement __format__ for Fraction

2015-03-29 Thread Tuomas Suutari
Tuomas Suutari added the comment: On 29 March 2015 at 19:54, Serhiy Storchaka wrote: I think that Decimal is not needed for Fraction.__format__ (and I'm not sure that issue23602v4.patch is correct). Of course it's not needed. I'm using it to avoid re-implementing all the various formatting

  1   2   >