[issue46075] CookieJar.extract_cookies doesn't process cookies form local domains when domain is explicitly set in header

2021-12-14 Thread Nick
New submission from Nick : Apparently, CookieJar.extract_cookies doesn't process cookies form local domains which explicitly set domain in Set-Cookie header. That means that headers with domain specified, like "Set-Cookie: foo=baz; Domain=localhost;", are ignored. As far as I

[issue46075] CookieJar.extract_cookies doesn't process cookies form local domains when domain is explicitly set in header

2021-12-14 Thread Nick
Change by Nick : -- keywords: +patch pull_requests: +28330 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30108 ___ Python tracker <https://bugs.python.org/issu

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-18 Thread Nick
New submission from Nick: pyconfig.h checks for _MSC_VER and based on its value decides to include . MS VC++ Express reports _MSC_VER to be 1400 but does _NOT_ have the file basetsd.h. So when including Python.h with the Microsoft VC Express compiler, pyconfig.h will try to include the non

[issue1299] distutils.sysconfig is not cross-platform compatible

2007-10-18 Thread Nick
New submission from Nick: I'm using scons (www.scons.org) and Python's distutils.sysconfig to determine the correct compiler flags automatically to embed Python into my C++ application. I discovered that distuils.sysconfig is not fully implemented on Windo

[issue1299] distutils.sysconfig is not cross-platform compatible

2007-10-19 Thread Nick
Nick added the comment: I'll look into it this weekend. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1299> __ ___ Python-bugs-list mailing list U

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-19 Thread Nick
Nick added the comment: MS VC++ 2005 Express Edition __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1297> __ ___ Python-bugs-list mailing list Unsubs

[issue7914] IntVar() - AttributeError: 'NoneType' object has no attribute 'tk'

2010-02-11 Thread Nick
New submission from Nick : I tried to run the attached code and it seems IntVar() dies in the Tkinter module. After discussion with several other coworkers they seem to agree this may be a bug in Tkinter. If you need more info feel free to let me know and I can help with further testing. OS

[issue7914] IntVar() - AttributeError: 'NoneType' object has no attribute 'tk'

2010-02-11 Thread Nick
Nick added the comment: Ok this was my own mistake and not a bug.. really sorry about this. Moving the following code ABOVE the IntVar() calls allows it to work: app = Tk() app.title("TESTING") app.geometry('300x100+200+100') See revised attached -- status: open

[issue8019] struct.unpack() expects wrong number of bytes

2010-02-25 Thread Nick
Nick added the comment: tested on macosx 10.6.2 64-bit and debian amd64 with both python2.6 and python3.1 the output is always the same: b'\x01\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00' 20 (1, 1, 2, 1, 1) (1, 1, 2, 16777216, 16777216) (1, 1, 2

[issue8019] struct.unpack() expects wrong number of bytes

2010-02-25 Thread Nick
New submission from Nick : the code I'm trying to execute (block is long enough): unpack("2IB2I", block) executing this raises an exception: struct.error: unpack requires a bytes argument of length 20 Setting native byte-order with '@' causes the same error. Specifyi

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-22 Thread Nick
Nick added the comment: Hello is this not the fix? Are there any plans for patch and ctypes 1.0.3? ctypes is a setuptools dependency for various Python 3rd party packages, and this breaks any that enlist ctypes on Solaris. http://sourceware.org/ml/libffi-discuss/2010/msg00016.html

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-22 Thread Nick
Nick added the comment: Unfortunately I also get core dump applying that patch alone. core 'core' of 12847: /usr/local/Python-2.4.6-SunCC/bin/python setup.py test feaf0cfe ffi_call_SYSV (fefb0fc8, 8045898, feaf0b08, feaf08e4, 8045880, 4) + 66 feaf0caf ffi_call_SYSV (feaf08e4, 804

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-23 Thread Nick
Nick added the comment: Martin, the patch is for libffi included in ctypes 1.0.2. This is python 2.4 (required for plone/zope) so python 2.5/2.6 etc is not a possibility. ctypes 1.0.2 compiles with this patch but then core dumps anyway during tests so false hope. It appears to me that no

[issue44810] nturl2path: drive definition

2021-08-02 Thread Nick
New submission from Nick : Due some problem in a third-party package the `url2path` function from `nturl2path` got `a/"https://b"` (without `, `a`,`b` are just masks ) as the first and only argument. In the function there is the following code ( https://github.com/python/cp

[issue44810] nturl2path: drive definition

2021-08-02 Thread Nick
Change by Nick : -- keywords: +patch pull_requests: +26058 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27552 ___ Python tracker <https://bugs.python.org/issu

[issue44810] nturl2path: drive definition

2021-08-02 Thread Nick
Nick added the comment: For the visualization I created a PR with a possible fix. (The link is set into the corresponding field.) If everything is OK, I will perform all the required things like the CLA, news entry... -- ___ Python tracker

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2012-04-12 Thread Nick
Nick added the comment: I faced with the issue on my own PC. For a Russian version of WinOS default PC name is ИВАН-ПК (C8 C2 C0 CD 2D CF CA in hex) and it returns from gethostbyaddr (CRT) exactly in this form (encoded with system locale cp1251 not UTF8). So when the function

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2012-04-12 Thread Nick
Nick added the comment: Originally I tried 3.2.2 (32bit), but I've just checked 3.2.3 and got the same. A code for reproduce is simple: from socket import gethostbyaddr a = gethostbyaddr('127.0.0.1') leads to: Traceback (most recent call last): File "C:\Users\user\test\t

[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-26 Thread Nick
New submission from Nick : If subprocess.run is called with a single string, say: completed_ps = subprocess.run('mpirun -np 4 myexe.x moreargs', shell=True) and 'myexe.x moreargs' fails with a returncode of 1, then 'completed_ps.returncode' is None. However, i

[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-26 Thread Nick
Nick added the comment: I have verified that $ mpirun -np 4 myexe.x moreargs; echo $? 1 -- ___ Python tracker <https://bugs.python.org/issue31881> ___ ___ Pytho

[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-27 Thread Nick
Change by Nick : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue31881> ___ ___ P

[issue34549] unittest docs could use another header

2018-08-30 Thread Nick
New submission from Nick : I find myself reaching for a list of the assert methods in the unittest library often. There are several methods but no clear way to link a URL via a header if you intend to bookmark or send it out. I have been using the method above the section in the meantime

[issue34549] unittest docs could use another header

2018-09-04 Thread Nick
Nick added the comment: Ah, yes! Was searching for one of those helpful "Permalink to this ___" options. Didn't even see the link at the top. Thank you! -- ___ Python tracker <https://bugs.pyt

[issue34549] unittest docs could use another header

2018-09-05 Thread Nick
Change by Nick : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34549> ___

[issue18917] python won't display greek characters in apache under windows

2013-09-03 Thread Nick
New submission from Nick: I've set up apache on Windows 7 and I'm running python with cgi. I have a script that contains this: #!C:\Python34\python.exe print ("Content-Type: text/html; charset=utf-8\n") print ("Δοκιμή") Pretty simple, right? When I'm opening

[issue18917] python won't display greek characters in apache under windows

2013-09-03 Thread Nick
Changes by Nick : -- components: +Unicode, Windows nosy: +ezio.melotti ___ Python tracker <http://bugs.python.org/issue18917> ___ ___ Python-bugs-list mailin

[issue18917] python won't display greek characters in apache under windows

2013-09-04 Thread Nick
Nick added the comment: Turns out adding "SetEnv PYTHONIOENCODING utf-8" to the end of apache's httpd.conf file fixed the problem for me. -- ___ Python tracker <http://bugs.pyt

[issue18917] python won't display greek characters in apache under windows

2013-09-06 Thread Nick
Changes by Nick : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue18917> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2009-07-29 Thread Nick
Nick added the comment: I've stumbled head-first into this bug trying to build ctypes 1.0.2, as required by the python Shapely GIS library for an important Zope project I've been working on. It's a real surprise to see this bug even exists (since 2006!). I don't under

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Nick Drozd
Change by Nick Drozd : -- keywords: +patch pull_requests: +29267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31083 ___ Python tracker <https://bugs.python.org/issu

[issue46763] os.path.samefile incorrect results for shadow copies

2022-02-15 Thread Nick Venenga
New submission from Nick Venenga : shutil.copy fails to copy a file from a shadow copy back to its original file since os.path.samefile returns True. os.path.samefile doesn't reliably detect these files are different since it relies on ino which is the same for both files &

[issue46763] os.path.samefile incorrect results for shadow copies

2022-02-15 Thread Nick Venenga
Nick Venenga added the comment: This script can reproduce the issue. The computer must be a Windows computer with volume shadow copy service enabled The computer must have shadow storage added to the drive being used This script changes the host machine by creating a shadow copy (permissions

[issue1764407] The -m switch does not use the builtin __main__ module

2007-08-25 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed committed to SVN as r57461 -- resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1056] test_cmd_line starts python without -E

2007-09-11 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.6 in rev 58103 (Is the head still being merged to the py3k branch? Or does this need to be forward-ported manually?) -- nosy: +ncoghlan resolution: -> fixed status: open -> closed __ Tracker <[EMAIL

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-09-11 Thread Nick Coghlan
Nick Coghlan added the comment: I like PJE's approach, and the patch works for me. About the only thing I'd change is to switch the expression in PyImport_GetImporter to a simple chain of if-statements in order to: - silence the warning from GCC about an unused value - make it mo

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Changes by Nick Coghlan: -- assignee: -> ncoghlan _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1705170> _ ___ Python-bugs-list mailing li

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.6 in rev 58766. I'm not sure if it will be possible to get this into 2.5.2. Leaving open against 2.5 until it is checked in on the maintenance branch. -- components: +Library (Lib) -None resolution: -> accepted versions: +Py

[issue1705170] contextmanager eats StopIteration

2007-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Close, but not quite. The problem is that the 'value' argument may be None if instantiation of the exception hasn't been forced before __exit__ gets called. >>> class TestWith(object): ... def __enter__(self): ... pass ... def

[issue1291] test_resource fails on recent linux systems (

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: I just hit this as well when rerunning the 2.5 tests before checking something else in. The test itself appears to be fine, but the call to f.close() outside the try/except block attempting to flush the file to disk and raising an IOError. Didn't something

[issue1705170] contextmanager eats StopIteration

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Done in rev 58901 -- resolution: accepted -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1291] test_resource fails on recent linux systems (

2007-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: I just compared the 2.5 test_resource with the trunk test_resource - the latter has been modified to remove the file size limitation before it attempts to close the file, eliminating the test failure without changing the underlying behaviour of f.close

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-17 Thread Nick Coghlan
Nick Coghlan added the comment: Attached an updated version of PJE's patch with the suggested cleanups and a new unit test file (test_cmd_line_script.py). Finding the roundtuits to finish the latter is actually what has taken me so long. The basic tests and the directory tests are curr

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-18 Thread Nick Coghlan
Nick Coghlan added the comment: I worked out what was wrong with my unit tests (I was incorrectly including the path information when adding the test script to the zipfile) I've updated the patch here, and will be committing the change once the test suite finishes running. -- ver

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-18 Thread Nick Coghlan
Nick Coghlan added the comment: Committed as rev 59039 (now to see how the buildbots react for other platforms...) -- resolution: -> accepted status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1739468] Add a -z interpreter flag to execute a zip file

2007-11-19 Thread Nick Coghlan
Nick Coghlan added the comment: Reverted status to open until I figure out why the tests are failing on the Mac OSX buildbot. -- resolution: accepted -> status: closed -> open _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1487] PEP 366 implementation

2007-11-22 Thread Nick Coghlan
New submission from Nick Coghlan: Patch to implement PEP 366. Note that it doesn't implement precisely the semantics described in the version of the PEP posted in July, as some of those ideas didn't prove feasible due to the fact that imp.new_module can't tell the difference

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-09-12 Thread Nick Coghlan
Nick Coghlan added the comment: It wouldn't surprise me at all if the laptop's links were a little off - I started with a Kubuntu image off VMWare's site quite some time ago, then dist-upgraded it through a couple of releases a

[issue6560] socket sendmsg(), recvmsg() methods

2011-09-12 Thread Nick Coghlan
Nick Coghlan added the comment: The feature patch for sendmsg/recvmsg support came with a swathe of new tests, and the failures are in those new tests rather than anything breaking in the old ones. As Charles-François noted though, it doesn't look like the feature implementation itse

[issue12958] test_socket failures on Mac OS X

2011-09-18 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I've now looked into *why* the socket tests are throwing errors in tearDown, and it has to do with the way the threaded client/server tests in test_socket are set up. Specifically, ThreadableTest uses tearDown to reraise any exception raised in the c

[issue1294232] Error in metaclass search order

2011-09-18 Thread Nick Coghlan
Nick Coghlan added the comment: Looking at Daniel's updated patch is still on my to-do list, but I won't object if anyone else wants to take this forward (it will be at least a few weeks before I get to it). -- ___ Python trac

[issue12958] test_socket failures on Mac OS X

2011-09-18 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I'll just deal with the problem directly in test_socket then. It looks like my latest attempt (suppressing unittest._ExpectedFailure in test_socket.ThreadableTest.clientRun) did the trick, so I'll push the updated tests some time this eve

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2011-09-18 Thread Nick Coghlan
Nick Coghlan added the comment: As another data point, this question came up again in the context of issue #12958. The new test_socket.ThreadableTest uses tearDown() to pick up and reraise any exception that occurred in the client thread. This meant that my initial attempts at flagging some

[issue13004] pprint: add option to truncate sequences

2011-09-20 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +general pprint rewrite ___ Python tracker <http://bugs.python.org/issue13004> ___ ___ Python-bugs-list mailin

[issue11682] PEP 380 reference implementation for 3.3

2011-09-20 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file22616/pep380-missing-docs.diff ___ Python tracker <http://bugs.python.org/issue11682> ___ ___ Python-bug

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-09-20 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch should now be complete, including the documentation for the new keyword-only 'file' parameter on various dis module functions. -- Added file: http://bugs.python.org/file23197/issue11816_get_opinfo_branch_201

[issue11682] PEP 380 reference implementation for 3.3

2011-09-20 Thread Nick Coghlan
Changes by Nick Coghlan : Added file: http://bugs.python.org/file22616/pep380-missing-docs.diff ___ Python tracker <http://bugs.python.org/issue11682> ___ ___ Python-bug

[issue11682] PEP 380 reference implementation for 3.3

2011-09-20 Thread Nick Coghlan
Nick Coghlan added the comment: I have updated the bitbucket repo with changes to address most of Benjamin's review comments. A few points of note: - I agree in principle with the idea of splitting Yield and YieldFrom into distinct AST nodes, but I'd prefer to focus on getting t

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: 'Op' is just an abbreviation of 'operation'. So 'operation code' becomes 'opcode' and 'operation information' becomes 'opinfo'. The fact that it comes for the 'dis' module gives the context t

[issue13062] Introspection generator and function closure state

2011-09-29 Thread Nick Coghlan
New submission from Nick Coghlan : Based on the python-ideas thread about closures, I realised there are two features the inspect module could offer to greatly simplify some aspects of testing closure and generator behaviour: inspect.getclosure(func) Returns a dictionary mapping closure

[issue13062] Introspection generator and function closure state

2011-09-29 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, that looks right to me. The eval loop then references those cells from the frame object during execution. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13062] Introspection generator and function closure state

2011-09-29 Thread Nick Coghlan
Nick Coghlan added the comment: Huh, I didn't actually realise getclosure() could be written as a one liner until seeing Meador's version above: {var : cell.cell_contents for var, cell in zip(func.__code__.co_freevars, func._

[issue13075] PEP-0001 contains dead links

2011-09-30 Thread Nick Coghlan
Nick Coghlan added the comment: These pages are all still on python.org - the links just need to be updated to point to the devguide equivalents (under http://docs.python.org/devguide) -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.

[issue13053] Add Capsule migration documentation to "cporting"

2011-10-02 Thread Nick Coghlan
Nick Coghlan added the comment: Mostly looks good - couple of minor comments in Reitveld. As far as the patch flow goes, the 2.x and 3.x branches are actually handled independently (they're too divergent for merging to make sense). So 2.7 and 3.2 will be independent commits, then the ch

[issue13062] Introspection generator and function closure state

2011-10-02 Thread Nick Coghlan
Nick Coghlan added the comment: Because a generator can legitimately have no locals: >>> def gen(): ... yield 1 ... >>> g = gen() >>> g.gi_frame.f_locals {} Errors should be reported as exceptions - AttributeError or TypeError if there's no gi_frame and

[issue13062] Introspection generator and function closure state

2011-10-02 Thread Nick Coghlan
Nick Coghlan added the comment: The function case is simpler - AttributeError or TypeError if there's no __closure__ attribute, empty mapping if there's no closure. I've also changed my mind on the "no frame" generator case - since that mapping will evolve over time

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-04 Thread Nick Coghlan
Nick Coghlan added the comment: Specifically, 2.7.3. A date for that has not yet been set, but somewhere in the December/January time frame is likely. -- ___ Python tracker <http://bugs.python.org/issue7

[issue13101] Module Doc viewer closes when browser window closes on Windows 8

2011-10-04 Thread Nick Coghlan
Nick Coghlan added the comment: If that's the app I think it is (pydoc -g), we're probably going to kill it off in 3.3 in favour of the -b option. -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.o

[issue13101] Module Doc viewer closes when browser window closes on Windows 8

2011-10-04 Thread Nick Coghlan
Nick Coghlan added the comment: Slight correction, pydoc.gui() is already gone in current hg tip. However, this error may be indicative of an underlying problem with webbrowser.open(url) throwing an exception. -- ___ Python tracker <h

[issue13105] Please elaborate on how 2.x and 3.x are different heads

2011-10-06 Thread Nick Coghlan
Nick Coghlan added the comment: This was from memory, so don't take it as gospel as far as the current security-fix-only branches go, but here's what I sent to Larry: - We maintain two independent heads in hg: 2.7 and default 3.2 is open for general bugfixes 2.5 (

[issue12602] Missing using docs cross-references

2011-10-07 Thread Nick Coghlan
Nick Coghlan added the comment: The 'using docs' are, oddly enough, the part of the docs called 'using' :) In particular, the part about the command line components (including the '

[issue8087] Unupdated source file in traceback

2011-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: (just reviewing the idea here, not the current patch) The problem of "stale code" (i.e. what was executed doesn't match what is displayed in the traceback) is a tricky and subtle one. There are a few different cases: 1. Source displayed does n

[issue13062] Introspection generator and function closure state

2011-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: No, the naming problem had occurred to me as well. Given the 'vars' builtin, perhaps 'getclosurevars' would do as the name? -- ___ Python tracker <http://bug

[issue13062] Introspection generator and function closure state

2011-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: In reviewing Meador's patch (which otherwise looks pretty good), I had a thought about the functionality and signature of getclosurevars(). Currently, it equates "closure" to "nonlocal scope", which isn't really true - the fu

[issue12602] Missing cross-references in Doc/using

2011-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: Don't feel bad about not recognising the context - this stuff wasn't documented at all for a long time, and it wasn't until Georg pointed me to the usage docs that I realised adding it there would be the right place. I should have remembered tha

[issue13187] relative imports don't work when circular

2011-10-15 Thread Nick Coghlan
Nick Coghlan added the comment: This is the same problem that all "from x import y" circular imports have - it isn't specific to relative imports. Closing as a duplicate of issue 992389 -- resolution: -> duplicate status: open -> closed superseder: -> attrib

[issue992389] attribute error due to circular import

2011-10-15 Thread Nick Coghlan
Nick Coghlan added the comment: Changed the issue title to state clearly that the core issue is with circular imports that attempt to reference module contents at import time, regardless of the syntactic form used. All of the following module level code can fail due to this problem

[issue415492] Compiler generates relative filenames

2011-10-16 Thread Nick Coghlan
Nick Coghlan added the comment: It's fairly easy to check this is still a problem: $ ./python Python 3.3.0a0 (default:a06ef7ab7321, Sep 22 2011, 13:41:29) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credits" or "license

[issue8060] PEP 3101 string formatting missing engineering presentation type for floating point

2011-10-17 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue8060> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: They were removed because adding new methods to builtin types violated the language moratorium. Now that the language moratorium is over, the transform/untransform convenience APIs should be added again for 3.3. It's an approved change, the original t

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry, I meant to state my rationale for the unassignment - I'm assuming this issue is covered by MAL's recent decision to step away from Unicode and codec maintenance issues. If that's incorrect, MAL can reclaim the issue, otherwise unassigning

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: Some further comments after getting back up to speed with the actual status of this problem (i.e. that we had issues with the error checking and reporting in the original 3.2 commit). 1. I agree with the position that the codecs module itself is intended to be

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, typo in my second error example. The command should be: b'a'.decode('rot_13') (Since str objects don't offer a decode() method any more) -- ___ Python tracker <http

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: On Thu, Oct 20, 2011 at 8:34 AM, STINNER Victor wrote: >> str.transform('bz2') ==> CodecLookupError > > A lookup error is surprising here. It may be a TypeError instead. The bz2 can > be used with .transform, but not on str. So:

[issue13227] Option to make the lru_cache type specific

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: Features looks good, but the current patch doesn't handle keyword arguments correctly (more details in the Reitveld review). -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/is

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: I'm fine with people needing to drop down to the lower level lookup() API if they want the filtering functionality in Python code. For most purposes, constraining the expected codec input and output formats really isn't a major issue - we just need

[issue13229] Add shutil.filter_walk

2011-10-19 Thread Nick Coghlan
New submission from Nick Coghlan : I needed a depth-limited, filtered search of a directory tree recently and came up with the following wrapper around os.walk that brings in a few niceties like glob-style filtering, depth limiting and symlink traversal that is safe from infinite loops. It

[issue13227] Option to make the lru_cache type specific

2011-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me (although it took me longer than it should have to figure out why you didn't need to store the keyword argument names a second time) -- ___ Python tracker <http://bugs.python.org/is

[issue13237] subprocess docs should use emphasise convenience functions

2011-10-20 Thread Nick Coghlan
New submission from Nick Coghlan : Many typical subprocess use cases can now be handled simply via the convenience functions: subprocess.call() subprocess.check_call() subprocess.check_output() However, readers of the documentation could be forgiven for not realising that, since the

[issue13238] Add shell command helpers to shutil module

2011-10-20 Thread Nick Coghlan
New submission from Nick Coghlan : I've been doing a few systems administration tasks with Python recently, and shell command invocation directly via the subprocess module is annoyingly clunky (even with the new convenience APIs). Since subprocess needs to avoid the shell by defaul

[issue13237] subprocess docs should emphasise convenience functions

2011-10-20 Thread Nick Coghlan
Changes by Nick Coghlan : -- title: subprocess docs should use emphasise convenience functions -> subprocess docs should emphasise convenience functions ___ Python tracker <http://bugs.python.org/issu

[issue13238] Add shell command helpers to shutil module

2011-10-20 Thread Nick Coghlan
Nick Coghlan added the comment: And that's exactly the problem - a web developer's or security auditor's "shell injection" is a system administrator's "this language sucks". These wrappers are the kind of thing you want for shell invocations when us

[issue13238] Add shell command helpers to shutil module

2011-10-20 Thread Nick Coghlan
Nick Coghlan added the comment: Perhaps a better idea would be to use different names, so it's clearer at the point of invocation that the shell is being invoked (and hence shell injection attacks are a potential concern). For example: shell_call check_shell_call check_shell_o

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: Of the 3 available options (mod style, string.Template and str.format), yes, str.format is the best choice. If people want the shell meaning of the braces, they can escape them by doubling them up in the command string

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: Initially, because I was suggesting the names shadow the subprocess convenience functions so they *had* to live in a different namespace. However, even after changing the names to explicitly include "shell", I'd like to keep them away f

[issue13237] subprocess docs should emphasise convenience functions

2011-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: You couldn't just move them - you'd need to change the wording of how they cross-link to each other, since the explanations of the convenience function currently assume you understand how Popen works. I'd like us to get to the point where y

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: It's a flow thing. This idea was kicked off by the process of translating a large Perl script to Python and paying attention to what the translation made *worse*. One of the big things it made worse was the translation of "qx" (quoted executab

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Nick Coghlan
Nick Coghlan added the comment: That's a fair point, but I think it actually *improves* the argument for better helper functions, since we can have them automatically invoke shlex.quote() on all of the arguments: def _shell_format(cmd, args, kwds): args = map(shlex.quote,

[issue13105] Please elaborate on how 2.x and 3.x are different heads

2011-10-23 Thread Nick Coghlan
Nick Coghlan added the comment: The devguide actually did align with what I said in my email, but this wasn't clear if you only read the "Forward Porting" section (you had to read the "Porting Between Major Versions" section further down the page as well). I add

[issue1294232] Error in metaclass search order

2011-10-23 Thread Nick Coghlan
Nick Coghlan added the comment: Fix has been applied to 3.x and hence will be in 3.3 and the next 3.2 release. I have adjusted the issue metadata to reflect the fact 2,7 still exhibits the problem, but the patch requires significant work to account for the 3.x vs 2.x changes in class

[issue13252] new decumulate() function in itertools module

2011-10-24 Thread Nick Coghlan
Nick Coghlan added the comment: OK, looking at the code I realised what you're trying to get at is the idea of reporting the differences between values in a series, such that: x = list(accumulate(seq)) assert x == list(accumulate(differences(x))) I don't think the use cases ar

  1   2   3   4   5   6   7   8   9   10   >