STINNER Victor added the comment:
Can someone propose a patch instead of inline code?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15805
___
STINNER Victor added the comment:
Raised by what?
The test raising the assertion error is a Python authorizer callback which
returns a Python int (2**32) larger than a C int ( INT_MAX) and so an
OverflowError is raised in the C authorizer callback.
Are you sure you don't just need to clear
Roundup Robot added the comment:
New changeset 020dbfdf9517 by Victor Stinner in branch 'default':
Issue #18488: Fix _pysqlite_final_callback()
http://hg.python.org/cpython/rev/020dbfdf9517
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
+1 for PyException_SetContext or similar. The C code should behave like a
finally: x.finalize().
If the Python callback failed in _pysqlite_step_callback() or
_pysqlite_final_callback(): the exception is printed if
sqlite3.enable_callback_tracebacks() has
Ronald Oussoren added the comment:
As mentioned on python-dev the current behavior seems sane.
1) Just like __getitem__ and __setitem__, __contains__ raises an
exception when the key value cannot be used as a key (which normally
is a programming error)
2) There are values that compare
Raymond Hettinger added the comment:
There's no bug here. It is the way Python has worked for 23 years.
--
nosy: +rhettinger
versions: -Python 2.7, Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18510
Ronald Oussoren added the comment:
I agree, and the thread on python-dev[1] also came to that conclusion, I'm
therefore closing this issue.
[1] http://code.activestate.com/lists/python-dev/123385/
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
Ronald Oussoren added the comment:
I cannot reproduce this with a recent 2.7 build from mercurial, but can
reproduce with /usr/bin/python (2.7.2) on OSX 10.8 and python 2.7.3 on Centos
6.4 system.
--
nosy: +ronaldoussoren
versions: +Python 2.7 -Python 2.6
Christian Heimes added the comment:
Please open an interactive interpreter shell and show us the output of
import shutil
print shutil.__file__
print dir(shutil)
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18524
___
Saurabh Gupta added the comment:
import shutil
shutil.__file__
'C:\\Python26\\lib\\shutil.pyc'
dir(shutil)
['Error', '__all__', '__builtins__', '__doc__', '__file__', '__name__',
'__package__', '_basename', '_samefile', 'abspath', 'copy', 'copy2',
'copyfile', 'copyfileobj', 'copymode',
Saurabh Gupta added the comment:
And, the same thing on linux:
import shutil
print shutil.__file__
/software/package/linux64_centos6/python/2.6.7/lib/python2.6/shutil.pyc
print dir(shutil)
['Error', 'WindowsError', '__all__', '__builtins__', '__doc__', '__file__', '__n
ame__', '__package__',
Christian Heimes added the comment:
Seems legit ... I don't have access to a Windows system right now so I can't
test it.
WindowsError is globally available on Windows. You don't have to import it from
shutil. Portable application should use OSError instead of WindowsError.
WindowsError is a
Saurabh Gupta added the comment:
I have a legacy software that has things like:
try:
some stuff
except OSError, why:
if WindowsError is not None and isinstance(why, WindowsError):
do something
else:
do something else
So I'd ideally like
Ronald Oussoren added the comment:
WindowsError is not part of the documented interface of shutil, but is an
implementation detail.
from shutil import WindowsUtil works on Unix platforms because shutil
contains a compatibility definition:
try:
WindowsError
except NameError:
Tim Golden added the comment:
Really this should be a wont-fix: the fact that it's possible to import
WindowsError from shutil (on Linux) is an accident of its internal
implementation. It's certainly not documented as such.
Saurabh: WindowsError is a builtin on Windows. If you want to mimic
Ronald Oussoren added the comment:
I agree that this should be closed.
--
resolution: - wont fix
status: open - closed
versions: +Python 2.7, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18525
Christian Heimes added the comment:
I'd like to have a patch by tonight. This issue is one of two remaining bugs
that are considered high impact by Coverity Scan. The other one looks like a
false positive. I have an interview with Coverity tomorrow about the
development style and quality of
New submission from Christian Heimes:
According to
http://hg.python.org/cpython/file/878dc9dfc565/Modules/zlib/ChangeLog our
repository has zlib 1.2.5. zlib 1.2.8 is out for a while, http://zlib.net/
I'd like to update our copy of zlib to 1.2.8.
--
assignee: christian.heimes
Christian Heimes added the comment:
Good point, but I think it should be `q[MAXPATHLEN + 1] = L'\0';`.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15905
___
Larry Hastings added the comment:
Patch for 3.3. or trunk?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17899
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Agree.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15905
___
___
Python-bugs-list mailing list
Saurabh Gupta added the comment:
Thank you all for your inputs!
Now I understand what the issue really is would be fixing it by removing the
imports in the legacy software.
I agree with the won't fix resolution of the ticket.
--
___
Python tracker
Christian Heimes added the comment:
Preferable both but Coverity Scan uses only trunk. We could commit the patch to
trunk first and test if Coverity still detects the leak.
--
___
Python tracker rep...@bugs.python.org
Indra Talip added the comment:
patch adds regressions tests to ensure timeout value from OpenerDirector is
honoured and a failing test for a default value for Request.timeout that passes
when the patch that initialises Request.timeout is applied.
--
Added file:
Roundup Robot added the comment:
New changeset dca92e8a011a by Christian Heimes in branch '3.3':
Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],
http://hg.python.org/cpython/rev/dca92e8a011a
New changeset 01597384531f by Christian Heimes in branch 'default':
Issue
Christian Heimes added the comment:
Thanks!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15905
___
Ronald Oussoren added the comment:
As mentioned by Ned this is a duplicate of #8716.
The proposed change to tkinter initialization in msg81468 might be useful to
look into, but I'm not interested in doing that work because I don't use
Tkinter myself which makes it harder to test if the
Rock Lee added the comment:
Any progress for this issue?
I changed the title of the issue.
--
title: test_ftp failure / ftplib error formatting issue - format str bug in
urllib request.py
___
Python tracker rep...@bugs.python.org
New submission from Christian Heimes:
Coverity claims that sock_accept() may leak a fd. I have been starring at the
code for a while and I'm still not sure if Coverity is right. The macros make
the code paths hard to follow. The attached patch is simple and should not be a
performance issue.
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +pitrou, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18528
___
___
Antoine Pitrou added the comment:
What if you add errno = 0 at the beginning of the function? Perhaps Coverity
is confused by the fact that we use CHECK_ERRNO() to infer whether accept()
succeeded or not, rather than simply checking the return value.
I don't like your patch, because it adds a
New submission from Serhiy Storchaka:
Currently Python documentation uses four type of dashes for same meaning:
1. Hyphen with spaces.
2. En-dash with spaces.
3. Em-dash with spaces.
4. Em-dash without spaces.
Definitely the first case is just wrong and other three cases should be
unified.
Serhiy Storchaka added the comment:
Here is an alternative patch which replaces spaced hyphens and en-dashes and
non-spaced em-dashes to em-dashes with spaces.
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
stage: - patch review
type: - enhancement
Christian Heimes added the comment:
Coverity may not understand the interaction with errno at all. Or it may simple
point out that some operating systems are not standard conform and our
assumption is not universally true.
Here is a patch that raises an exception when newfd != INVALID_SOCKET.
Antoine Pitrou added the comment:
Coverity may not understand the interaction with errno at all. Or it
may simple point out that some operating systems are not standard
conform and our assumption is not universally true.
Have you tried to reset errno at the beginning of the function?
Barry A. Warsaw added the comment:
In general, I like where this is going. I agree that a stdout redirector is
probably the most common case, and for that, it almost always (for me)
redirects to an open file. The use case for stderr redirection is usually,
but not always, to redirect stderr to
Ronald Oussoren added the comment:
issue-18181-full-v2.txt adds more tests to v1 and has slightly better
documentation (still not good enough).
A major issue with the patch: for some reason the tests pass when run
standalone (./python.exe -m test.regrtest test_pep447), but crash when I run
A. Jesse Jiryu Davis added the comment:
Bump.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18418
___
___
Python-bugs-list mailing list
Matthew Barnett added the comment:
I've attached my attempt at a patch.
--
keywords: +patch
nosy: +mrabarnett
Added file: http://bugs.python.org/file31009/issue16964.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16964
New submission from Alex Gaynor:
Right now it calls islink(), which does an lstat, and then does its own lstat
on the same path. This can be optimized by inlining the body of islink and
reusing the stat result.
(This has been identified as an actual issue in openstack-swift
Changes by Ronald Oussoren ronaldousso...@mac.com:
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12669
___
___
Alex Gaynor added the comment:
Attached is a simple first pass at a diff against 2.7, shoudl be easy to port
it to default.
--
keywords: +patch
Added file: http://bugs.python.org/file31010/ismount.diff
___
Python tracker rep...@bugs.python.org
Alex Gaynor added the comment:
Addresses the review comments: returns to catching all oserrors
--
Added file: http://bugs.python.org/file31011/ismount.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18530
Alex Gaynor added the comment:
Attached patch is against default. I don't have my ssh keys set up for this
machine, so if someone else could land I'd be appreciative :)
(Not sure if this qualifies for a backport)
--
Added file: http://bugs.python.org/file31012/ismount-3k.diff
Samwyse added the comment:
Fixes Serhiy Storchaka's complaints, removes duplicate test.
--
nosy: +samwyse
Added file: http://bugs.python.org/file31013/test_urlparse.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18191
Samwyse added the comment:
Handles raw IPv6 URLs
--
Added file: http://bugs.python.org/file31015/urllib.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18191
___
Christian Heimes added the comment:
LGTM
--
nosy: +christian.heimes
stage: - patch review
type: - resource usage
versions: +Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18530
Changes by Christian Heimes li...@cheimes.de:
Removed file: http://bugs.python.org/file31007/closesock2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18528
___
Ronald Oussoren added the comment:
The crash was due to a bug in the test extension. Fixed in version 2b.
--
title: Add type.__locallookup__ - PEP447: Add type.__locallookup__
Added file: http://bugs.python.org/file31014/issue-18181-full-v2b.txt
___
Christian Heimes added the comment:
This patch does the trick.
--
Added file: http://bugs.python.org/file31016/closesock3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18528
___
Changes by Christian Heimes li...@cheimes.de:
Removed file: http://bugs.python.org/file31004/closesock.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18528
___
Serhiy Storchaka added the comment:
Larry, you forgot to remove #undef HAVE_FDOPENDIR at the start of the file.
Beside this line the patch LGTM. I withdraw my objections in msg190887 because
`close(fd)` can fail and change errno.
--
___
Python
Christian Heimes added the comment:
Am 22.07.2013 16:00, schrieb Antoine Pitrou:
Have you tried to reset errno at the beginning of the function?
It doesn't affect Coverity's report:
BEGIN_SELECT_LOOP(s)
Py_BEGIN_ALLOW_THREADS
+errno = 0;
timeout = internal_select_ex(s, 0,
Brian Curtin added the comment:
Benjamin probably has the final say on backporting this to 2.7. I'm doing the
3.3/default commit right now.
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18530
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: serhiy.storchaka -
stage: committed/rejected -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
Roundup Robot added the comment:
New changeset bb63f813a00f by Serhiy Storchaka in branch '3.3':
Issue #17944: test_zipfile now discoverable and uses subclassing to
http://hg.python.org/cpython/rev/bb63f813a00f
New changeset 5812a3683402 by Serhiy Storchaka in branch 'default':
Issue #17944:
Brian Curtin added the comment:
^That takes care of default. I misspoke in an earlier comment about 3.3 - that
should probably be determined by that RM (Georg?)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18530
Serhiy Storchaka added the comment:
If there are no objections I'm going to commit patches soon.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16741
___
Roundup Robot added the comment:
New changeset 240adc564539 by Brian Curtin in branch 'default':
Fix #18530. Remove extra stat call from posixpath.ismount
http://hg.python.org/cpython/rev/240adc564539
--
nosy: +python-dev
___
Python tracker
Serhiy Storchaka added the comment:
This bug should be fixed in 2.7 if it exists.
It doesn't exists in 2.7.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Christian Heimes added the comment:
May I suggest a simpler patch that closes the fd sooner?
--
Added file: http://bugs.python.org/file31017/listdir_fd.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17899
Changes by Brett Cannon br...@python.org:
--
nosy: -brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15805
___
___
Python-bugs-list
New submission from Barry A. Warsaw:
A colleague discovered an interesting implementation different between
C-defined functions and Python-defined functions called with **kws arguments.
He tried to do this:
from collections import defaultdict
'{foo}{bar}'.format(**defaultdict(str))
''
He
Alex Gaynor added the comment:
I'll confirm that PyPy raises a KeyError on the format() code.
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18531
___
Christian Heimes added the comment:
I don't like the idea to change the behavior of 2.7 so late in its release
cycle. Benjamin, what's your opinion?
--
nosy: +benjamin.peterson, christian.heimes
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I prefer to avoid conversion to/from base64, and use random.choice() instead:
see attached patch.
--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file31018/crypt_salt_choice.patch
___
Python
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - duplicate
status: open - closed
superseder: - test_signal.test_issue9324() fails on buildbot AMD64 Windows7
SP1 3.x
___
Python tracker rep...@bugs.python.org
Christian Tismer added the comment:
Hi Tim,
Yes, this would be great to get sorted out.
Then we could make watchdog.py automatically
configure itself for network mounts.
Right now this makes no nense because of windows.
cheers - chris
--
nosy: +Christian.Tismer
New submission from Jason R. Coombs:
In hashlib, the HASH objects currently supply a 'name' attribute, reflecting
the name used to initialize the hash object, and they have since Python 2.5.
However, this interface is not published so isn't honored by other platforms
(namely pypy).
I propose
Christian Heimes added the comment:
Sounds like a good idea.
--
nosy: +christian.heimes, gregory.p.smith
stage: - needs patch
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18532
Benjamin Peterson added the comment:
Yeah, let's just fix Python 3.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16741
___
___
Terry J. Reedy added the comment:
In 3.3.2, 3.4.0 the traceback says that the invalid continuation byte
(immediately, when 'าข' is pasted) is ED. Snipped version is
File F:\Python\dev\py33\lib\tkinter\__init__.py, line 1071,
self.tk.mainloop(n)
UnicodeDecodeError: 'utf-8' codec can't
Roundup Robot added the comment:
New changeset fc718c177ee6 by Victor Stinner in branch 'default':
Issue #18520: Add a new PyStructSequence_InitType2() function, same than
http://hg.python.org/cpython/rev/fc718c177ee6
New changeset 9b77b3ee6fb8 by Victor Stinner in branch 'default':
Issue
Daniel Holth added the comment:
fwiw pypy 2 supports HASH.name but the older 1.9 (still part of some Linux
distributions) did not.
--
nosy: +dholth
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18532
Derek Wilson added the comment:
Custom cert validation may make sense in edge cases, so this looks interesting.
But I got here looking to file a bug on the returning empty dict from
SSLContext.getpeercert - I don't feel like that makes sense. Its not like a
peer cert doesn't exist just
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18533
___
___
Python-bugs-list
New submission from Ben North:
#18019 noted the following crash in earlier 2.7:
d={}
d[42]=d.viewvalues()
d
segmentation fault
This issue has been fixed; the behaviour now is that a RuntimeError is
produced for a recursive dictionary view:
d={}
d[42]=d.viewvalues()
d # (output
STINNER Victor added the comment:
I ran my test for more than 30 minutes and I didn't find any interesting bug
anymore, so I'm closing the issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Terry J. Reedy added the comment:
Fixing 3.3 is more likely that 3.4. I can view RuntimeError as a bug less
obnoxious than crash, but others may differ. Ultimately, the release managers
can decide. This is definitely appropriate for 3.4, so please add tests. If the
patch is for 2.7, please
Jan Kaliszewski added the comment:
As I wrote on the list -- IMHO it's still a bug (even though not so painful as
segfault) that should also be fixed in 2.7 and 3.2/3.3. In other cases (such
as `d={}; d[42]=d; repr(d)`) Python does its best to avoid an error -- why in
this case (`d={};
Nick Coghlan added the comment:
I'd prefer to keep the separate stream argument rather than duplicating the
signature of open. Separation of concerns and all that :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15805
Alexander Belopolsky added the comment:
It would be nice if this context manager had an option to redirect the file
descriptor 0 rather than just sys.stdout. (For those familiar with py.test, I
am asking for an equivalent of --capture=fd functionality.)
Unlike patching sys.stdout, which is
Alexander Belopolsky added the comment:
In my post fd 0 should have been fd 1, of course. (Proving that it is not
trivial to get it right:-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15805
Meador Inge added the comment:
On Linux gcc and ld are used to implement 'find_library' and 'dlopen' is used
to implement 'CDLL'. ld searches /usr/local/lib. 'dlopen' might not if the
LD_LIBRARY_PATH isn't set up to do so. For example:
[meadori@li589-207 cpython]$ ls /usr/local/lib
Nick Coghlan added the comment:
Alexander, please read the earlier comments on the issue: we're deliberately
*not* doing that. Such functionality is more advanced, and more appropriate for
an API in the subprocess module. Anyone interested in exploring that option
further should create a
Changes by Phil Webster webster.p...@gmail.com:
--
nosy: +philwebster
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list
Changes by R. Jayakrishnan raaj...@gmail.com:
--
nosy: +Todd.Rovito
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18504
___
___
Python-bugs-list
Larry Hastings added the comment:
I've been staring at the code. I just realized: we really should call
path_error() as soon as possible once we detect the error--as Christian's patch
points out, close() will clear the error. So instead of playing footsie with
assigning (further) to errno,
Larry Hastings added the comment:
Attached is a new patch for trunk, removing the #undef HAVE_FDOPENDIR debug
scaffolding, and rearranging the lines of error handling so close doesn't clear
the errno before we use it.
By cracky, while most days I do enjoy the exacting pedantry of the Python
Larry Hastings added the comment:
If someone will give me an LGTM I'll check these in tonight, honest, cross my
heart.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17899
___
Larry Hastings added the comment:
And here's an updated patch for 3.3; the only change from the previous 3.3
patch is that I call path_error before calling close.
--
Added file:
http://bugs.python.org/file31021/larry.3.3.listdir.fd.leakage.bug.2.patch
Alexander Belopolsky added the comment:
Yes, I did miss Victor's dup2() comment. (It looks like I did not subscribe to
this issue from the start and missed early discussion - sorry.)
The simple feature is not very useful for me. I have to deal with too many
cases of misguided code like
Steven Johnson added the comment:
Should the docs then be changed for find_library to inform that It is not
guaranteed that a found library can be opened (at least for linux)?
Or would a feature request for full paths from find_library for linux be more
appropriate?
It seems hackish to me,
New submission from Nick Coghlan:
Currently, if a byte sequence is passed to open() as the file name, the
resulting file will have that object as its name:
open(os.path.expanduser(b~/.hgrc))
_io.TextIOWrapper name=b'/home/ncoghlan/.hgrc' mode='r' encoding='UTF-8'
95 matches
Mail list logo