On Thu, Jul 18, 2013 at 2:36 PM, Aseem Bansal asmbans...@gmail.com wrote:
I wanted to do a little project for learning Python. I thought a chat system
will be good as it isn't something that I have ever done.
A good thing to start with. Yes, it's been done before, many times...
but if you
@vikash agrawal
About GUI I discussed it at
https://groups.google.com/forum/#!starred/comp.lang.python/M-Dy2pyWRfM and I am
thinking about using PySide 1.2 for clients of chat system. I think I'll need
downloadable clients if I want to make something like google talk. Then I'll
need to
On Thu, Jul 18, 2013 at 4:11 PM, Aseem Bansal asmbans...@gmail.com wrote:
@vikash agrawal
About GUI I discussed it at
https://groups.google.com/forum/#!starred/comp.lang.python/M-Dy2pyWRfM and I
am thinking about using PySide 1.2 for clients of chat system. I think I'll
need downloadable
@Chris Angelico
Thanks. That cleared many doubts and your suggestions would definitely be
useful.
I am asking the next paragraph because you said about Python 3 helping with
things. I am not looking for a debate or anything just a opinion.
I learnt Python myself and everyone told me that
On 2013.07.18 01:36, Aseem Bansal wrote:
I learnt Python myself and everyone told me that Python 2 is status quo so I
learned Python 2 and have been working with it. I am just 1.5 months in
Python programming so should I consider switching to Python 3 if it helps
with new things or should I
On Thu, Jul 18, 2013 at 4:36 PM, Aseem Bansal asmbans...@gmail.com wrote:
@Chris Angelico
Thanks. That cleared many doubts and your suggestions would definitely be
useful.
I am asking the next paragraph because you said about Python 3 helping with
things. I am not looking for a debate or
@Andrew Berg
@Chris Angelico
Is there a way to have both Python 2 and 3 installed on my computer till I can
update the little codebase that I have built? Can I make different commands for
invoking python 2 and Python 3? I am using Windows 7 and use Windows Powershell
as an alternative to the
On Thu, Jul 18, 2013 at 5:05 PM, Aseem Bansal asmbans...@gmail.com wrote:
@Andrew Berg
@Chris Angelico
Is there a way to have both Python 2 and 3 installed on my computer till I
can update the little codebase that I have built? Can I make different
commands for invoking python 2 and Python
Am 18.07.13 06:38, schrieb fronag...@gmail.com:
On Thursday, July 18, 2013 9:07:24 AM UTC+8, Dave Angel wrote:
Nope - don't use that. Instead, post an event on the queue, and return
to the mainloop() from whence we came.
def test_thread(self):
if
@ChrisA
Thanks. That's great. That solved the whole thing easily. I'll install Python 3
and start updating today.
About reading comp.lang.python can you suggest how to read it and reply? I have
never read a newsgroup leave alone participated in one. I am used to forums
like stackoverflow. Any
On Thu, Jul 18, 2013 at 5:29 PM, Aseem Bansal asmbans...@gmail.com wrote:
@ChrisA
Thanks. That's great. That solved the whole thing easily. I'll install Python
3 and start updating today.
About reading comp.lang.python can you suggest how to read it and reply? I
have never read a
@ChrisA
I subscribed to it. How do I reply to a message that has already been posted
before my subscription?
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jul 18, 2013 at 5:48 PM, Aseem Bansal asmbans...@gmail.com wrote:
@ChrisA
I subscribed to it. How do I reply to a message that has already been posted
before my subscription?
Not easily, far as I know. But you now have this reply, and you can
always just post something with the right
I tried replying to your message by mail. I used the reply button and send it
to python-list@python.org? Or do I need to use pytho...@python.org as you
wrote in your post?
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jul 18, 2013 at 6:10 PM, Aseem Bansal asmbans...@gmail.com wrote:
I tried replying to your message by mail. I used the reply button and send it
to python-list@python.org? Or do I need to use pytho...@python.org as you
wrote in your post?
You replied correctly. The ellipsis was
Joshua Landau joshua at landau.ws writes:
The same with Unicode. We hate French people,
And for good damn reason too. They're ruining our language, á mon avis.
We do!
off to buy wine
Regards
Antoine.
--
http://mail.python.org/mailman/listinfo/python-list
On 18 July 2013 00:58, CTSB01 scott.moore...@gmail.com wrote:
Please let me know if this is unclear. I will certainly continue revising
until it makes sense to those reading.
Can you summarize what your question is? Leave aside the details of
the function, just explain what thing in
On Thursday, July 18, 2013 3:20:28 PM UTC+8, Christian Gollwitzer wrote:
Am 18.07.13 06:38, schrieb fronag...@gmail.com:
On Thursday, July 18, 2013 9:07:24 AM UTC+8, Dave Angel wrote:
Nope - don't use that. Instead, post an event on the queue, and return
to the mainloop() from whence we
I found that it was caused by not by python but by
/usr/lib/locale/locale-archive, the same problem as that described in
http://illiterat.livejournal.com/4615.html.
William
在 2013年7月18日星期四UTC+8下午12时45分01秒,William Bai写道:
Hi:
Previously, we found that our python scripts consume too
snowingbear at gmail.com writes:
Hi:
Previously, we found that our python scripts consume too much memory.
So I use
python's resource module to
restrict RLIMIT_AS's soft limit and hard limit to 200M.
On my RHEL5.3(i386)+python2.6.2, it works OK. But on CentOS
6.2(x86_64)+python2.6.6,
On Tue, Jul 16, 2013 at 6:43 PM, John Ladasky john_lada...@sbcglobal.netwrote:
Hi folks,
No, I'm not asking for YOU to help ME with a Python homework assignment!
Previously, I mentioned that I was starting to teach my son Python.
Ok I'll mail by e-mail now. Hope that it reaches the place correctly.--
http://mail.python.org/mailman/listinfo/python-list
In article mailman.4786.1374021635.3114.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky
john_lada...@sbcglobal.net wrote:
I think that they're disappointed when I show them how much they have to
understand just to write a program that
On 2013-07-18, Chris Angelico ros...@gmail.com wrote:
On Thu, Jul 18, 2013 at 4:11 PM, Aseem Bansal asmbans...@gmail.com wrote:
@vikash agrawal
About GUI I discussed it at
https://groups.google.com/forum/#!starred/comp.lang.python/M-Dy2pyWRfM and I
am thinking about using PySide 1.2 for
On Thursday 18 July 2013 09:04:32 Albert van der Horst did opine:
In article mailman.4786.1374021635.3114.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky
john_lada...@sbcglobal.net wrote:
I think that they're disappointed
On 07/18/2013 03:13 AM, William Bai wrote:
I found that it was caused by not by python but by
/usr/lib/locale/locale-archive, the same problem as that described
in http://illiterat.livejournal.com/4615.html.
Too funny. So in other words there isn't a problem at all. What you
thought was RAM
Not to open Pandora's box or anything, but are you aware of the Roguelike
community (subculture?) (cult?) of game development? Rogue was an old
text-based role playing game for Unix, text-based in the sense that it used
the console as a 2D map and ASCII characters as graphics. There has been
On 7/18/2013 3:29 AM, Aseem Bansal wrote:
About reading comp.lang.python can you suggest how to read it and
reply?
To read this list as a newsgroup use news.gmane.org. The difference
between the mailing list interface and newsgroup interface is that the
latter automatically segregates
Anyone have any luck with creating Jabber Bots?
Everyone I have found so far for python 3.3 has been outdated, or the required
modules are outdated.
--
http://mail.python.org/mailman/listinfo/python-list
18.07.13 20:04, Terry Reedy написав(ла):
On 7/18/2013 3:29 AM, Aseem Bansal wrote:
About reading comp.lang.python can you suggest how to read it and
reply?
To read this list as a newsgroup use news.gmane.org. The difference
between the mailing list interface and newsgroup interface is that
On 2013-07-18, Serhiy Storchaka storch...@gmail.com wrote:
18.07.13 20:04, Terry Reedy ??():
On 7/18/2013 3:29 AM, Aseem Bansal wrote:
About reading comp.lang.python can you suggest how to read it and
reply?
To read this list as a newsgroup use news.gmane.org. The difference
On Thu, Jul 18 2013,Joel Goldstick wrote:
[snipped 28 lines]
Many people find urllib and urllib2 to be confusing. There is a module
called requests which makes this stuff a lot easier. ymmv
http://docs.python-requests.org/en/latest/
Yes, please use this instead of the url* ones, easier
On 2013-07-18, Grant Edwards invalid@invalid.invalid wrote:
On 2013-07-18, Serhiy Storchaka storch...@gmail.com wrote:
18.07.13 20:04, Terry Reedy ??():
On 7/18/2013 3:29 AM, Aseem Bansal wrote:
About reading comp.lang.python can you suggest how to read it and
reply?
To read
Devyn Collier Johnson於 2013年7月16日星期二UTC+8下午6時30分33秒寫道:
Am 07/12/2013 07:16 PM, schrieb MRAB:
On 12/07/2013 23:16, Tim Delaney wrote:
On 13 July 2013 03:58, Devyn Collier Johnson devyncjohn...@gmail.com
mailto:devyncjohn...@gmail.com wrote:
Thanks for the thorough
On 18 Jul 2013 18:52, Matt mattgrav...@gmail.com wrote:
Anyone have any luck with creating Jabber Bots?
Everyone I have found so far for python 3.3 has been outdated, or the
required modules are outdated.
You can find some modules here.
The Grid Computing Competence Center (GC3) is pleased to announce
release 1.0.1 of Elasticluster.
Elasticluster is a Python tool to automate the creation, configuration
and management of clusters of virtual machines hosted on a cloud. It
can provision clusters on Amazon's Elastic Compute Cloud
Hi folks,
1st time poster – apologies if I’m breaking any protocols…
We were told that this would be a good alias to announce this on: a few Python
OSS enthusiasts and Microsoft have created a plug-in for Visual Studio that
enables Python - C/C++ debugging. You may find this useful for
On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote:
On 18 July 2013 00:58, CTSB01 scott.moore...@gmail.com wrote:
Please let me know if this is unclear. I will certainly continue revising
until it makes sense to those reading.
Can you summarize what your question is?
On 07/18/2013 02:57 PM, CTSB01 wrote:
On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote:
On 18 July 2013 00:58, CTSB01 scott.moore...@gmail.com wrote:
Please let me know if this is unclear. I will certainly continue revising
until it makes sense to those reading.
Can you
On Thursday, July 18, 2013 6:12:52 PM UTC-4, Gary Herron wrote:
On 07/18/2013 02:57 PM, CTSB01 wrote:
On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote:
On 18 July 2013 00:58, CTSB01 scott.moore...@gmail.com wrote:
Please let me know if this is unclear. I will
On 07/17/2013 11:39 PM, Eric S. Johansson wrote:
Not discourage you but this is a been there, done that kind of project.
You could learn more from reading somebody else is code. What hasn't been
done, and this would be very cool, is a chat program that works
peer-to-peer with no central
On 07/18/2013 12:19 PM, Owen Marshall wrote:
Huh - I (foolishly) didn't realize gmane actually had NNTP, I've always
used it to search mailing lists. If the list dumped to usenet (much like
c.l.python) I'd post through sunsite.dk, which is a very nice usenet
provider. But that still meant
On Jul 18, 2013 4:23 PM, CTSB01 scott.moore...@gmail.com wrote:
File pyshell#9, line 2
... rtn = []
^
The ... is the continuation prompt from the interactive interpreter, not
part of the code. Don't paste it into Python.
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, July 18, 2013 6:49:03 PM UTC-4, Ian wrote:
On Jul 18, 2013 4:23 PM, CTSB01 scott.m...@gmail.com wrote:
File pyshell#9, line 2
... rtn = []
^
The ... is the continuation prompt from the interactive interpreter, not
part of the code. Don't paste it into
On Thu, Jul 18, 2013 at 5:04 PM, CTSB01 scott.moore...@gmail.com wrote:
Thanks Ian. That worked regarding that issue. Now I have an 'invalid
syntax' issue unfortunately.
def phi_m(x,m):
rtn = []
for n2 in range(0, len(x)*m - 2):
n = n2 / m
r = n2 - n * m
On Thu, Jul 18, 2013 at 5:42 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
On Thu, Jul 18, 2013 at 5:04 PM, CTSB01 scott.moore...@gmail.com wrote:
Thanks Ian. That worked regarding that issue. Now I have an 'invalid
syntax' issue unfortunately.
def phi_m(x,m):
rtn = []
for n2 in
On Fri, 19 Jul 2013 00:04:33 +0100, CTSB01 scott.moore...@gmail.com
wrote:
On Thursday, July 18, 2013 6:49:03 PM UTC-4, Ian wrote:
On Jul 18, 2013 4:23 PM, CTSB01 scott.m...@gmail.com wrote:
File pyshell#9, line 2
... rtn = []
^
The ... is the continuation prompt from
On 07/18/2013 07:04 PM, CTSB01 wrote:
On Thursday, July 18, 2013 6:49:03 PM UTC-4, Ian wrote:
On Jul 18, 2013 4:23 PM, CTSB01 scott.m...@gmail.com wrote:
File pyshell#9, line 2
... rtn = []
^
The ... is the continuation prompt from the interactive interpreter, not
On Thursday, July 18, 2013 7:45:49 PM UTC-4, Ian wrote:
On Thu, Jul 18, 2013 at 5:42 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
On Thu, Jul 18, 2013 at 5:04 PM, CTSB01 scott.moore...@gmail.com wrote:
Thanks Ian. That worked regarding that issue. Now I have an 'invalid
syntax' issue
It's only obvious if you're using Python 3.x. You have forgotten the
parentheses in the call to the print() function.
On the other hand, if this is Python 2.x, I have no idea. Next time,
please paste the actual error, not paraphrased. The error message
includes a traceback.
On 2013-07-18, Michael Torrie torr...@gmail.com wrote:
On 07/18/2013 12:19 PM, Owen Marshall wrote:
Huh - I (foolishly) didn't realize gmane actually had NNTP, I've always
used it to search mailing lists. If the list dumped to usenet (much like
c.l.python) I'd post through sunsite.dk, which is
On 07/18/2013 08:35 PM, CTSB01 wrote:
It's only obvious if you're using Python 3.x. You have forgotten the
parentheses in the call to the print() function.
On the other hand, if this is Python 2.x, I have no idea. Next time,
please paste the actual error, not paraphrased. The error
Thanks for the alternative links, I'll use gmane.org as an access point next
time.
Don't paraphrase. Just copy/paste it into your email message. And I'm
assuming you know to run things from the terminal window, and not from
IDLE or something else that messes up the error messages.
On 07/18/2013 10:16 PM, CTSB01 wrote:
Does something like
def phi_m(x, m):
rtn = []
for n2 in range(0, len(x) * m - 2):
n = n2 / m
r = n2 - n * m
rtn.append(m * x[n] + r * (x[n + 1] - x[n]))
print ('n2 =', n2, ': n
On 19 Jul 2013 03:24, CTSB01 scott.moore...@gmail.com wrote:
Thanks for the alternative links, I'll use gmane.org as an access point
next time.
Don't paraphrase. Just copy/paste it into your email message. And I'm
assuming you know to run things from the terminal window, and not from
On Thursday, July 18, 2013 10:48:23 PM UTC-4, Fábio Santos wrote:
On 19 Jul 2013 03:24, CTSB01 scott.m...@gmail.com wrote:
Thanks for the alternative links, I'll use gmane.org as an access point
next time.
Don't paraphrase. Just copy/paste it into your email message.
On Thursday, July 18, 2013 10:43:11 PM UTC-4, Dave Angel wrote:
On 07/18/2013 10:16 PM, CTSB01 wrote:
Does something like
def phi_m(x, m):
rtn = []
for n2 in range(0, len(x) * m - 2):
n = n2 / m
r = n2 - n * m
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
--
1 - 100 of 145 matches
Mail list logo