John Nagle added the comment:
As the original author of the predecessor bug report (issue 15873) in 2012, I
would suggest that there's too much bikeshedding here. I filed this bug because
there was no usable ISO8601 date parser available. PyPi contained four
slightly different buggy ones
John Nagle added the comment:
(That's from a subclass I wrote. As a change to RobotFileParser, __init__
should start like this.)
def __init__(self, url='', user_agent=None):
self.user_agent = user_agent# save user agent
John Nagle added the comment:
Suggest adding a user_agent optional parameter, as shown here:
def __init__(self, url='', user_agent=None):
urllib.robotparser.RobotFileParser.__init__(self, url) # init parent
self.user_agent = user_agent# save user agent
New submission from John Nagle:
urllib.robotparser.RobotFileParser always uses the default Python user agent.
This agent is now blacklisted by many sites, and it's not possible to read the
robots.txt file at all.
--
components: Library (Lib)
messages: 281314
nosy: nagle
priority
New submission from John Nagle:
"robotparser" uses the default Python user agent when reading the "robots.txt"
file, and there's no parameter for changing that.
Unfortunately, the "mod_security" add-on for Apache web server, when used with
the standard OWASP ru
New submission from John Nagle:
Installing Python 3.4.3 on a new CentOS Linux release 7.1.1503 server.
Started with source tarball, did usual ./configure; make; make test
SSL test fails with "dh key too small". See below.
OpenSSL has recently been modified to reject short
John Nagle added the comment:
I'm using wrap_socket because I want to read the details of a server's SSL
certificate.
Starting from Python 3.2, it can be more flexible to use
SSLContext.wrap_socket() instead does not convey that ssl.wrap_socket() will
fail to connect to some servers
New submission from John Nagle:
ssl.wrap_socket() always uses the SSL certificate associated with the raw IP
address, rather than using the server_host feature of TLS. Even when
wrap_socket is used before calling connect(port, host), the host parameter
isn't used by TLS.
To get proper TLS
John Nagle added the comment:
If SSL error reporting is getting some attention, something should be done to
provide better text messages for the SSL errors. All certificate verify
exceptions return the string certificate verify failed (_ssl.c:581). The line
number in _ssl.c
New submission from John Nagle:
Installing Python 3.4.2 on CentOS 6. Clean install. Using procedure in README
file:
./configure
make
make test
2 tests fail in make test The first one is because the FTP client
test is trying to test against a site that is long gone, the Digital Equipment
John Nagle added the comment:
More info: the problem is on the unpickle side. If I use _Unpickle and
Pickle, so the unpickle side is in Python, but the pickle side is in C, no
problem. If I use Unpickle and _Pickle, so the unpickle side is C, crashes
John Nagle added the comment:
minimize you data - that's a big job here. Where are the tests for pickle?
Is there one that talks to a subprocess over a pipe? Maybe I can adapt that.
--
___
Python tracker rep...@bugs.python.org
http
John Nagle added the comment:
Or just use pickle._Pickler instead of pickle.Pickler and like
(implementation detail!).
Tried that. Changed my own code as follows:
25a26
71,72c72,73
self.reader = pickle.Unpickler(self.proc.stdout)# set up reader
self.writer
New submission from John Nagle:
I'm porting a large, working system from Python 2 to Python 3, using six, so
the same code works with both. One part of the system works a lot like the
multiprocessing module, but predates it. It launches child processes with
Popen and talks to them using
John Nagle added the comment:
Three years later, I'm converting to Python 3. Did this get fixed in Python 3?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9679
John Nagle added the comment:
Will this be applied to the Python 2.7.9 library as well?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23476
John Nagle added the comment:
The fix in Ubuntu was to the Ubuntu certificate store, which is a directory
tree with one cert per file, with lots of symbolic links with names based on
hashes to express dependencies. Python's SSL isn't using that. Python is
taking in one big text file of SSL
John Nagle added the comment:
Add cert file for testing. Source of this file is
http://curl.haxx.se/ca/cacert.pem
--
Added file: http://bugs.python.org/file38166/cacert.pem
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23476
John Nagle added the comment:
To try this with the OpenSSL command line client, use this shell command:
openssl s_client -connect www.verisign.com:443 -CAfile cacert.pem
This provides more detailed error messages than Python provides.
verify error:num=20:unable to get local issuer
New submission from John Nagle:
SSL certificate verification fails for www.verisign.com when using the cert
list from Firefox. Other sites (google.com, python.org) verify fine.
This may be related to a known, and fixed, OpenSSL bug. See:
http://rt.openssl.org/Ticket/Display.html?id=2732user
John Nagle added the comment:
Amusingly, I'm getting this failure on verisign.com on Windows 7 with Python
2.7.9:
HTTP error - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:581)..) The current Verisign root cert (Class 3 public) is, indeed,
not in the Windows 7 cert
New submission from John Nagle:
In each revision of getpeercert, a few more fields are returned. Python 3.2
added issuer and notBefore. Python 3.4 added crlDistributionPoints,
caIssuers, and OCSP URLS. But some fields
still aren't returned. I happen to need CertificatePolicies, which is how
John Nagle added the comment:
May be a duplicate of Issue 204679: ssl.getpeercert() should include
extensions
http://bugs.python.org/issue20469
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22873
John Nagle added the comment:
The server operator at the US Securities and Exchange Commission writes to me:
There was a DNS issue that affected the availability of FTP at night. We
believe it is resolved. Please let us know if you encounter any further
problems. Thanks, SEC Webmaster.
So
New submission from John Nagle:
urllib2.open for an FTP url does not obey the timeout parameter.
Attached test program times out on FTP open after 21 seconds, even though the
specified timeout is 60 seconds. Timing is consistent; times have ranged from
21.03 to 21.05 seconds. Python
John Nagle added the comment:
Reproduced problem in Python 3.3 (Win32). Error message there is:
Open of ftp://ftp.sec.gov/edgar/daily-index failed after 21.08 seconds:
urlopen error ftp error: TimeoutError(10060, 'A connection attempt failed
because the connected party did not properly
John Nagle added the comment:
For what parts of ISO 8601 to accept, there's a standard: RFC3339, Date and
Time on the Internet: Timestamps. See section 5.6:
date-fullyear = 4DIGIT
date-month = 2DIGIT ; 01-12
date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based
New submission from John Nagle:
The datetime module has support for output to a string of dates and times in
ISO 8601 format (2012-09-09T18:00:00-07:00), with the object method
isoformat([sep]). But there's no support for parsing such strings. A string
to datetime class method should
John Nagle added the comment:
Re: %z format is supported.
That's platform-specific; the actual parsing is delegated to the C library.
It's not in Python 2.7 / Win32:
ValueError: 'z' is a bad directive in format '%Y-%m-%dT%H:%M:%S%z'
It really shouldn't be platform-specific; the underlying
John Nagle na...@users.sourceforge.net added the comment:
A IRI library is not needed to fix this problem. It's already fixed in the
sockets library and the http library. We just need consistency in urllib2.
urllib2 functions which take a url parameter should apply
encodings.idna.ToASCII
John Nagle na...@users.sourceforge.net added the comment:
The current convention is that domains go into DNS lookup as punycode, and the
port, query, and fragment fields of the URL are encoded with percent-escapes.
See
http://lists.w3.org/Archives/Public/ietf-http-wg/2011OctDec/0155.html
John Nagle na...@users.sourceforge.net added the comment:
This has nothing to do with Python 3. There's a difference in __str__ handling
between Python 2.6 and Python 2.7.2. It's enough to crash BeautifulSoup:
[Thread-8] Unexpected EXCEPTION while processing page
http://www.verisign.com
New submission from John Nagle na...@users.sourceforge.net:
The SSL module still doesn't return much information from the
certificate. SSLSocket.getpeercert only returns a few basic items
about the certificate subject. You can't retrieve issuer information,
and you can't get the extensions
New submission from John Nagle na...@users.sourceforge.net:
ftplib doesn't check the status on socket close after writing. This can lead
to silently truncated files when sending files with ftplib.
A report of truncated files on comp.lang.python led me to check the source
code.
The ftplib
John Nagle na...@users.sourceforge.net added the comment:
Proper behavior for ftplib when sending is to send all desired data, then call
sock.shutdown(socket.SHUT_RDWR). This indicates that no more data will be
sent, and blocks until the receiver has acknowledged all their data
New submission from John Nagle na...@users.sourceforge.net:
I just installed python3.1.1.msi on a system that had python3.1.msi
installed in D:/python31. In this situation, the installer does not
ask the user for a destination directory. The installer found the old
installation in D:/python31
John Nagle na...@users.sourceforge.net added the comment:
Cancel bug report.
It was my error. The installer says it is replacing the existing
installation, but by default installs it in C:. But that can be
overridden in the directory entry field below the big empty white entry box
John Nagle na...@users.sourceforge.net added the comment:
Note that the problem can't be solved by telling end users to call a
different quote function. The problem is down inside a library
module. robotparser is calling urllib.quote. One of those two
library modules needs to be fixed
John Nagle added the comment:
I tried downloading the latest rev of urlparse.py (59480) and it flunked
its own unit test, urlparse.test() Two test cases fail. So I don't
want to try to fix the module until the last people to change it fix
their unit test problems.
The fix I provided should fix
New submission from John Nagle:
urlparse.urlparse will mis-parse URLs which have a / after a ?.
sa1 = 'http://example.com?blahblah=/foo'
sa2 = 'http://example.com?blahblah=foo'
print urlparse.urlparse(sa1)
('http', 'example.com?blahblah=', '/foo', '', '', '') # WRONG
print
40 matches
Mail list logo