Serhiy Storchaka added the comment:
I think both (PyException_SetContext), as in Python code. See
textiowrapper_close() in Modules/_io/textio.c for example.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18488
Antoine Pitrou added the comment:
if
(perhaps someone is calling your library and passing it the wrong type)
they would be guarded against this common error.
OTOH, if your library is concerned about unwanted bytes objects, you can add an
explicit type check.
That said, I don't see any
Antoine Pitrou added the comment:
I don't know why your patch is putting this in the thread state, though...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18373
___
Antoine Pitrou added the comment:
I think ExceptionSummary could be the visible API, instead of adding an
indirection through a separate global function.
Also, I don't think having the exc_traceback list of tuples is future-proof.
What if we want to add some information to each traceback
Antoine Pitrou added the comment:
Is it common practice to ignore test files in coverage reports?
It sounds like not omitting them can help you find out if e.g. some tests are
not run by mistake.
--
nosy: +pitrou
___
Python tracker
Julien Phalip added the comment:
I'm attaching a suggested patch to fix the issues relating to
serializing/deserializing the httponly and secure flags. The main idea is that
for a flag to be active, it needs to both be set and have the True value.
I think this is a much more correct and saner
Antoine Pitrou added the comment:
Thanks for the patch, I will take a look.
--
stage: needs patch - patch review
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9177
Antoine Pitrou added the comment:
Apparently, Django supports of variant of that format:
https://docs.djangoproject.com/en/1.4/topics/auth/#using-bcrypt-with-django
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14518
Antoine Pitrou added the comment:
Do you have to put those certs in capath? Things would probably be simpler if
you didn't have to trigger capath loading using an actual SSL connection.
Also, please a versionadded tag in the doc entry.
--
___
Python
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18381
___
___
Python-bugs-list mailing
R. Jayakrishnan added the comment:
Thanks Terry for we have the option of gui tests when mocking becomes too
complicated
I put two separate classes IdleHistoryMockTest and IdleHistoryTKTest for mock
and TK text usages and used TK Text to test IdleHistory.history_do function.
This worked for
Vajrasky Kok added the comment:
The script for demonstrating bug can be simplified to:
---
import urllib.request
url =
New submission from abdulet:
Hi all,
I'm ebedding a python program into C++ ecap library. Everything works fine
until I'v try to import sqlite3. When I try to import it I give the following
exception:
Traceback (most recent call last):
', ' File /usr/local/squid/bin/putAdds.py, line 4, in
Christian Heimes added the comment:
Hello Abdulet,
the issue tracker isn't the best place to get help for your problem. May I
suggest that you write a mail to the Python user list or one of the more
specialized lists like the CAPI SIG and C++ SIG?
http://mail.python.org/mailman/listinfo
Christian Heimes added the comment:
The crypt module is just a thin wrapper around crypt(3). Some operating systems
have support for $2a$ but apparently I don't have one at home. Django uses
https://code.google.com/p/py-bcrypt/source/browse/#hg%2Fbcrypt
http://linux.die.net/man/3/crypt
Christian Heimes added the comment:
It's just one certificate. The hash format of OpenSSL has changed over the
years so we have to duplicate all certificates. But I don't need the extra
stuff. I figured out that the Nokia test certificate has all new fields.
My initial patch has a
abdulet added the comment:
Ok it looks like a bug for me, sorry for the inconveniences
Thanks and regards
Abdul
TECNOCOM
Abdul Pallarès Calvi
Técnico Especialista
Sistemas gestionados
Entença, 335
Barcelona 08029
Tel. Fijo: (+34) 934953167
Tel. Móvil / Fax: (+34) 647970296 / (+34)
Antoine Pitrou added the comment:
It's just one certificate.
Indeed, it's just the decision to use capath that I'm arguing with.
My initial patch has a versionchanged doc update. Did you have too
much French wine again? *scnr* :)
Not *too much*, no ;-)
--
Christian Heimes added the comment:
The problem may not be a bug but a deliberate design choice. urllib is rather
low level and doesn't implement some browser magic. Browsers handle stuff like
'ä' - '%C3%A4', ' ' - '%20' or IDNA but urllib doesn't. I always saw it as
may responsibility to
Daniel Holth added the comment:
On Thu, Jul 18, 2013, at 04:22 AM, Antoine Pitrou wrote:
Antoine Pitrou added the comment:
I don't know why your patch is putting this in the thread state,
though...
If you have multiple threads one thread might want exceptions when
str(bytes), and the
Antoine Pitrou added the comment:
I don't know why your patch is putting this in the thread state,
though...
If you have multiple threads one thread might want exceptions when
str(bytes), and the other might not.
That sounds too much of a special case to me. You can still catch
Ezio Melotti added the comment:
I'm not sure it's worth changing it.
As I see it, match/search are supposed to work with str or bytes and they
return str/bytes accordingly. The fact that they work with other bytes-like
objects seems to me an undocumented implementation detail people should
Brett Cannon added the comment:
The key problem with keeping them is that beginners might mistake that a test
didn't run simply because some resource wasn't available when the tests were
run (e.g. I forget to run the coverage report so I do it on an airport to the
conference and have no
Antoine Pitrou added the comment:
The key problem with keeping them is that beginners might mistake
that a test didn't run simply because some resource wasn't available
when the tests were run (e.g. I forget to run the coverage report so
I do it on an airport to the conference and have no
Matthew Barnett added the comment:
There's also the fact that the match object keeps a reference to the target
string anyway:
import re
t = memoryview(ba)
t
memory at 0x0100F110
m = re.match(ba, t)
m.string
memory at 0x0100F110
On that subject, buried in the source code (_sre.c) is the
R. David Murray added the comment:
I presume you mean you are motivated to turn it on (to catch the bugs). I
still think that also fixing the bugs in the other places str(bytes) is used
would be better. Are they occurring in third party libraries? How often do
you run into it?
--
Björn Sandberg Lynch added the comment:
I was trying to stay with the established pattern of the existing methods.
There are two unrelated issues to solve here - deferring linecache access, and
the extract_exception functionality.
When it comes to deferral, we could wrap each line in a
Ezio Melotti added the comment:
match/search are supposed to work with str or bytes and
they return str/bytes accordingly.
s/they return/calling m.group() returns/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18468
Antoine Pitrou added the comment:
When it comes to deferral, we could wrap each line in a different
class than tuple, but this constitutes a public API change (and this
is a *very* widely used library). Even changing to a namedtuple
would cause a lot of grief, since we'd break lots of
Brett Cannon added the comment:
The problem is confusing new contributors.
Why wasn't this test run?
Because you're not on OS X.
Why wasn't this run?
I didn't have internet at the time.
It's noise that's unnecessary. People should be focusing on the coverage of the
modules in the stdlib and
John Dennis added the comment:
I think your basic approach is fine and it's O.K. to break backwards
compatibility. I'm not sure anyone was using the httponly and secure flags in
the past because it was so broken, the logic was completely contradictory, so
backwards compatibility should not
Antoine Pitrou added the comment:
The problem is confusing new contributors.
Why wasn't this test run?
Because you're not on OS X.
Why wasn't this run?
I didn't have internet at the time.
Well, you're trying to fix a symptom, rather than the underlying cause.
And the concept of skipped
New submission from Paul Moore:
Adds exe wrapper functionality to the Windows launcher. This is a preliminary
patch, for comments - the code is there and works, but I need to add
documentation (and maybe tests - are there any existing tests for the launcher?)
Also to be considered: should the
Changes by Paul Moore p.f.mo...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file30966/launcher_wrapper.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18491
___
Changes by Paul Moore p.f.mo...@gmail.com:
--
nosy: +tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18491
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17933
___
___
Giampaolo Rodola' added the comment:
I cannot reproduce the issue on Ubuntu.
As for the second exception I think it's safe to just do:
- raise URLError('ftp error: %d' % reason) from reason
+ raise URLError('ftp error: %s' % reason) from reason
(will commit that later)
--
Guido van Rossum added the comment:
Ezio Melotti added the comment:
[...]
IIUC the advantage of changing the behavior is that it won't keep the target
string alive anymore, but on the other hand is not backward compatible and
makes things more difficult for people who want the same type
Rock Lee added the comment:
Bug in urllib/request.py.
format string formatted error type variable
2373 except ftplib.error_perm as reason:
2374 raise URLError('ftp error: %d' % reason) from reason
variable reason here is a instance of class ftplib.error_perm.
We need to passed in
Rock Lee added the comment:
Fixed like this:
raise URLError('ftp error: %d' % int(str(reason)[:3])) from reason
I think this is the original author's intention.
Actually, need to fix two places in urllib/request.py
--
___
Python tracker
Giampaolo Rodola' added the comment:
That's not safe as a misbehaving FTP server might not send a response code at
all (highly unlikely but still...).
Furthermore having the complete server response (response code + accompaining
message) is a lot more helpful.
--
Vajrasky Kok added the comment:
I have no problem if this ticket is classified as won't fix.
I am writing this for the confused souls who want to use urllib to access url
containing non-ascii characters:
import urllib.request
from urllib.parse import quote
url =
Rock Lee added the comment:
yes, the malformed server could do evil things. If we need to cover this
situation, we need to some extra fixes in this file.
Maybe the exception message look like this is the better one ?
ftplib.error_perm: 550 Failed to change directory
--
Giampaolo Rodola' added the comment:
I think raise URLError('ftp error: %s' % reason) from reason is just fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17933
___
Rock Lee added the comment:
Yes, the simplest fix is just replace '%d' to '%s'.
Line 2362 and 2374 all need to modify.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17933
___
New submission from Zachary Ware:
Here's a patch to implement the idea I posted in issue18258, msg193242. The
patch also removes usage of support.use_resources = ['resource'] from the
test package since it is no longer needed.
(No test_main - unittest.main conversions are done in this patch;
Zachary Ware added the comment:
Done, issue18492.
I'll submit and updated patch here when (if :)) that one is applied.
I'm also looking into adding resource handling to unittest itself and it is
going pretty well; I hope to have a patch ready for review for that soon.
--
Lars Ivarsson added the comment:
The problem isn't the original requested url, as it is legit. The problem
appears after the 302 redirect when a new (malformed) url is received from the
server. There need to be some kind of check of the validity of that second url.
And, preferably, an
New submission from Claudio Freire:
When building with --enable-shared in an environment that already has a
python2.7 (and I'd expect the same to happen to 3.x), make profile-opt fails
because it attempts to load the existing libpython instead of the just-built
one.
run_profile_task should
Serhiy Storchaka added the comment:
I don't think we should accept anything if not running under regrtest, We can
unintentionally run a testfile in which some tests consume a lot of resources.
Also we need in skipping this tests for the test testing. I think it will be
better just add a
New submission from Wolf Ihlenfeldt:
Are the names of functions PyType_GenericSetDict and -GetDict correctly
documented (for 3.3.2), or should they be documented as
PyObject_GenericGet/SetDict instead? The PyType-prefixed names are out of place
in the section, and functions of these names not
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:
--
nosy: +jkloth
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18491
___
___
Stefan Behnel added the comment:
This test from lxml's ElementTree test suite crashes for me now when run
against (c)ElementTree:
def test_parser_target_error_in_start(self):
assertEqual = self.assertEqual
events = []
class Target(object):
def
Julien Phalip added the comment:
Thank you for the feedback. I've updated the patch to compile the regular
expression at load time.
--
Added file: http://bugs.python.org/file30969/cookies-httponly-secure-2.diff
___
Python tracker
New submission from Roumen Petrov:
Split of issue3871 - part for build of core modules.
--
components: Build
files: 0008-MINGW-setup-exclude-termios-module.patch
keywords: patch
messages: 193319
nosy: rpetrov
priority: normal
severity: normal
status: open
title: mingw: setup exclude
New submission from Roumen Petrov:
Split of issue3871 - build core modules.
--
components: Build
files: 0009-MINGW-setup-_multiprocessing-module.patch
keywords: patch
messages: 193320
nosy: rpetrov
priority: normal
severity: normal
status: open
title: mingw: setup _multiprocessing
New submission from Roumen Petrov:
Split of issue3871 - build core modules.
--
components: Build
files: 0010-MINGW-setup-select-module.patch
keywords: patch
messages: 193321
nosy: rpetrov
priority: normal
severity: normal
status: open
title: mingw: setup select module
type: enhancement
New submission from Roumen Petrov:
Split of issue3871 - part for build of core modules.
--
components: Build
files: 0007-MINGW-ignore-main-program-for-frozen-scripts.patch
keywords: patch
messages: 193318
nosy: rpetrov
priority: normal
severity: normal
status: open
title: mingw: ignore
New submission from Roumen Petrov:
enhancement of issue3871 ( build core modules ).
Part of issue 3871 is python libffi source for gnu assembler on 32 windows
platform. The functionality is same as inlined assembled for MSC. Note python
specific libffi customization is not in mainstream libffi
New submission from Roumen Petrov:
Split of issue3871 (build core modules) - improved winsock detection. Requires
NT 5.1+ (wxp).
Note if you like python winsock for w2k then please extract from old 'all in
one' patch.
--
components: Build
files:
Roundup Robot added the comment:
New changeset 6ec0e9347dd4 by Victor Stinner in branch 'default':
Issue #18408: Fix _elementtree.c, don't call Python function from an expat
http://hg.python.org/cpython/rev/6ec0e9347dd4
--
___
Python tracker
New submission from STINNER Victor:
The ElementTree module allows to write a XML parser using Python callbacks. The
module relies on the expat library which is implemented in C. Expat calls these
Python callbacks, but ElementTree does not check if a Python exception was
raised or not.
STINNER Victor added the comment:
For the issue #18408, I added assertions in PyEval_EvalFrameEx() and similar
functions to exit with an assertion error in debug mode if these functions are
called with an exception set:
New changeset 48a869a39e2d by Victor Stinner in branch 'default':
Issue
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18501
___
___
STINNER Victor added the comment:
This test from lxml's ElementTree test suite crashes for me now when run
against (c)ElementTree: (...)
Thanks for the quick report! Are you testing automatically lxml with the Python
HEAD?
The issue should be fixed by the changeset 6ec0e9347dd4. I also
Changes by Fred L. Drake, Jr. fdr...@gmail.com:
--
nosy: +fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18501
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17349
___
___
Roundup Robot added the comment:
New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default':
Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python
http://hg.python.org/cpython/rev/5a6cdc0d7de1
--
___
Python tracker
Roundup Robot added the comment:
New changeset 5a6cdc0d7de1 by Victor Stinner in branch 'default':
Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python
http://hg.python.org/cpython/rev/5a6cdc0d7de1
--
nosy: +python-dev
___
Python
Daniel Holth added the comment:
Python 3 is supposed to make it easier to do Unicode correctly. str(bytes) does
not. I felt strongly enough about that to write this patch.
With this feature my library can have control in a way that is much more
practical than ensuring a particular flag has
STINNER Victor added the comment:
Python 3 is supposed to make it easier to do Unicode correctly. str(bytes)
does not.
str(bytes) does not make sense, that's why an exception is raised when
the -bb command line option is used ;-)
--
___
Python
New submission from Steven Johnson:
CDLL does not use the same paths as find_library and thus you can *find* a
library, but you can't necessarily use it.
In my case, I had SDL2 in /usr/local/lib. find_library correctly gets
the name, but does not return the path. CDLL apparently does not
Nick Coghlan added the comment:
For dis, we introduced a new rich bytecode introspection API. Ditto for
inspect.Signature. I think it makes sense to treat this as a completely new
traceback introspection API and ignore the low level details of the legacy
API.
--
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18264
___
___
STINNER Victor added the comment:
ssl-socket-readwrite-after-close.diff: instead of testing not self._sslobj, I
would prefer an explicit self._sslobj is None.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9177
STINNER Victor added the comment:
The check should be moved into the _checkClosed() method. Example:
def _checkClosed(self):
io.RawIOBase._checkClosed(self)
if self._sslobj is None:
raise ValueError(I/O operation on closed SSL socket)
--
STINNER Victor added the comment:
Oops, remove io.RawIOBase._checkClosed(self) from my example (I read
socket.py at the same time, SSLSocket inherits from socket, not from RawIOBase).
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I created the issue #18488: sqlite: finalize() method of user function may be
called with an exception set if a call to step() method failed.
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
See also isue #18501, similar issue in ElementTree.
I created the issue while working on the issue #18408.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18488
STINNER Victor added the comment:
See also the issue #18488, similar issue in sqlite.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18501
___
Roundup Robot added the comment:
New changeset 2079a517193b by Ethan Furman in branch 'default':
closes issue18042 -- a `unique` decorator is added to enum.py
http://hg.python.org/cpython/rev/2079a517193b
--
nosy: +python-dev
resolution: - fixed
stage: patch review - committed/rejected
Vinay Sajip added the comment:
My initial comments - seems like a reasonable approach. I think you may need to
consider -script.pyw for the GUI case. I will look into it in more detail.
I'll add Mark to the nosy list, as the launcher was originally his idea and he
might have a view.
What
Mark Hammond added the comment:
I don't understand the motivation for this - how will it be used in practice?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18491
___
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18264
___
___
Python-bugs-list
Vinay Sajip added the comment:
I don't understand the motivation for this - how will it be used in practice?
It allows the launcher to do double duty as an executable launcher for scripts
which works in the same way as executable launchers in setuptools-installed
scripts.
Its use in this
Mark Hammond added the comment:
Obviously I'm missing a little context, but it seems a little wrong for the
same launcher to be doing this double-duty. It seems we only want to use the
launcher in this way as it already has some of the interesting code we need -
but the vast majority of
Eli Bendersky added the comment:
LGTM, thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18480
___
___
Python-bugs-list mailing list
Vajrasky Kok added the comment:
Lars, I see.
For the uninitiated, the issue is the original url (containing only ascii
character) redirects to the url containing non-ascii characters which upsets
urllib.
To handle that situation, you can do something like this:
-
import
88 matches
Mail list logo