[issue12455] urllib2 forces title() on header names, breaking some requests

2013-02-28 Thread karl
karl added the comment: So looking at the casing of headers, I discovered other issues. I opened another bug. http://bugs.python.org/issue17322 -- ___ Python tracker <http://bugs.python.org/issue12

[issue747320] rfc2822 formatdate functionality duplication

2013-02-28 Thread karl
karl added the comment: R. David Murray: Sure. Is it better? issue-747320-1.patch It seems there are already tests for gmt date format in Lib/test/test_email/test_utils.py -- Added file: http://bugs.python.org/file29279/issue-747320-1.patch

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-02 Thread karl
karl added the comment: http://hg.python.org/cpython/file/3.3/Lib/urllib/request.py#l359 def add_header(self, key, val): # useful for something like authentication self.headers[key.capitalize()] = val and http://hg.python.org/cpython/file/3.3/Lib/urllib/request.py#l271 in

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-02 Thread karl
karl added the comment: I created 4 tests for testing trailing and leading spaces on * add_unredirected_header() * add_header() and modified the functions. Tests passed. → ./python.exe Lib/test/test_urllib2net.py […] test_headers_with_spaces (__main__.OtherNetworkTests) ... ok

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2013-03-02 Thread karl
karl added the comment: Ah thanks Eric, I will fix that. -- ___ Python tracker <http://bugs.python.org/issue11448> ___ ___ Python-bugs-list mailing list Unsub

[issue11448] docs for HTTPConnection.set_tunnel are ambiguous

2013-03-02 Thread karl
karl added the comment: ok made a proper patch on the rst file with hg diff. See issue-11448-1.patch -- Added file: http://bugs.python.org/file29293/issue-11448-1.patch ___ Python tracker <http://bugs.python.org/issue11

[issue12455] urllib2 forces title() on header names, breaking some requests

2013-03-02 Thread karl
karl added the comment: Are there issues related to removing the capitalize() and title() appears? # title() * http://hg.python.org/cpython/file/886df716cd09/Lib/urllib/request.py#l1239 # capitalize() * http://hg.python.org/cpython/file/886df716cd09/Lib/urllib/request.py#l359 * http

[issue12455] urllib2 forces title() on header names, breaking some requests

2013-03-02 Thread karl
karl added the comment: tests in http://hg.python.org/cpython/file/886df716cd09/Lib/test/test_wsgiref.py#l370 also checking that everything is case insensitive. And the method to get the headers in wsgiref, make sure they are lower-case http://hg.python.org/cpython/file/886df716cd09/Lib

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread karl
karl added the comment: Hello, So I tested a bit. The production rules defined by the specification are clear. Spaces before and after are forbidden. header-field = field-name ":" OWS field-value BWS field-name = token field-value= *( field-content

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread karl
karl added the comment: OK. I'm inclined to think that we should both remove trailing and leading spaces/tabs should be removed. Reasons: 1. Production rules forbid them. 2. Trailing spaces 2.a Conformant servers will ignore with a 400 bad request (opportunity for another bugs?)

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread karl
karl added the comment: R. David Murray, You are right it is not specific to the client library. HTTP headers are part of the message (Request/Response) with both the same constraints. Constraints are put on receivers (receiving a message) and senders (sending a message) of the message

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-04 Thread karl
karl added the comment: R. David.: > A crazy idea that occurred to me was to create an "rfc822-style-header > management" module, and share it between email, http, and urllib. Yes it is basically what I had in mind when I said: >Maybe the way forward in the future is to ha

[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline

2013-03-04 Thread karl
karl added the comment: orsenthil, I made a proper patch for it with hg diff. It is very short. See issue-12921-2.patch -- Added file: http://bugs.python.org/file29306/issue-12921-2.patch ___ Python tracker <http://bugs.python.org/issue12

[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline

2013-03-04 Thread karl
karl added the comment: orsenthil, When you have done a patch for testing I would love to see it. I could not find a proper way of doing it. I'm eager to learn. Thanks. -- ___ Python tracker <http://bugs.python.org/is

[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline

2013-03-05 Thread karl
karl added the comment: The culprit is here http://hg.python.org/cpython/file/3.3/Lib/http/server.py#l320 That an application or a person decides to send another message is ok. Designer choice. That the library is sending something optional as a test seems more uncomfortable. The list of

[issue17355] http tests testing more than the error code are fragile

2013-03-05 Thread karl
New submission from karl: Some of the tests of the HTTP Test suite are checking for the full status-line, instead of just the error code. Why is it an issue? 1. The only mandatory part in the status-line is the error code. The phrase is optional. For example the response is made of 3 parts

[issue17355] http tests testing more than the error code are fragile

2013-03-05 Thread karl
Changes by karl : -- components: +Library (Lib), Tests ___ Python tracker <http://bugs.python.org/issue17355> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline

2013-03-05 Thread karl
karl added the comment: Senthil, I created another bug reports for the tests which are fragile. http://bugs.python.org/issue17355 -- ___ Python tracker <http://bugs.python.org/issue12

[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline

2013-03-05 Thread karl
karl added the comment: hehe. No hard feelings. I still do not think it is a good idea to test the "error code" and its associated message in the same test. :) For example, in RFC2616, 414 is defined as 414 Request-URI Too Long and in the HTTP1.1bis (which will not get a n

[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline

2013-03-05 Thread karl
karl added the comment: R.david Trying another patch just for understanding if it's what you meant. What it does: 1. adding an 'explain' keyword 2. escaping the explain message for the body 3. checking for injection of newline in the reason phrase. For the part 3, TODO: che

[issue8732] Should urrllib2.urlopen send an Accept-Encoding header?

2013-03-05 Thread karl
karl added the comment: What was the content of http://support.github.com/discussions/site/1510 I can't find it. Is the issue still going on? -- nosy: +karlcow ___ Python tracker <http://bugs.python.org/i

[issue8450] httplib: false BadStatusLine() raised

2013-03-05 Thread karl
karl added the comment: Hmm no code. I wonder if it's about this part. http://hg.python.org/cpython/file/3.3/Lib/http/client.py#l321 -- nosy: +karlcow ___ Python tracker <http://bugs.python.org/i

[issue13359] urllib2 doesn't escape spaces in http requests

2013-03-05 Thread karl
karl added the comment: The issue with the current patch is that it is escaping more than only the spaces, with possibly indirect border effect. Anne van Kesteren is in the process of creating a parsing/writing specification for URL. Not finished but putting it here for future reference. http

[issue14132] Redirect is not working correctly in urllib2

2013-03-05 Thread karl
karl added the comment: → curl -sI http://kniznica.uniza.sk/opac HTTP/1.1 302 Moved Temporarily Date: Wed, 06 Mar 2013 03:23:06 GMT Server: Indy/9.0.50 Content-Type: text/html Location: ?fs=C79F09C9F1304E7AA4FF7C211BEA2B9B&fn=main → python3.3 Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29

[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2013-03-05 Thread karl
karl added the comment: Setting a user agent string should be possible. My guess is that the default library has been used by an abusive client (by mistake or intent) and wikimedia project has decided to blacklist the client based on the user-agent string sniffing. The match is on anything

[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-03-06 Thread karl
karl added the comment: orsenthil, would that test work? See issue-17324-test-1.patch Here the result of the test which is FAIL as planned (given the current issue). → ./python.exe Lib/test/test_httpservers.py test_header_buffering_of_send_error (__main__.BaseHTTPRequestHandlerTestCase

[issue17369] Message.get_filename produces exception if the RFC2231 encoding is ill-formed

2013-03-06 Thread karl
karl added the comment: r.david.murray, how did you enter the first without a syntax error? >>> import email.message >>> m = message_from_string("Content-Disposition: attachment; >>> filename*0*="can't decode this filename") File ""

[issue17138] XPath error in xml.etree.ElementTree

2013-03-06 Thread karl
karl added the comment: http://docs.python.org/3/library/xml.etree.elementtree.html#supported-xpath-syntax 20.5.2. XPath support This module provides limited support for XPath expressions for locating elements in a tree. The goal is to support a small subset of the abbreviated syntax; a full

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread karl
karl added the comment: Here an attempt at fixing it. See issue-17375-1.patch for Python 3.3 Hope it helps. -- keywords: +patch nosy: +karlcow Added file: http://bugs.python.org/file29338/issue-17375-1.patch ___ Python tracker <h

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread karl
karl added the comment: Ah bummer! :) it was already done. :) Well it seems already well commented in the review. :) Closing this one as duplicate? -- ___ Python tracker <http://bugs.python.org/issue17

[issue17376] TimedRotatingFileHandler documentation regarding 'Week day' lacking

2013-03-07 Thread karl
karl added the comment: Is it better like this? See the patch. -- keywords: +patch nosy: +karlcow Added file: http://bugs.python.org/file29341/issue-17376-doc-3.3.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17376] TimedRotatingFileHandler documentation regarding 'Week day' lacking

2013-03-08 Thread karl
Changes by karl : -- nosy: +vinay.sajip ___ Python tracker <http://bugs.python.org/issue17376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue747320] rfc2822 formatdate functionality duplication

2013-03-08 Thread karl
karl added the comment: Ok after comments and review by Eric Araujo on the previous patch. See issue-747320-3.patch I have ran → ./python.exe Lib/test/test_httpservers.py […] -- Ran 39 tests in 3.734s OK [137158 refs] That

[issue17340] Handle malformed cookie

2013-03-08 Thread karl
karl added the comment: Just a quick note that the new specification for HTTP State Mechanism (aka cookies) is http://tools.ietf.org/html/rfc6265 keakon, Do you know why her cookie was ',BRIDGE_R=;' -- nosy: +karlcow ___ Python trac

[issue17340] Handle malformed cookie

2013-03-09 Thread karl
karl added the comment: Yes the new RFC has been written by Adam Barth who wanted to describe things matching the reality of HTTP and servers/browsers issues. -- ___ Python tracker <http://bugs.python.org/issue17

[issue17340] Handle malformed cookie

2013-03-09 Thread karl
karl added the comment: The current status of RFC6265 is PROPOSED STANDARD http://www.rfc-editor.org/info/rfc6265 Adam Barth is part of the Google Chrome Team. I do not want to talk for Adam. So better ask him, I don't think he has the energy/will to push further through the IETF pr

[issue17410] Generator-based HTMLParser

2013-03-13 Thread karl
karl added the comment: flying sheep: do you plan to make it easier to use the HTML5 algorithm? http://www.w3.org/TR/html5/syntax.html#parsing -- nosy: +karlcow ___ Python tracker <http://bugs.python.org/issue17

[issue17410] Generator-based HTMLParser

2013-03-13 Thread karl
karl added the comment: Ezio: I'm talking about "HTML5 Parsing algorithm", not about about parsing html* documents. :) The only python parser I know who is closer of the HTML5 parser algorithm is https://code.google.com/p/html5lib/ -- ___

[issue12921] http.server.BaseHTTPRequestHandler.send_error , ability send a detailed response

2013-03-15 Thread karl
karl added the comment: Thanks! Yes we should open a separate issue. I will look at the current patch and see what I can propose for the next step. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12921] http.server.BaseHTTPRequestHandler.send_error , ability send a detailed response

2013-03-15 Thread karl
karl added the comment: just a minor issue you made a mistake in the commit message. The issue number is 12921 -- ___ Python tracker <http://bugs.python.org/issue12

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-19 Thread karl
karl added the comment: The wireshark trace is a different domain than the code example. But let's see. cocobear added: headers = [("Content-Type","application/oct-stream"),] with a "Content-Type", not the capitalized "Type". BUT in the s

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread karl
karl added the comment: orsenthil, Added test for python 3.3 for testing the case insensitivity for has_header and get_header. The tests fail as it should. See issue-5550-test-1.patch I will make a patch to urllib/request.py to make it work. OK with you? -- keywords: +patch Added

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread karl
karl added the comment: First, Sanity check for myself to be sure to understand. == → python3.3 Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright

[issue12455] urllib2 forces title() on header names, breaking some requests

2013-03-20 Thread karl
karl added the comment: terry.reedy: You said: "and that has_header and get_header *require* the .capitalize() form and reject the .title() form." I made a patch for these two. See http://bugs.python.org/issue5550 -- ___ Python trac

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-28 Thread karl
karl added the comment: Yes case insensitive make sense. It seems it will require a lot of modifications in the code. So I guess maybe the first step is to identify where it could break. -- ___ Python tracker <http://bugs.python.org/issue5

[issue24772] Smaller viewport shifts the "expand left menu" character into the text

2015-08-01 Thread karl
New submission from karl: Adding the following to basic.css: ```css dl { margin-bottom: 15px; word-wrap: break-word; } ``` will solve the issue. See https://github.com/webcompat/web-bugs/issues/1479 -- assignee: docs@python components: Documentation messages: 247803 nosy

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-14 Thread karl
karl added the comment: >From https://www.djangoproject.com/foundation/cla/faq/ > Am I giving away the copyright to my contributions? > > No. This is a pure license agreement, not a copyright assignment. You > still maintain the full copyright for your contributions. You are &

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-14 Thread karl
karl added the comment: About > Actually, I realized that the best implementation of parsing rfc 3339 > is in django dateparse utils. To me it's the finest, the most > elegant, and no other one can claim to be more robust since it's > probably the #1 iso parsing fu

[issue24772] Smaller viewport shifts the "expand left menu" character into the text

2016-02-17 Thread karl
karl added the comment: Where should I propose a patch to help resolve this issue? A pointer to the code in the repo and I will do it. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome.

2016-10-03 Thread karl
karl added the comment: @ezio.melotti What is the next step for getting the patch accepted. -- nosy: +karlcow ___ Python tracker <http://bugs.python.org/issue24

[issue2010] Link to howto section on re module documentation incorrect

2008-02-04 Thread Karl Norby
New submission from Karl Norby: The link on "http://docs.python.org/lib/re-syntax.html"; to the HOWTO section of documentation redirects incorrectly to "http://docs.python.org/dev/howto/index.html/";. It should be "http://docs.python.org/dev/howto/"; or &qu

[issue38352] In typing docs, note explicit import needed for IO and Pattern/Match

2019-10-02 Thread Karl Kornel
New submission from Karl Kornel : Hello! In https://github.com/python/cpython/blob/master/Lib/typing.py#L115-L117, there is a note about the io and re classes not being included in typing.__all__. I am a relatively new user of typing, and I did `from typing import *` in my code. I ran the

[issue40291] socket library support for CAN_J1939

2020-04-14 Thread Karl Ding
New submission from Karl Ding : It would be nice to have support J1939 sockets. Support for J1939 landed as part of the SAE J1939 SocketCAN patches, which are available after the Linux 5.4rc1 kernel. This is another protocol family for SocketCAN, much like the existing support for ISOTP and

[issue40291] socket library support for CAN_J1939

2020-04-14 Thread Karl Ding
Change by Karl Ding : -- keywords: +patch pull_requests: +18886 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19538 ___ Python tracker <https://bugs.python.org/issu

[issue40297] test_socket.CANTest is broken at HEAD on master

2020-04-15 Thread Karl Ding
New submission from Karl Ding : While working on https://bugs.python.org/issue40291, I was trying to run the SocketCAN tests to ensure that my changes weren't causing any regressions. However, I was seeing test failures at HEAD. I'm running the tests like so: # Kernel versio

[issue40297] test_socket.CANTest is broken at HEAD on master

2020-04-15 Thread Karl Ding
Change by Karl Ding : -- keywords: +patch pull_requests: +18894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19548 ___ Python tracker <https://bugs.python.org/issu

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-01 Thread Karl Nelson
New submission from Karl Nelson : While trying to use JPype on Windows Python 3.9.0, we are running into an bizarre issue with loading the internal module which is written in C. When running a python script the first time the internal module loads correctly. However, the second time that

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-10 Thread Karl Nelson
Karl Nelson added the comment: I managed to get the debugger attached (unfortunately I am not a windows programmer so I don't use these tools). It appears when loading from a pyc, it is attempting to open the directory as a Zip file which is throwing an exception resulting in a failu

[issue42617] Enhancement request for PyType_FromSpecWIthBases add option for meta class

2020-12-10 Thread Karl Nelson
New submission from Karl Nelson : PyType_FromSpecWithBases is missing an argument for taking a meta class. As a result it is necessary to replicate a large portion of Python code when I need to create a new heap type with a specified meta class. This is a maintenance issue as replicating

[issue42618] Enhancement request for importing stacktraces from foreign sources

2020-12-10 Thread Karl Nelson
New submission from Karl Nelson : In JPype, I am transfer stack information from Java into Python for diagnostics and display purposed. Unfortunately, as the exception system is directly accessing traceback structure elements this cannot be replicated without creating traceback structures

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-10 Thread Karl Nelson
Karl Nelson added the comment: Oddly that was the only exception that I got. When I hit continue it proceeded without issue and the dll was loaded correctly. However, when I try without the debugger attached the error reappears. So this is one of those Schrodinger errors. I know the

[issue42617] Enhancement request for PyType_FromSpecWIthBases add option for meta class

2020-12-12 Thread Karl Nelson
Karl Nelson added the comment: Perhaps just having PyType_InitHeapFromSpec which have just heap type linkage and slot copy section would help with the issue. The major problem I have is maintaining the slot code which may change at some point in the future. There would still be some

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-14 Thread Karl Nelson
Karl Nelson added the comment: Any progress on this item? I am seeing additional reports of this error in the conda stream tracker and elsewhere. As it only occurs when the debugger is not hooked up I don't have much traction to make progress m

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-16 Thread Karl Nelson
Karl Nelson added the comment: I am fairly sure this is a Python "bug" in the sense that there was some change in undocumented change in requirements and the distutils pattern for building a module no longer reflects that requirement. That said very likely JPype is the only mo

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Karl Nelson
Karl Nelson added the comment: Thanks, I will see if I can get additional diagnostics today. Otherwise I will have to start recompiling Python with diagnostic hooks. I have never had to rebuild python on windows so it may take a while to figure out how to make progress. The monkey patch

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Karl Nelson
Karl Nelson added the comment: Without the pyc everything goes fine... ``` ... _bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x0222E9FD5A30> import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x0222E9F88F40>

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-17 Thread Karl Nelson
Karl Nelson added the comment: Well that gives me a place to search from. Unfortunately statics are not likely the source of the issue. I scrubbed all C++ structures from the project into a big structure which has only a single global pointer which I initialize in the init method. It

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-18 Thread Karl Nelson
Karl Nelson added the comment: I attempted another deep dive on this one. 1) Removed manual library add platform_specific['libraries'] = ['Advapi32'] No change. 2) Compared symbol wise imports Two imports changed PyIndex_Check PyObject_CheckBuffer plus one additional

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-18 Thread Karl Nelson
Karl Nelson added the comment: Just for reference here are all the dependencies that _jpype has ``` MSVCP140.dll python39.dll

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-18 Thread Karl Nelson
Karl Nelson added the comment: Can you be so kind as pointing me to a LoadLibraryExW detour example for Python? I have shimmed a DLL before to capture transaction logs in the past, but not with a Python or a system library. -- ___ Python

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-18 Thread Karl Nelson
Karl Nelson added the comment: I used Detours with trclnk64 to get the following log: ``` 20201218193836960 4332 50.60: trclnk64: 001 GetProcAddress(,) -> 7ffc4ccebef0 20201218193836960 4332 50.60: trclnk64: 001 GetProcAddress(7ffc4ccd,LCMapStringEx) 20201218193836960 4332 50

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-18 Thread Karl Nelson
Karl Nelson added the comment: The last libraries loaded prior to the failure were... ``` 20201218192451066 20440 50.60: trclnk64: api-ms-win-eventing-provider-l1-1-0.dll [7ffc4c974108 7ffc4c8b7808] 20201218192451066 20440 50.60: trclnk64: EventUnregister0 7ffc4eab37a0

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-19 Thread Karl Nelson
Karl Nelson added the comment: Eryk, Unfortunately, this particular bug is resistant to attaching the debugger. Whenever the debugger is attached the bug disappears. Fortunately the suggestion to use Detours by WildCard65 appears to offer a way to diagnose the issue

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-19 Thread Karl Nelson
Karl Nelson added the comment: I looked more at the logs to see if I can find out what to instrument next. The log files unfortunately don't diff well because every line contains a timestamp so I can't a proper alignment as well as all the real addresses. So I wrote a short

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-19 Thread Karl Nelson
Karl Nelson added the comment: I will look through the list of samples in Detours to see if there is something that can give us better stacktrace information. If we really need a stack trace I can make Detours bust by creating an intentional segfault and see if we can attach the debugger

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-19 Thread Karl Nelson
Karl Nelson added the comment: Gave another series of shots at the problem. So the reason that attaching the debugger fixes the issue is that it calls LoadLibraryExW for a bunch libraries when it attaches. I was also able to unconditionally trigger the bug even when loading without the

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-19 Thread Karl Nelson
Karl Nelson added the comment: Drat I missed that one when I was scanning for statics because I was focusing C++ resource rather than looking for Python resources. I also wouldn't have expected this to happen on only one platform, but that was my bad. Is it possible to improve the

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-19 Thread Karl Nelson
Karl Nelson added the comment: I found it. The change that hit JPype is https://bugs.python.org/issue33895 Thanks, Eryk Sun for figuring this out. I would never have gotten myself. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-20 Thread Karl Nelson
Karl Nelson added the comment: Okay, well at least now googling Python + "A dynamic link library (DLL) initialization routine failed." give something which could point a user may be able to identify the issue. It wasn't obvious to me that imports did not hold the GIL, but

[issue30988] Exception parsing invalid email address headers starting or ending with dot

2020-12-21 Thread Karl Fogel
Karl Fogel added the comment: I can also confirm this bug, with Python 3.9.1 on Debian GNU/Linux ('testing' distro up-to-date as of 2020-12-21). 1) Create a parser `p` with `p = email.parser.HeaderParser(policy=email.policy.default)`. 2) Parse a single problematic (as descr

[issue42731] Enhancement request for proxying PyString

2020-12-24 Thread Karl Nelson
New submission from Karl Nelson : When developing with JPype, the largest hole currently is that Java returns a string type which cannot be represented as a str. Java strings are string like and immutable and can be pulled to Python when needed, but it is best if they remain in Java until

[issue40291] socket library support for CAN_J1939

2020-05-19 Thread Karl Ding
Change by Karl Ding : -- pull_requests: +19536 pull_request: https://github.com/python/cpython/pull/20248 ___ Python tracker <https://bugs.python.org/issue40

[issue40291] socket library support for CAN_J1939

2020-05-19 Thread Karl Ding
Karl Ding added the comment: Should this be added to the What's New for 3.9? I see a smaller change that exposes the CAN_RAW_JOIN_FILTERS constant mentioned. I've created https://github.com/python/cpython/pull/20248 if this

[issue40297] test_socket.CANTest is broken at HEAD on master

2020-05-22 Thread Karl Ding
Karl Ding added the comment: Related: I've started a thread on Discourse [0] looking into why the tests don't seem to be run on the Buildbot cluster (and what it would take to enable them). Hopefully it gains some traction. [0] https://discuss.python.org/t/what-would-it-t

[issue37085] Expose additional socket constants for CAN_BCM flags

2019-05-28 Thread Karl Ding
New submission from Karl Ding : When reading through the values exposed via the socket library, I noticed that currently, only the SocketCAN BCM opcode enums are exposed via the socket constants. These correspond to the following from the Linux headers: enum

[issue37085] Expose additional socket constants for CAN_BCM flags

2019-05-29 Thread Karl Ding
Change by Karl Ding : -- keywords: +patch pull_requests: +13541 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13646 ___ Python tracker <https://bugs.python.org/issu

[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2019-05-30 Thread Karl Ding
Karl Ding added the comment: I believe the example can be simplified to the following: class MyStructure(ctypes.Structure): _pack_ = 1 _fields_ = [('A', ctypes.c_uint32, 8)] assert ctypes.sizeof(MyStructure) == 1 Here, ctypes.sizeof retur

[issue504714] hasattr catches only AttributeError

2012-07-16 Thread Karl Chen
Karl Chen added the comment: For the record, this was eventually fixed for Python 3.2. See http://bugs.python.org/issue9666. Adding this here because issue504714 comes up earlier than issue9666 in many web searches. -- nosy: +quarl ___ Python

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-20 Thread Karl Bicker
New submission from Karl Bicker: The multiprocessing.JoinableQueue's function join() should have a timeout argument so that one can check on other things while waiting for a queue to finish. As join() uses a condition to wait anyway, a timeout is easily implemented and passed t

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-21 Thread Karl Bicker
Karl Bicker added the comment: Actually, I would like to check if the threads working on the queue are still alive. However, it occurs to me now that I would need a facility to distinguish between a timeout and an actual join. Unfortunately, my original patch does not provide this, one

[issue21208] Change default behavior of arguments with type bool when options are specified

2014-04-12 Thread Karl Richter
New submission from Karl Richter: As arguments with type bool are the only ones whose values can be manipulated without passing an option to the argument on CLI, the default behavior for those should be changed from ignoring options to failing when options are specified. Consider the

[issue21208] Change default behavior of arguments with type bool when options are specified

2014-04-12 Thread Karl Richter
Karl Richter added the comment: I've been mistaken about the behavior if no argument is specified (then the argument value is None), so this is a bug! -- ___ Python tracker <http://bugs.python.org/is

[issue21208] Change default behavior of arguments with type bool when options are specified

2014-04-13 Thread Karl Richter
Karl Richter added the comment: That's a pity, I still think it's confusing. Thanks for your feedback! -- ___ Python tracker <http://bugs.python.o

[issue21208] Change default behavior of arguments with type bool when options are specified

2014-05-28 Thread Karl Richter
Karl Richter added the comment: @paul.j3 That's interesting [1]. Documenting argparse.register seems crucial to me (-> reopen or file a new request?). After dealing more with the very sophisticated and complex functionality of argparse I'm sure that this is the only use case

[issue21739] Add hint about expression in list comprehensions (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions)

2014-06-12 Thread Karl Richter
New submission from Karl Richter: It would be useful to have a short statement in the docs (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions) that the expression in a list comprehension isn't put into a block, but evaluated against the same block where it is lo

[issue19084] No way to use TLS-PSK from python ssl

2013-09-24 Thread Karl Palsson
New submission from Karl Palsson: OpenSSL supports TLS-PSK which some people (myself obviously) find to be substantially easier to use than setting up certs. However, there's no way to use PSK via the current SSL api in python. It would be very nice to be able to use PSK from python.

[issue21885] shutil.copytree hangs (on copying root directory of a lxc container) (should succeed or raise exception nested)

2014-06-30 Thread Karl Richter
New submission from Karl Richter: reproduction (on Ubuntu 14.04 amd64 with lxc 1.0.4) (with python 2.7.6 and 3.4.0) # as root/with privileges lxc-create -n ubuntu-trusty-amd64 -t ubuntu -- --arch amd64 --release trusty lxc-stop -n ubuntu-trusty-amd64 # assert container isn&#

[issue21889] https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions doesn't explain exception

2014-06-30 Thread Karl Richter
New submission from Karl Richter: Although the section https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions (of the multiprocessing module documentation) is titled "... and exceptions" it doesn't say anything about exceptions. I assume that it behaves

[issue20683] [doc] Ease comprehension of section 9.2 of docs for Python 2 and 3 with example

2014-02-19 Thread Karl Richter
New submission from Karl Richter: The explanation of namespaces in section 9.2 in documentation (http://docs.python.org/3/tutorial/classes.html#python-scopes-and-namespaces) is just so complicated without (at least one tiny) example. The example would ease the comprehension of the section by

[issue1675951] [gzip] Performance for small reads and fix seek problem

2009-12-22 Thread Karl D'Adamo
Karl D'Adamo added the comment: This patch is awesome. It makes it possible to do this with http response objects that return gzipped streams: >>> conn = httplib.HTTPConnection('blah') >>> req = conn.request('GET', 'a.gz') >>>

<    1   2   3   >