[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: None of the linked patch URLs work anymore. Could someone please upload a current patch to the ticket for review ? As mentioned before, I don't believe that changing the function to first try the lsb-release will result in the same results as what the func

[issue20136] Logging: StreamHandler does not use OS line separator.

2014-01-06 Thread A. Libotean
New submission from A. Libotean: The StreamHandler implementation uses hardcoded Unix/Linux line separators. This generates inconveniences when running on Windows as the file viewers expect DOS line terminators. I've attached a fix that will use os.linesep as the line terminator thus making t

[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.

2014-01-06 Thread A. Libotean
New submission from A. Libotean: Current implementation of RotatingFileHandler ignores the encoding when computing the entry byte length. I've attached a modified version that will compute the entry lenght in bytes. -- components: Library (Lib) files: rotatingfilehandler.py messages: 2

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-06 Thread Armin Ronacher
New submission from Armin Ronacher: I just noticed through looking through someone else's WSGI framework that wsgiref is incorrectly handling URL handling. It does not go through the WSGI coding dance in the wsgiref.utils.request_uri function. Testcase through werkzeug: >>> from wsgiref.util

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: attaching a patch for 3.3. up next, 3.4: So long as I get to it before the release candidates the approach can likely be improved for 3.4 to actually hold the zip file we're importing from open for the life of the process instead of doing all of these stat c

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-06 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file31869/issue19081-gps02.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-06 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file31860/issue19081-gps01.diff ___ Python tracker ___ ___ Python-bugs-list

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Jakub Wilk, yeah, I missed that one. Jason Gerard DeRose, thanks for the additional information. Anyway, I already "persuaded" Ruby developers to specialize the message, although it's only for creating symlink. https://bugs.ruby-lang.org/issues/9263 As of Pyth

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Another example on openSUSE 12.3: # lsb-release -a LSB Version:n/a Distributor ID: openSUSE project Description:openSUSE 12.3 (x86_64) Release:12.3 Codename: Dartmouth This would result in ('openSUSE project', '11.4', 'x86_64'). I don'

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Matthias Klose
Matthias Klose added the comment: sure, then please let's deprecate that for 3.4, and remove in 3.5. /etc/os-release introduce the next set of different names. -- ___ Python tracker ___

[issue20139] Python installer does not install a "pip" command (just "pip3" and "pip3.4")

2014-01-06 Thread Paul Moore
New submission from Paul Moore: The Python 3.4b2 installer for Windows does not install a "pip.exe" wrapper when the default options are selected. Only the "pip3.exe" and "pip3.4.exe" commands are provided. The documentation for ensurepip makes it clear that this is the default behaviour, but

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread Jarek Śmiejczak
New submission from Jarek Śmiejczak: Full traceback: https://gist.github.com/jarekps/2729ee1917ea372e6642 Error's starts in pip but after investigation of traceback it looks like it is python's issue (version 2.7.5). Windows version: 8.1 Enterprise x64 with Polish language pack. Feel free to as

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread STINNER Victor
STINNER Victor added the comment: > https://gist.github.com/jarekps/2729ee1917ea372e6642 Copy of the output: --- C:\Users\Jarosław>pip Traceback (most recent call last): File "c:\python27\Scripts\pip-script.py", line 9, in load_entry_point('pip==1.5', 'console_scripts', 'pip')() File "c:\pytho

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-06 Thread Graham Dumpleton
Changes by Graham Dumpleton : -- nosy: +grahamd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch to deprecate platform.dist and platform.linux_distribution. -- nosy: +vajrasky Added file: http://bugs.python.org/file33324/deprecate_platform_dist.patch ___ Python tracker

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 06.01.2014 11:53, Vajrasky Kok wrote: > > Here is the patch to deprecate platform.dist and platform.linux_distribution. > > -- > nosy: +vajrasky > Added file: http://bugs.python.org/file33324/deprecate_platform_dist.patch Thanks. I think we'll n

[issue20139] Python installer does not install a "pip" command (just "pip3" and "pip3.4")

2014-01-06 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: It's not failing specifically because of distlib or os.path.join functionality: it's failing because, given a Unicode path C:\Users\Jarosław\..., Python is attempting to decode it using the default, ASCII codec. I'll certainly look at updating distlib to handle t

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-06 Thread Florian Apolloner
Changes by Florian Apolloner : -- nosy: +apollo13 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: Jarek: I can't easily test this in my environment; perhaps you can help. Could you change, in the file c:\python27\lib\site-packages\pip\_vendor\distlib\resources.py, line 40 from base = os.path.join(get_cache_base(), 'resource-cache') to

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: First, the documentation says that syntax for 'O!' conversion is object(type='name_of_Python_type'), but actually the type argument should be the name of C structure which represents Python type. I.e. object(type='list') is rejected, and object(type='PyList

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: So a documentation error and having to manually specify "&" at the front of your string means it's "broken"? Nevertheless, I'll take a look at it. -- ___ Python tracker _

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can't manually specify "&" at the front of the name. -- ___ Python tracker ___ ___ Python-bugs

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file33325/spammodule.c ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue20142] Argument Clinic: Py_buffer parameters are not initialized

2014-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Argument Clinic doesn't initialize Py_buffer parameters. It generates cleanup code: /* Cleanup for data */ if (data.buf) PyBuffer_Release(&data); And if PyArg_ParseTuple() is failed, the buf attribute can contains arbitrary (non-NULL) data.

[issue20143] Argument Clinic: negative line numbers

2014-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In case of error Argument Clinic sometimes reports negative line numbers. -- messages: 207434 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Argument Clinic: negative line numbers type: behavior versions: Python 3

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For example it doesn't support PY_SSIZE_T_MAX as default value for Py_ssize_t argument. Is there any way to specify it? This is required for converting the _sre module. -- components: Build messages: 207435 nosy: larry, serhiy.storchaka priority: n

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-01-06 Thread the mulhern
New submission from the mulhern: A normal thing for a developer to do is to convert a use of an assert* function to a use of an assert*Regex function and foolishly forget to actually specify the expected regular expression. If they do this, the test will always pass because the callable expres

[issue20139] Python installer does not install a "pip" command (just "pip3" and "pip3.4")

2014-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: This is deliberate - the unversioned command is only installed into virtual environments. -- ___ Python tracker ___ __

[issue20139] Python installer does not install a "pip" command (just "pip3" and "pip3.4")

2014-01-06 Thread Paul Moore
Paul Moore added the comment: Fair enough. Can the justification be recorded somewhere, please? It's inconsistent with most other Python commands on Windows. (I don't recall what the justification was, and can't come up with a search that locates the discussion thread). -- __

[issue20139] Python installer does not install a "pip" command (just "pip3" and "pip3.4")

2014-01-06 Thread Paul Moore
Paul Moore added the comment: It would not be impossible for the ensurepip call in the Windows installer to set the --default-pip flag, if that gives a better user experience on Windows. I'm not wedded to either answer myself, but given that versioned executable names are uncommon on Windows,

[issue20146] UserDict module docs link is obsolete

2014-01-06 Thread Alexandru Gheorghe
New submission from Alexandru Gheorghe: FILE /usr/lib/python2.7/UserDict.py MODULE DOCS http://docs.python.org/library/UserDict Reference link to online documentation is invalid. (Probably) Should be: http://docs.python.org/library/userdict.html Happens on Debian 7 Wheezy x86_64:

[issue20139] Python installer does not install a "pip" command (just "pip3" and "pip3.4")

2014-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not sure we specifically considered the Windows case - we were avoiding the name collision with pip for Python 2 on POSIX systems. The decision on which names to install is actually made in pip itself, though, ensurepip just indicates what kind of install it i

[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2014-01-06 Thread Torsten Landschoff
Changes by Torsten Landschoff : Added file: http://bugs.python.org/file33328/queue_timeout_1.diff ___ Python tracker ___ ___ Python-bugs-list

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Here's the problem. Let's say I gave you a way of specifying a symbolic constant for the default value for C. What value should we use for the default value in Python? Keep in mind, it has to be expressed as a static value that can be stored as a string as

[issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import

2014-01-06 Thread Daniel Holth
Daniel Holth added the comment: Thanks. I guess I know who to ask now. It was just painful seeing so much import-time computation, pretty much guaranteed to happen every time Python starts up, being wasted on a feature that is rarely used. On the Raspberry Pi the majority of the import time is s

[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.

2014-01-06 Thread R. David Murray
R. David Murray added the comment: Could you please upload your proposed fix as a patch file (universal diff)? -- nosy: +r.david.murray, vinay.sajip ___ Python tracker ___ __

[issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Since this isn't a bugfix, it was inappropriate to check this in after feature-freeze for 3.4. However it looks harmless enough, so I'm not asking you to revert it at this time. I guess it's easier to get forgiveness than permission, huh. -- nosy: +l

[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2014-01-06 Thread Torsten Landschoff
New submission from Torsten Landschoff: The behaviour of multiprocessing.Queue surprised me today in that Queue.get() may raise an exception even if an item is immediately available. I tried to flush entries without blocking by using the timeout=0 keyword argument: $ /opt/python3/bin/python3 Py

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: As an example, consider pattern_match() in _sre.c. This implements the match method on a pattern object; in other words, re.compile().match(). The third parameter, endpos, defaults to PY_SSIZE_T_MAX in C. What should inspect.Signature() report as the defaul

[issue20148] Convert the _sre module to use Argument Clinic

2014-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is preliminary patch which converts the _sre module to use Argument Clinic. 22 functions are converted. There are thre problems: * Issue20141. The code was manually edited after Argument Clinic (and should be edited again for next run of Argument Cli

[issue20148] Convert the _sre module to use Argument Clinic

2014-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file33329/sre_clinic.patch ___ Python tracker ___ ___

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not always default value can be expressed in Python. Current docstring for the match() method says "match(string[, pos[, endpos]])". For this particular case it can be written as "match(string, pos=0, endpos=sys.maxsize)". And this is very common case (see a

[issue20148] Convert the _sre module to use Argument Clinic

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Maybe we could use a better literal value? Like 2**31 - 1? This only a placeholder. It will be replaced by named constant in final patch. 2**31 - 1 is not better here than any other arbitrary value. > I don't understand the pydoc thing. Can you elaborate

[issue20136] Logging: StreamHandler does not use OS line separator.

2014-01-06 Thread R. David Murray
R. David Murray added the comment: The IO system should automatically take care of the linesep conversion when writing to a text stream. Are you sure you specified that the output was a text file? -- nosy: +r.david.murray, vinay.sajip ___ Python tr

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: "sys.maxsize" won't work. inspect.Signature parses the __text_signature__ using ast.parse, and it only recognizes constant values and named constants (True/False/None) for the default value for parameters. Playing with ast, it looks like we'd have to support

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then perhaps these methods can not be converted to use Argument Clinic now. -- ___ Python tracker ___

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue20141] Argument Clinic: broken support for 'O!'

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Actually, the documentation (the "howto") states: Note that object() must explicitly support each Python type you specify for the type argument. Currently it only supports str. It should be easy to add more, just edit Tools/clinic/clinic.py, search for O! in t

[issue20148] Convert the _sre module to use Argument Clinic

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Obviously we can't live with manually editing the output from Argument Clinic, so I'll get you a fix for O! today. Maybe we could use a better literal value? Like 2**31 - 1? I don't understand the pydoc thing. Can you elaborate? --

[issue20142] Argument Clinic: Py_buffer parameters are not initialized

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Here's a patch, please review. You can see how Py_buffer variables are initialized in zlibmodule.c in the patch. -- Added file: http://bugs.python.org/file0/larry.clinic.py_buffer.initialization.patch.1.txt ___

[issue20148] Convert the _sre module to use Argument Clinic

2014-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Argument Clinic doesn't support named constants as default values, Argument Clinic: broken support for 'O!' ___ Python tracker __

[issue20133] Convert the audioop module to use Argument Clinic

2014-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Argument Clinic: Py_buffer parameters are not initialized ___ Python tracker ___ ___ P

[issue20149] 'with instance' references class's __enter__ attribute rather than instance's

2014-01-06 Thread Daniel Grace
New submission from Daniel Grace: I was writing code for a class that uses one threading.RLock per object. For convenience, I wanted to be able to use that lock's context manager and acquire/release methods without referencing the lock directly, so I opted to take a shortcut by assigning self

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8dbf8edb7128 by Gregory P. Smith in branch '2.7': Fixes issue19081: When a zipimport .zip file in sys.path being imported http://hg.python.org/cpython/rev/8dbf8edb7128 New changeset 90a99059aa36 by Gregory P. Smith in branch '2.7': news entry for is

[issue20150] API breakage in string formatting with :s option

2014-01-06 Thread Thomas Robitaille
New submission from Thomas Robitaille: The following code: >>> "{0:s}".format([1,2,3]) no longer works in Python 3.4b1, and gives the following exception: >>> "{0:s}".format([1,2,3]) Traceback (most recent call last): File "", line 1, in TypeError: non-empty format string passed to object._

[issue20142] Argument Clinic: Py_buffer parameters are not initialized

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But is not {NULL} enough for Py_buffer initialization? -- ___ Python tracker ___ ___ Python

[issue20150] API breakage in string formatting with :s option

2014-01-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +eric.smith, ezio.melotti, larry type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mai

[issue20142] Argument Clinic: Py_buffer parameters are not initialized

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or perhaps we should introduce macros Py_buffer_INIT. -- ___ Python tracker ___ ___ Python-bugs-li

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: The Windows 7 buildbot is unhappy after that change and failing one of the new tests: ERROR: testZipFileChangesAfterFirstImport (test.test_zipimport.ZipFileModifiedAfterImportTestCase) Alter the zip file after caching its index and try an import. ---

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Attached is an example of how we could support simple named constants in __text_signature__. The change to posixmodule.c is just a hack to exercise the code in inspect.Signature; I didn't have a good example handy. When I apply the patch and run "x.py", I see

[issue20150] API breakage in string formatting with :s option

2014-01-06 Thread Eric V. Smith
Eric V. Smith added the comment: See issue 7994 and issue 9856. This behavior has been deprecated for a while, and is now an error. -- assignee: -> eric.smith resolution: -> invalid status: open -> closed ___ Python tracker

[issue20150] API change in string formatting with :s option should be documented in What's New.

2014-01-06 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, I missed the "should be documented" part of your message. That's true, and I'll leave this open. But I'll change it to a doc request and assign it accordingly. -- assignee: eric.smith -> docs@python components: +Documentation -Interpreter Core nos

[issue20142] Argument Clinic: Py_buffer parameters are not initialized

2014-01-06 Thread Larry Hastings
Changes by Larry Hastings : -- assignee: -> larry resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue20142] Argument Clinic: Py_buffer parameters are not initialized

2014-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16ff19d1d367 by Larry Hastings in branch 'default': Issue #20142: Py_buffer variables generated by Argument Clinic are now http://hg.python.org/cpython/rev/16ff19d1d367 -- nosy: +python-dev ___ Python tra

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Whoops, forgot to attach the file. here it is. -- Added file: http://bugs.python.org/file1/larry.simple.named.constants.in.text.signature.example ___ Python tracker _

[issue20143] Argument Clinic: negative line numbers

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: I've seen the problem before, but was too busy to fix it. Give me a reproducable test case and I'll fix it. -- assignee: -> larry ___ Python tracker

[issue20143] Argument Clinic: negative line numbers

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Oh, golly, this was one of those "what was I thinking?" sorts of bugs. The problem (and the fix) was obvious once I stared at it long enough. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___

[issue20143] Argument Clinic: negative line numbers

2014-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9c8d31d69044 by Larry Hastings in branch 'default': Issue #20143: The line numbers reported in Argument Clinic errors are http://hg.python.org/cpython/rev/9c8d31d69044 -- nosy: +python-dev ___ Python trac

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It seems a little unfortunate that you lose the symbolic default, especially since the expanded number just appears random. >>> print(inspect.signature(os.stat)) (path, *, dir_fd=None, follow_symlinks=True, fake=9223372036854775807) >>> sys.maxsize 92233720368

[issue20151] Convert the binascii module to use Argument Clinic

2014-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which converts the binascii module to use Argument Clinic. 14 functions are converted. There is one known issue. Pydoc doesn't show signature and docstring for several functions: a2b_qp, b2a_qp, crc32. -- components: Extension Modu

[issue20149] 'with instance' references class's __enter__ attribute rather than instance's

2014-01-06 Thread R. David Murray
R. David Murray added the comment: "magic methods" like __enter__ and __exit__ are only looked up on the class, not on the instance. This is by design. In some older versions of Python some specific methods (and I think __enter__ and __exit__ were among them for a time) were looked up on the

[issue20152] Use Argument Clinic with _imp

2014-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- components: +Extension Modules ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue20152] Use Argument Clinic with _imp

2014-01-06 Thread Brett Cannon
New submission from Brett Cannon: Since _imp isn't directly exposed it isn't a priority to do the conversion, but for maintenance and such it should still occur. -- assignee: brett.cannon messages: 207474 nosy: brett.cannon, larry priority: low severity: normal stage: needs patch status

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: It is unfortunate, but on the other hand that's what happens in Python too: >>> import sys >>> import inspect >>> def foo(blah=sys.maxsize): pass ... >>> str(inspect.signature(foo)) '(blah=9223372036854775807)' Nick proposed something w

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jan 06, 2014, at 08:23 PM, Larry Hastings wrote: >Could you live with this being checked in to 3.4? For sure! -- ___ Python tracker ___ __

[issue19255] Don't "wipe" builtins at shutdown

2014-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch, Gennadiy. Two comments: 1) I don't think re-doing the whole initialization like that is ok. It's too brutal and may also not work as you want. 2) To validate your changes, you should add a unit test anyway (in test_builtin perhaps). -

[issue19255] Don't "wipe" builtins at shutdown

2014-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also, since such changes are subtle and error-prone, I think it's better to defer until 3.5 now that 3.4b2 has been released. Serhiy, what do you think? -- versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: Attached is a patch supporting simple symbolic constants. It works from beginning to end--you specify it in the Argument Clinic input and it shows up in the inspect.Signature and uses the constant in the generated C code. One complication: when using one of t

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: I grepped for clinic in the source code and I have a hunch why this confusing: each clinic-generated block has *three* marker comments, each containing [clinic] or [clinic checksum: ...]. TBH I can't always tell on which side of the comment the generated cod

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: And for Python blocks would you suggest /*[python input] ... [python start generated code]*/ ... /*[python end generated code; checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/ To answer your question: no, it wouldn't be hard. -- _

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Yes. Then I suggest working on a patch before people get too deep into the conversion project. -- ___ Python tracker ___

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I proposed contrary approach. Allow docstring to fake signature. >>> import sys >>> import inspect >>> def foo(blah=sys.maxsize): "foo(blah=sys.maxsize)" pass ... >>> str(inspect.signature(foo)) '(blah=sys.maxsi

[issue19255] Don't "wipe" builtins at shutdown

2014-01-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue20144] Argument Clinic doesn't support named constants as default values

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: storchaka: You propose a result, not an approach. How do you propose we do that? In any case, I think making *that* work would be way too big a change for 3.4. Whatever you proposed would only be appropriate for 3.5. --

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why not just move most (except implementation function headers) generated code out to separate file? Right now the list of symbols in the Kate editor contains three names for every function: BINASCII_A2B_UU_METHODDEF, binascii_a2b_uu and binascii_a2b_uu_impl

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If e.g. binascii_a2b_uu_impl were moved to a different file, how would > binascii_a2b_uu call it without exposing the symbol externally? I think "stitching it with #include" is the only workable solution. We already do this for e.g. stringlib. -- ___

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: I use Emacs, so I have no idea what would help for Kate. I suppose Kate is programmable? Maybe you can add some kind of filter for this purpose? If e.g. binascii_a2b_uu_impl were moved to a different file, how would binascii_a2b_uu call it without exposing

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-06 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: And the stringlib situation confuses the hell out of me already. -- ___ Python tracker ___ ___ Pyt

[issue20153] New-in-3.4 weakref finalizer doc section is already out of date.

2014-01-06 Thread R. David Murray
New submission from R. David Murray: The following discussion section in the weakref docs: http://docs.python.org/dev/library/weakref.html#comparing-finalizers-with-del-methods which was added in 3.4, is out of date because of the GC improvements. It should be tweaked to match the new reality

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I use Emacs, so I have no idea what would help for Kate. I suppose Kate is > programmable? Maybe you can add some kind of filter for this purpose? In comparision with Emacs it is not programmable. > If e.g. binascii_a2b_uu_impl were moved to a different

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In contrast to stringlib programmers should not look in these generated files. -- ___ Python tracker ___ _

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Then the separate file version looks much worse to me. -- ___ Python tracker ___ ___ Python-bugs-l

[issue19723] Argument Clinic should add markers for humans

2014-01-06 Thread Larry Hastings
Larry Hastings added the comment: If it's source code, programmers will need to examine it from time to time. A more important distinction imo: stringlib is type-parameterized like some sort of prehistoric C++ template specialization. Thankfully the gunk generated by Argument Clinic is free

[issue20154] Deadlock in asyncio.StreamReader.readexactly()

2014-01-06 Thread Guido van Rossum
New submission from Guido van Rossum: There's currently a deadlock in StreamReader.readexactly() -- if the requested size is larger than the buffer limit for pause, the transport may be paused with no way to unpause it. See http://code.google.com/p/tulip/issues/detail?id=99 in the Tulip tracke

[issue20154] Deadlock in asyncio.StreamReader.readexactly()

2014-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54d32e01bbfd by Guido van Rossum in branch 'default': asyncio: Fix deadlock in readexactly(). Fixes issue #20154. http://hg.python.org/cpython/rev/54d32e01bbfd -- nosy: +python-dev ___ Python tracker

[issue20154] Deadlock in asyncio.StreamReader.readexactly()

2014-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: I'd appreciate help writing a test. (Debugging this already set me back enough hours.) -- resolution: -> remind ___ Python tracker ___

  1   2   >