[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-11 Thread Richard S. Gordon
Richard S. Gordon added the comment: Clarification: The suggested fix to the Python 3.6.1 curses stdlib should only be applied to those 64-bit platform version used with 64-bit ncurses 6.0. It should NOT apply to the Python 3.6.1 curses stdlib applied to those 32-bit platforms used with 32-bit

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-11 Thread Richard S. Gordon
Richard S. Gordon added the comment: > On Jun 10, 2017, at 4:28 AM, Richard S. Gordon <rigo...@comcast.net> wrote: > > >> On Jun 9, 2017, at 4:59 PM, Richard S. Gordon <rep...@bugs.python.org >> <mailto:rep...@bugs.python.org>> wrote: >>

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-10 Thread Richard S. Gordon
Richard S. Gordon added the comment: > On Jun 9, 2017, at 4:59 PM, Richard S. Gordon <rep...@bugs.python.org> wrote: > > > Richard S. Gordon added the comment: > >> On Jun 9, 2017, at 4:41 PM, STINNER Victor <rep...@bugs.python.org> wrote: >>

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon
Richard S. Gordon added the comment: > On Jun 9, 2017, at 4:41 PM, STINNER Victor <rep...@bugs.python.org> wrote: > > > STINNER Victor added the comment: > > Cygwin is not currently supported by CPython, so I suggest to close this > issue. I mean: please

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon
Richard S. Gordon added the comment: > On Jun 9, 2017, at 12:32 PM, STINNER Victor <rep...@bugs.python.org > <mailto:rep...@bugs.python.org>> wrote: > > > STINNER Victor added the comment: > > What is your operating system? How did you install ncurses

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon
Richard S. Gordon added the comment: > On Jun 9, 2017, at 11:59 AM, Richard S. Gordon <rigo...@comcast.net> wrote: > > >> On Jun 9, 2017, at 11:16 AM, STINNER Victor <rep...@bugs.python.org> wrote: >> >> >> STINNER Victor added the comment: &g

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon
Richard S. Gordon added the comment: > On Jun 9, 2017, at 11:16 AM, STINNER Victor <rep...@bugs.python.org> wrote: > > > STINNER Victor added the comment: > >> Generated colors appear to be corrupted by overloading text attribute with >> specified

[issue30609] Python 3.6.1 fails to generate 256 colors on Cygwin based 64-bit Windows 10

2017-06-09 Thread Richard S. Gordon
New submission from Richard S. Gordon: Generated colors appear to be corrupted by overloading text attribute with specified foreground and background colors. This can be demonstrated by running test_tsWxColorPalette.py in Python 3x (developer-sandbox) found in https://github.com/rigordo959

[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-28 Thread Richard Cooper
Richard Cooper added the comment: Pull Request (PR 1649) treats this as a documentation problem. I would argue that the documentation is correct and this is a bug in the code. The `strict` flag was added as a result of issue19717. The decision on what to do when strict=False seems to come

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-03-27 Thread Richard Xia
Richard Xia added the comment: Thanks for the discussion. I ended up doing something similar to the code snippet Christian posted, except I also had a second try/except FileNotFoundError within the original finally block to catch the case that David pointed out. In retrospect, I probably

[issue29851] importlib.reload references None object

2017-03-18 Thread Richard Cooper
New submission from Richard Cooper: importlib.reload doesn't work; gives an error about NoneType having no name attribute. See attached a simple repo testcase When run it yields the following [disappointing] result. I'm running Python3.0.6.1 (installed from brew) on OSX 10.12.3

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-02-15 Thread Richard Xia
New submission from Richard Xia: Here is a very short program to demonstrate what I'm seeing: >>> import tempfile >>> import os >>> with tempfile.NamedTemporaryFile(delete=True) as fp: ... print(fp.name) ... os.system('rm {}'.format(fp.name)) /tmp/tmpomw0ud

[issue28913] "Fatal Python error: Cannot recover from stack overflow." from RecursionError

2016-12-08 Thread Richard Eames
New submission from Richard Eames: I've been porting a project to the latest version of Django, and due to one of the changes in the Django, caused a recursion error in my code. However, the error (under certain conditions) then causes the python interpreter to core dump. I'm not 100% sure

[issue28803] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for Cygwin

2016-11-25 Thread Richard S. Gordon
Changes by Richard S. Gordon <rigo...@comcast.net>: -- components: Build nosy: rigordo priority: normal severity: normal status: open title: Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for Cygwin versions: Pyth

[issue28802] Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin

2016-11-25 Thread Richard s. Gordon
Changes by Richard s. Gordon <softwaregadge...@comcast.net>: -- nosy: eclectic9509 priority: normal severity: normal status: open title: Python 3.6.0b4 Reports ncurses present in Cygwin but fails to build for cygwin ___ Python tracke

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Richard Prosser
Richard Prosser added the comment: Ah. Something like self._interpolation.before_get(self, section, option, value, d) could be better written as self._interpolation.before_get(parser=self, ...) - but that would require keyword arguments to be used throughout. I still don't grock the apparent

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Richard Prosser
Richard Prosser added the comment: Thanks for the prompt reply. I still don't fully understand yet but there aren't any errors reported so I presume that it is OK. There is another related matter however: PyCharm (2016.2.3) indicates that a get() method signature does not match

[issue28801] configparser: before_get() method of class Interpolation has positional 'parser' parameter that is not used.

2016-11-25 Thread Richard Prosser
New submission from Richard Prosser: >From https://hg.python.org/cpython/file/3.5/Lib/configparser.py (for example): 358class Interpolation: 359"""Dummy interpolation that passes the value through with no changes.""" 360 361def before_get(self, parser,

[issue28782] SEGFAULT when running a given coroutine

2016-11-25 Thread Martin Richard
Martin Richard added the comment: Thank you all for fixing this so quickly, it's been done amazingly fast! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28782] SEGFAULT when running a given coroutine

2016-11-23 Thread Martin Richard
New submission from Martin Richard: Hi, I stumbled upon a SEGFAULT while trying Python 3.6.0 on a project using asyncio. I can't really figure out what's happening, so I reduced the original code triggering the bug down to a reproducible case (which looks a bit clunky, sorry). The case has been

[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2016-09-27 Thread Martin Richard
New submission from Martin Richard: Hi, Currently, subprocess.Popen performs blocking IO in its constructor (at least on Unix): it reads on a pipe in order to detect outcome of the pre-exec and exec phase in the new child. There is no way yet to modify this behavior as this blocking call

[issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard <john3...@protonmail.com>: Added file: https://bugs.python.org/file44244/docbugmathlog2.jpg ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard <john3...@protonmail.com>: -- title: Python docs on 9.52 Math module lists math.log2 as function but it does not exist -> Python docs on 9.2 Math module lists math.log2 as function but it does not exist ___ Python tra

[issue27882] Python docs on 9.52 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard <john3...@protonmail.com>: -- title: Python docs on 3.52 Math module lists math.log2 as function but it does not exist -> Python docs on 9.52 Math module lists math.log2 as function but it does not exist ___ Python tra

[issue27882] Python docs on 3.52 Math module lists math.log2 as function but it does not exist

2016-08-27 Thread Richard
Changes by Richard <john3...@protonmail.com>: -- assignee: docs@python components: Documentation nosy: PyRW, docs@python priority: normal severity: normal status: open title: Python docs on 3.52 Math module lists math.log2 as function but it does not exist versions: Pyth

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread Richard
Richard added the comment: Yeah, figured as much. But thanks:) I'm kind of new to Python and was having some problems determining whether this is as it should be, or if it should be improved. After all, I could not find any documentation that states what the permitted variable-types

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread Richard
New submission from Richard: No idea if I should be reporting this here, but it came with the default installation, so here goes: On a mac, I supplied a basicConfig object to the logging class that contains a PosixPath instance for the "filename" attribute. consequently

[issue27090] Python 3 import error after installation

2016-05-23 Thread Richard Penman
Richard Penman added the comment: Apparently "The PYTHONPATH variable is used by all versions of Python 2 and Python 3, so you should not permanently configure this variable unless it only includes code that is compatible with all of your installed Python versions." That s

[issue27090] Python 3 import error after installation

2016-05-23 Thread Richard Penman
Richard Penman added the comment: The full error log: $ python3 Failed to import the site module Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/site.py", line 75, in __boot() File "/usr/local/lib/python2.7/site-packages/site.py"

[issue27090] Python 3 import error after installation

2016-05-23 Thread Richard Penman
New submission from Richard Penman: I installed latest release (https://www.python.org/downloads/release/python-351/) on OSX and get this error: $ python3 ... ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2016-05-12 Thread Richard Neumann
Richard Neumann added the comment: Thank you for the hint. I never before contributed code to the python foundation and thus am not familiar with the process. I will look into it when I find the time. -- ___ Python tracker <rep...@bugs.python.

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2016-05-12 Thread Richard Neumann
Richard Neumann added the comment: Please excuse my ambiguous phrasing. What I meant was I created the patch _from_ the Python 3.5.1 module _for_ Python 3.6. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2016-05-12 Thread Richard Neumann
Richard Neumann added the comment: I took the liberty to create a patch for Python v3.5.1. -- keywords: +patch nosy: +Richard Neumann Added file: http://bugs.python.org/file42828/subprocess.patch ___ Python tracker <rep...@bugs.python.org>

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-12 Thread Richard Neumann
Changes by Richard Neumann <r.neum...@homeinfo.de>: Added file: http://bugs.python.org/file42827/logger.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-12 Thread Richard Neumann
Changes by Richard Neumann <r.neum...@homeinfo.de>: Removed file: http://bugs.python.org/file42825/logger.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-12 Thread Richard Neumann
Richard Neumann added the comment: Added proposed patch -- keywords: +patch Added file: http://bugs.python.org/file42825/logger.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-12 Thread Richard Neumann
Richard Neumann added the comment: PS: @vinay.sajip You do realize that I want this argument to be optional and to retain '.' as default setting in order to keep the current behaviour?! -- ___ Python tracker <rep...@bugs.python.org>

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-12 Thread Richard Neumann
Richard Neumann added the comment: I am using loggers and sub-loggers (getChild()) in classes, which contain sub-classes, wich contain sub-sub-classes and so on for complex data processing. Hence I was using the logging library with sub-loggers to see in which of the (sub-)classes things

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-11 Thread Richard Neumann
Changes by Richard Neumann <r.neum...@homeinfo.de>: -- title: Add child seperator keyword to logging.basicConfig and use it in Logger.getChild() -> Add child separator keyword to logging.basicConfig and use it in Logger.getChild() _

[issue26999] Add child seperator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-11 Thread Richard Neumann
New submission from Richard Neumann: Currently Python's logging library has the Child-Separator hard-coded in Logger.getChild() as '.'. It would be useful to have the ability to preset this via an optional basicConfig() argument like 'child_sep=' and preset it to '.' to retain the current

[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2016-04-27 Thread Richard PALO
Richard PALO added the comment: [fingers not yet warmed up] that is '/opt/local/lib/libmagic.so' -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2016-04-27 Thread Richard PALO
Richard PALO added the comment: An example: richard@omnis:/home/richard$ python2.7 Python 2.7.11 (default, Apr 27 2016, 04:35:25) [GCC 4.9.3] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes

[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2016-04-27 Thread Richard PALO
Richard PALO added the comment: oups... I meant to add the comment about $ORIGIN (not really useful here) but also the fact that the binary python is built with the dependencies found via the library path (-L, for example) and the eventual run-paths (-R or -runpath) when not in the system

[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2016-04-26 Thread Richard PALO
Richard PALO added the comment: There *is* a feature with linking called $ORIGIN. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26522] pickle.whichmodule(object.__new__, None) = 'email.MIMEAudio'

2016-03-09 Thread Richard Futrell
Richard Futrell added the comment: Ah, I get the same result as you in a clean interpreter session. Looks like it's not Python's fault. The bug seems to arise from an interaction with cloudpickle 0.2.1 (and only in IPython), which puts the bad value into a cache somewhere in the pickle module

[issue26522] pickle.whichmodule(object.__new__, None) = 'email.MIMEAudio'

2016-03-09 Thread Richard Futrell
New submission from Richard Futrell: On Python 2.7.11, pickle.whichmodule(object.__new__, None) = 'email.MIMEAudio' This is unlikely to be the correct module. -- components: XML messages: 261465 nosy: canjobear priority: normal severity: normal status: open title: pickle.whichmodule

[issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer

2016-01-04 Thread Richard Clifford
New submission from Richard Clifford: The issue comes when there is a malformed HTTP request not ending in a new line, it causes the server to hang, not timeout and causes a DoS. The request that I sent to the server was as follows: const char *headers = "GET / HTTP/1.1\r\nHost: localhost

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-02 Thread Richard PALO
Richard PALO added the comment: curiously enough, I was able to test with python3.5. The same errors result, and the same workaround seems to get over it. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-02 Thread Richard PALO
Richard PALO added the comment: This turns out to be related to the locale environment set to 'C'. A UTF-8 locale seems to get over the issue. A fellow pkgsrc colleague filed an issue with lxml already relating to that fact for the test suite (https://bugs.launchpad.net/lxml/+bug/1522052

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-01 Thread Richard PALO
Richard PALO added the comment: I notice similar problems, as found when running the test suite for lxml 3.5.0 on python2.7 == ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-01 Thread Richard PALO
Richard PALO added the comment: If I also add .encode('utf-8') to filename on line 278, that seems gets over the pathname problem. I guess it comes down to the fact that if sys.filesystemencoding() is utf-8, which in my case it is (on SunOS), I believe these conversion should be automatic

[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris

2015-12-19 Thread Richard PALO
Richard PALO added the comment: I tried this patch out on pkgsrc, it does seem reasonable and appropriate. So +1 from me. It does only look for libraries the actual $PREFIX directory used by packaging systems such as pkgsrc and csw. (typically /usr/local, /opt/local or /opt/csw in the case

[issue25676] Bug

2015-11-19 Thread Richard Tupper
New submission from Richard Tupper: resolved -- components: Windows files: Garcinia Cambogia Free Trial UK.html messages: 254940 nosy: omskinbourbe1977, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Bug type: enhancement versions

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2015-10-22 Thread Richard Neumann
Richard Neumann added the comment: A useless use case is attached. Basically it boils down to having the ability to evaluate the CompletedProcess directly by if/else rather than comparing its returncode attribute to zero each time or handling the exception raised by check_returncode(). I use

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2015-10-21 Thread Richard Neumann
New submission from Richard Neumann: The class subprocess.CompletedProcess is currently lacking a __bool__() method. It might be a practical feature to have the possibility to evaluate a CompletedProcess instance in an if/else block without the necessity to handle the exception raised

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-02 Thread J Richard Snape
Changes by J Richard Snape <snapey1...@googlemail.com>: -- nosy: +J Richard Snape ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2015-07-10 Thread Martin Richard
Martin Richard added the comment: I'm not sure I know how to do this correctly: I lack of experience both with openssl C API and writing python modules in C. It may be more flexible, but unless the key is protected/crypted somehow, one would need a string or bytes buffer to hold the key when

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2015-07-09 Thread Martin Richard
Martin Richard added the comment: Hi, I would like to update this patch so it can finally land in cpython, hopefully 3.6. tl;dr of the thread: In a nutshell, the latest patch from Kristján Valur Jónsson updates SSLContext.load_cert_chain(certfile, keyfile=None, password=None

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2015-07-09 Thread Martin Richard
Martin Richard added the comment: You are right. And if certfile and keyfile (args of load_cert_chain()) accept file-like objects, we agree that cafile (load_verify_location()) should accept them too? -- ___ Python tracker rep...@bugs.python.org

[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) raises NotImplementedError, but {}.keys().__or__(x) raises TypeError

2015-06-08 Thread Richard Futrell
Changes by Richard Futrell futr...@mit.edu: -- nosy: canjo priority: normal severity: normal status: open title: Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) raises NotImplementedError, but {}.keys().__or__(x) raises TypeError

[issue21998] asyncio: support fork

2015-05-26 Thread Martin Richard
Martin Richard added the comment: Hi, My patch was a variation of haypo's patch. The goal was to duplicate the loop and its internal objects (loop and self pipes) without changing much to its state from the outside (keeping callbacks and active tasks). I wanted to be conservative

[issue21998] asyncio: support fork

2015-05-26 Thread Martin Richard
Martin Richard added the comment: 015-05-26 20:40 GMT+02:00 Yury Selivanov rep...@bugs.python.org: Yury Selivanov added the comment: The only solution to safely fork a process is to fix loop.close() to check if it's called from a forked process and to close the loop in a safe way (to avoid

[issue23540] Proposal for asyncio: SubprocessTransport.detach() to detach a process from a transport

2015-02-27 Thread Martin Richard
New submission from Martin Richard: I would like to add a detach() method to base_suprocess.BaseSuprocessTransport, which would release the underlying Popen object to the user, pretty much like socket.detach() detaches a socket object and returns the fd. The rationale is the following

[issue23537] BaseSubprocessTransport includes two unused methods

2015-02-27 Thread Martin Richard
New submission from Martin Richard: base_subprocess.BaseSuprocessTransport implements _make_write_subprocess_pipe_proto and _make_read_subprocess_pipe_proto. Both are private and both raise NotImplementedError. However, when I grep in tulip sources for those methods, they are never called nor

[issue21998] asyncio: support fork

2015-02-17 Thread Martin Richard
Martin Richard added the comment: In that case, I suggest a small addition to your patch that would do the trick: in unix_events.py: +def _at_fork(self): +super()._at_fork() +self._selector._at_fork() +self._close_self_pipe() +self._make_self_pipe

[issue21998] asyncio: support fork

2015-02-17 Thread Martin Richard
Martin Richard added the comment: The goal of the patch is to create a duplicate selector (a new epoll() structure with the same watched fds as the original epoll). It allows to remove fds watched in the child's loop without impacting the parent process. Actually, it's true

[issue21998] asyncio: support fork

2015-02-17 Thread Martin Richard
Martin Richard added the comment: I read the patch, it looks good to me for python 3.5. It will (obviously) not work with python 3.4 since self._selector won't have an _at_fork() method. I ran the tests on my project with python 3.5a1 and the patch, it seems to work as expected: ie. when I

[issue23412] importlib sometimes fails to import a recently created module

2015-02-08 Thread Richard Dymond
New submission from Richard Dymond: importlib.import_module() sometimes fails to import a module that has just been written to the filesystem, aborting with an ImportError. Example output when executing the attached file with Python 3.3 or 3.4: Wrote tmpwbzb35.py Successfully imported

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Added file: http://bugs.python.org/file37954/doc_c-api_buffer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Removed file: http://bugs.python.org/file37952/doc_c-api_buffer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Added file: http://bugs.python.org/file37953/doc_c-api_buffer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: Removed file: http://bugs.python.org/file37953/doc_c-api_buffer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Richard Hansen added the comment: When I compile and run the above (latest Cython from Git master), I get: () () With Cython version 0.20.1post0 I get: foo.foo() (-1,) (-1,) If you get the correct output from the latest Cython, it looks like this issue has been fixed

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Richard Hansen added the comment: How might an application break with this change? assert(view-suboffsets == NULL); Fair point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Richard Hansen added the comment: This leaves me +-0 for the change, with the caveat that applications might break. How might an application break with this change? Compared to the current PyBuffer_IsContiguous(), the patched version is the same except it returns true for a wider range

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Richard Hansen added the comment: My preference is to apply the patch, of course. There is a legitimate concern that it will break existing code, but I think there are more points in favor of applying the patch: * there exists code that the current behavior is known to break * it's easier

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Richard Hansen
Richard Hansen added the comment: (The following message is mostly off-topic but I think it is relevant to those interested in this issue. This message is about the clarity of the documentation regarding flag semantics, and what I think the flags should mean.) Cython doesn't follow the spec

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-31 Thread Richard Hansen
Richard Hansen added the comment: Attached is a documentation patch that adds what I said in msg235141. I doubt everyone will agree with the changes, but maybe it will be a useful starting point. (Despite not having an asterisk next to my username, I have signed the contributor agreement

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-30 Thread Richard Hansen
Richard Hansen added the comment: People might rely on the fact that contiguous implies suboffsets==NULL. Cython (currently) relies on all-negatives being acceptable and equivalent to suboffsets==NULL. See: https://github.com/cython/cython/pull/367 http://thread.gmane.org

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-29 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352 ___ ___ Python-bugs-list

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-29 Thread Richard Hansen
Richard Hansen added the comment: The patch has an obvious syntax error :-) Doh! Other than that, adding a comment would be nice. Agreed, will do. Bonus points if you can write a test (3.x has infrastructure for that, see Lib/test/test_buffer.py). I'll take a look. Thanks

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-29 Thread Richard Hansen
New submission from Richard Hansen: According to https://docs.python.org/2/c-api/buffer.html#the-new-style-py-buffer-struct if the suboffsets member of Py_buffer is non-NULL and all members of the array are negative, the buffer may be contiguous. PyBuffer_IsContiguous() does not behave

[issue23349] memoryview.to_bytes() and PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers

2015-01-29 Thread Richard Hansen
New submission from Richard Hansen: PyBuffer_ToContiguous() has an off-by-one error when copying a buffer it thinks is non-contiguous. To reproduce, put the following in foo.pyx and compile with Cython v0.21.2: cpdef foo(): cdef unsigned char[:] v = bytearray(testing

[issue23349] PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers

2015-01-29 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: -- title: memoryview.to_bytes() and PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers - PyBuffer_ToContiguous() off-by-one error for non-contiguous buffers ___ Python tracker rep

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-29 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: -- versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-29 Thread Richard Hansen
Changes by Richard Hansen rhan...@bbn.com: -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23352 ___ ___ Python

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-01-29 Thread Richard Hansen
Richard Hansen added the comment: I've attached a new version of the patch. Suggestions for simplifying the test code would be appreciated. -- Added file: http://bugs.python.org/file37916/PyBuffer_IsContiguous_v2.patch ___ Python tracker rep

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-26 Thread Martin Richard
Changes by Martin Richard mart...@martiusweb.net: -- nosy: +martius ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17911 ___ ___ Python-bugs-list

[issue23209] asyncio: break some cycles

2015-01-12 Thread Martin Richard
Martin Richard added the comment: I updated the selector patch so BaseSelector.get_key() raises KeyError if the mapping is None. All the (non skipped) tests in test_selectors.py passed. Anyway, if there is an other problem with freeing the mapping object (I don't know, maybe reopening a loop

[issue23209] asyncio: break some cycles

2015-01-09 Thread Martin Richard
New submission from Martin Richard: Hi, I would like to submit 3 trivial modifications which break a cycle each. It is not much, but those three cycles caused a lot of objects to be garbage collected. They can now be freed using the reference counting mechanism, and therefore, reduce

[issue23209] asyncio: break some cycles

2015-01-09 Thread Martin Richard
Changes by Martin Richard mart...@martiusweb.net: -- components: +asyncio nosy: +gvanrossum, haypo, yselivanov type: - performance versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23209

[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-12-08 Thread Martin Richard
Martin Richard added the comment: Currently, this is what I do in the child after the fork: selector = loop._selector parent_class = selector.__class__.__bases__[0] selector.unregister = lambda fd: parent_class.unregister(selector, fd) It replaces unregister

[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-12-01 Thread Martin Richard
Martin Richard added the comment: Guido, Currently in my program, I manually remove and then re-adds the reader to the loop in the parent process right after the fork(). I also considered a dirty monkey-patching of remove_reader() and remove_writer() which would act as the original versions

[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-12-01 Thread Martin Richard
Martin Richard added the comment: I said something wrong in my previous comment: removing and re-adding the reader callback right after the fork() is obviously subject to a race condition. I'll go for the monkey patching. -- ___ Python tracker rep

[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-11-28 Thread Martin Richard
Martin Richard added the comment: Hi, Actually, closing and creating a new loop in the child doesn't work either, at least on Linux. When, in the child, we call loop.close(), it performs: self.remove_reader(self._ssock) (in selector_events.py, _close_self_pipe() around line 85) Both

[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)

2014-10-15 Thread Martin Richard
Changes by Martin Richard mart...@martiusweb.net: -- nosy: +martius ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22638 ___ ___ Python-bugs-list

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-12 Thread Martin Richard
Martin Richard added the comment: Here is an other patch which mentions high and low water limits. I think it's better to talk about it, since it tells extactly what a full buffer and partially drained means. On the other hand, StreamWriter wraps the transport but does not expose the set

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-06 Thread Martin Richard
New submission from Martin Richard: Hi, Following the discussion on the python-tulip group, I'd like to propose a patch for the documentation of StreamWriter.drain(). This patch aims to give a better description of what drain() is intended to do, and when to use it. In particular

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-06 Thread Martin Richard
Changes by Martin Richard mart...@martiusweb.net: -- hgrepos: -273 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22348 ___ ___ Python-bugs-list

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: I can't remember why I did not use fstat() -- probably it did not occur to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18174

<    1   2   3   4   5   6   7   8   9   10   >