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
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
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
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
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
Nick added the comment:
MS VC++ 2005 Express Edition
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1297>
__
___
Python-bugs-list mailing list
Unsubs
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
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
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
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
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
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
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
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
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
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
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
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
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
Nick added the comment:
I have verified that
$ mpirun -np 4 myexe.x moreargs; echo $?
1
--
___
Python tracker
<https://bugs.python.org/issue31881>
___
___
Pytho
Change by Nick :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue31881>
___
___
P
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
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
Change by Nick :
--
resolution: -> works for me
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34549>
___
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
Changes by Nick :
--
components: +Unicode, Windows
nosy: +ezio.melotti
___
Python tracker
<http://bugs.python.org/issue18917>
___
___
Python-bugs-list mailin
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
Changes by Nick :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue18917>
___
___
Python-bugs-list mailing list
Unsubscrib
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
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
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
&
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
Nick Coghlan added the comment:
Fixed committed to SVN as r57461
--
resolution: -> fixed
status: open -> closed
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
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
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
Changes by Nick Coghlan:
--
assignee: -> ncoghlan
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1705170>
_
___
Python-bugs-list mailing li
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
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
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
Nick Coghlan added the comment:
Done in rev 58901
--
resolution: accepted -> fixed
status: open -> closed
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Nick Coghlan :
--
dependencies: +general pprint rewrite
___
Python tracker
<http://bugs.python.org/issue13004>
___
___
Python-bugs-list mailin
Changes by Nick Coghlan :
Removed file: http://bugs.python.org/file22616/pep380-missing-docs.diff
___
Python tracker
<http://bugs.python.org/issue11682>
___
___
Python-bug
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
Changes by Nick Coghlan :
Added file: http://bugs.python.org/file22616/pep380-missing-docs.diff
___
Python tracker
<http://bugs.python.org/issue11682>
___
___
Python-bug
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
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
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
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
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._
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.
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
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
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
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
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
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
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 (
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
'
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
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
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
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
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
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
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
Changes by Nick Coghlan :
--
nosy: +ncoghlan
___
Python tracker
<http://bugs.python.org/issue8060>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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 - 100 of 6501 matches
Mail list logo