[issue30593] sqlite3 executescript does not respect isolation_level?

2017-06-13 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-06-28 Thread Aviv Palivoda
Aviv Palivoda added the comment: Pinging. As I mentioned in the PR I need a little help with __contains__. -- ___ Python tracker <http://bugs.python.org/issue24

[issue26187] sqlite3 trace callback prints duplicate line

2017-03-04 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +384 ___ Python tracker <http://bugs.python.org/issue26187> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
New submission from Aviv Palivoda: I would like to suggest that the struct.Struct class will support addition. For example you will be able to do: >>> s1 = Struct(">L") >>> s2 = Struct(">B") >>> s3 = s1 + s2 >>> s3.format b"&

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +723 ___ Python tracker <http://bugs.python.org/issue29903> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29903] struct.Struct Addition

2017-03-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: I have two use cases for this feature: 1. struct a { int a; #ifdef VER2 unsigned int b; #endif } Now I may do: >>> ver1 = Struct("i") >>> ver2 = ver1 + Struct("I") 2. struct a { int a; union inner {

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-30 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue29725> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Hi Cheryl, the arraysize value can be set by doing: >>> cursor.array = 5 For example I can do the following >>> import sqlite3 >>> s = sqlite3.connect(":memory:") >>> s.execute("create table a(a,b)") >&g

[issue24139] Use sqlite3 extended error codes

2017-04-13 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +1249 ___ Python tracker <http://bugs.python.org/issue24139> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16379] SQLite error code not exposed to python

2017-04-13 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +1248 ___ Python tracker <http://bugs.python.org/issue16379> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-04-15 Thread Aviv Palivoda
Aviv Palivoda added the comment: In my patch I use sqlite3_create_function_v2 which was added in sqlite 3.7.3 (2010-10-08). There were a few problems after adding sqlite3_stmt_readonly in 284676cf2ac8 as can be seen in issue #29355. sqlite3_stmt_readonly was added in 3.7.4 (2010-12-07) so I

[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread Aviv Palivoda
Aviv Palivoda added the comment: > It's even more strange. The test started to fail since this build, Sun Apr 9 > 10:10:15 2017: This was merged on Apr 9 (commit 0e6cb2ea624570ed08c354f1ed1f595dab4192d6). >From a quick look in the internet some other people had a similar

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-03 Thread Aviv Palivoda
New submission from Aviv Palivoda: Both the Cache and Statement objects are internally used and should not be exposed to the user from the sqlite3 module. They are not mentioned in the documentation as well. -- components: Extension Modules messages: 292936 nosy: berker.peksag

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-03 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +1538 ___ Python tracker <http://bugs.python.org/issue30262> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30270] Remove sqlite3.Cache display method

2017-05-04 Thread Aviv Palivoda
New submission from Aviv Palivoda: The display method is there for debugging and should not be in the released code. -- components: Extension Modules messages: 293005 nosy: berker.peksag, ghaering, palaviv priority: normal severity: normal status: open title: Remove sqlite3.Cache

[issue30270] Remove sqlite3.Cache display method

2017-05-04 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +1559 ___ Python tracker <http://bugs.python.org/issue30270> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30271] Make sqlite3 statement cache optional

2017-05-04 Thread Aviv Palivoda
New submission from Aviv Palivoda: Currently the minimum size of the statement cache is 10. I suggest that it will be any value above 1 or no cache at all if the size is set to 0. -- components: Extension Modules messages: 293006 nosy: berker.peksag, ghaering, palaviv priority: normal

[issue30271] Make sqlite3 statement cache optional

2017-05-04 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +1560 ___ Python tracker <http://bugs.python.org/issue30271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30270] Remove sqlite3.Cache display method

2017-05-05 Thread Aviv Palivoda
Aviv Palivoda added the comment: >From looking at the git blame this is there since 2006. Maybe this should be >dependent on issue #30262. Maybe at first there should be a deprecation >warning and then removing this later. I understand that this might break someone's code

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-06 Thread Aviv Palivoda
Aviv Palivoda added the comment: I have 3 argument for the motivation for this change: 1. Cleaner API - Both objects are internal implementation details. I think that we can look on exposing them as a bug. 2. Easier development - When you remove these objects from the API you can change them

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-08 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am not sure how to raise the deprecation waning in this case. We use both the Cache and Statement objects as part of the sqlite3 module internal flow. How can I only warn the user when he creates this classes directly and not when the sqlite3 module uses

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-13 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +1668 ___ Python tracker <http://bugs.python.org/issue30262> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-13 Thread Aviv Palivoda
Aviv Palivoda added the comment: I opened a separate PR for the deprecation of the Cache and Statement. > I would think you could replace those entries with calls to wrapper functions > that issue the deprecation and then call the real function. I made wrapper deprecation classes that

[issue30271] Make sqlite3 statement cache optional

2019-05-09 Thread Aviv Palivoda
Aviv Palivoda added the comment: I think we can close this issue and open a different one that will disable the cache implicitly on `set_authorizer()`. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Aviv Palivoda
Change by Aviv Palivoda : -- pull_requests: +5892 ___ Python tracker <https://bugs.python.org/issue27645> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Aviv Palivoda
Aviv Palivoda added the comment: The problem is that change https://www.sqlite.org/src/info/169b5505498c0a7e was part of sqlite version 3.8.8 I opened a PR with a fix. -- ___ Python tracker <https://bugs.python.org/issue27

[issue24905] Allow incremental I/O to blobs in sqlite3

2018-04-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: As I wrote in the PR: I think that the contains operation should not be supported for blobs. As blobs can be very large, looking for a subset of bytes inside them will be a very inefficient process in memory or in compute. I believe that this is a very good

[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2018-05-18 Thread Aviv Palivoda
Change by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <https://bugs.python.org/issue33376> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30271] Make sqlite3 statement cache optional

2018-08-11 Thread Aviv Palivoda
Aviv Palivoda added the comment: I don't have any specific use case for making the statement cache optional. I expected that by changing the cache size to 0 there will be no statement cache. I think that this is a common assumption as can be seen in https://github.com/ghaering/pys

[issue28518] execute("begin immediate") throwing OperationalError

2016-11-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: I searched in the sqlite tickets from something related to this issue and I couldn't find anything. I wanted to check the sqlite-users mailing list to see if anyone had already reported it but there is a problem in gmane archives. I tried to find a good w

[issue28518] execute("begin immediate") throwing OperationalError

2016-11-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: There are already a few test's that start a transaction explicitly: In dbapi.SqliteOnConflictTests CheckOnConflictRollbackWithExplicitTransaction, CheckOnConflictAbortRaisesWithExplicitTransactions which set ``isolation_level = None``. On the other ha

[issue8145] Documentation about sqlite3 isolation_level

2016-11-26 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue8145> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2016-12-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: Pinging as mentioned in the devguide. -- ___ Python tracker <http://bugs.python.org/issue14156> ___ ___ Python-bugs-list mailin

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2016-12-14 Thread Aviv Palivoda
Aviv Palivoda added the comment: Hi paul thanks for looking into this. First are you sure this is a bug in python 2? If so I will happily port this patch once it is reviewed. As for use cases you may look at issue #26488. Although the patch was rejected you can see that I first used

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2016-12-14 Thread Aviv Palivoda
Aviv Palivoda added the comment: As we talk here about stdin and stdout which we don't want to close I think this issue is irrelevant to python2. In any case the patch in issue #13824 cover that problem. I actually write a lot of small scripts and if I need to open the file in binary m

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-15 Thread Aviv Palivoda
Aviv Palivoda added the comment: I think that adding Serhiy patch in addition to the documentation improvement in issue #8145 would be the best way to proceed. This will insure no regression problems. We can add a warning when someone try to use BEGIN, ROLLBACK, SAVEPOINT, and RELEASE without

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-29 Thread Aviv Palivoda
Aviv Palivoda added the comment: Issue #29003 seems to be related to this one. I think that they can be solved the same way as done in Serhiy patch but I would like to suggest a different approach. I suggest changing the check for DDL statement with a check for DML statement. We actually

[issue29121] sqlite3 Controlling Transactions documentation not updated

2016-12-31 Thread Aviv Palivoda
New submission from Aviv Palivoda: commit 284676cf2ac8 changed the sqlite3 module so it will no longer implicitly commit an open transaction before DDL statements. The docs have been updated but there is still an incorrect paragraph that has not been removed. Attached is a patch that remove

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Adding the vacuum test can't actually happen because the change in commit 284676cf2ac8 changed the API and we don't commit before non DML statements. I opened a issue that will clarify the do

[issue28518] execute("begin immediate") throwing OperationalError

2017-01-03 Thread Aviv Palivoda
Aviv Palivoda added the comment: Yes. If a transaction is open you will need to explicitly commit before doing vacuum. I am not sure if that was intentional or not. From quick look in the sqlite source code there are few things that cannot happen from a transaction: 1. VACUUM 2. ATTACH 3

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-04 Thread Aviv Palivoda
Aviv Palivoda added the comment: The problem is in _pysqlite_build_py_params function at connection.c. In case we have text we do the following code: case SQLITE_TEXT: val_str = (const char*)sqlite3_value_text(cur_value); cur_py_value = PyUnicode_FromString(val_str); /* TODO

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-05 Thread Aviv Palivoda
Aviv Palivoda added the comment: I actually was wrong and there is no problem with the type that is returned from the text_factory as it passes directly as argument for the create_function function. Attached is a patch that change create_function and create_aggregate to use the text_factory

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-05 Thread Aviv Palivoda
Aviv Palivoda added the comment: Actually had a small mistake in the patch I uploaded. Uploading a fixed one. -- Added file: http://bugs.python.org/file46166/29021-fixed.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2017-01-07 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue29006> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-07 Thread Aviv Palivoda
Aviv Palivoda added the comment: After looking more into the _pysqlite_set_result function fail in Ingo example I think this is the expected behavior. The PyUnicode_AsUTF8 fails but this is expected as the value is an invalid UTF-8. -- ___ Python

[issue28518] execute("begin immediate") throwing OperationalError

2017-01-20 Thread Aviv Palivoda
Aviv Palivoda added the comment: Uploading a new patch with fixes from Ma Lin comments. Two points: 1. Should we add the VACUUM with a explicit commit? Maybe there should be an implicit commit before VACUUM? 2. Should a SELECT start a transaction? I think it should according to PEP 249. There

[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2017-01-20 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue9924> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28518] execute("begin immediate") throwing OperationalError

2017-01-23 Thread Aviv Palivoda
Aviv Palivoda added the comment: Removed opening a transaction on select. I will argue for that in issue 9924 after this is resolved. -- Added file: http://bugs.python.org/file46397/sqlite-ddl-dml-3.patch ___ Python tracker <http://bugs.python.

[issue29228] sqlite3 OperationalError on changing into WAL transaction mode

2017-01-23 Thread Aviv Palivoda
Aviv Palivoda added the comment: There is also a issue with the docs here. Look at issue 29121. -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue29

[issue29121] sqlite3 Controlling Transactions documentation not updated

2017-01-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: I would just like to note that I think that the correct solution is to do an implicit commit before: 1. VACUUM 2. ATTACH 3. DETACH 4. BEGIN -- ___ Python tracker <http://bugs.python.org/issue29

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-04 Thread Aviv Palivoda
Aviv Palivoda added the comment: Pinging again. I think this would be a great enhancement to the sqlite module. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-05 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the CR Serhiy. Attached is a new patch after the fixes from the CR. What other developers should I ask? The interface is file like and is the same as apsw. -- Added file: http://bugs.python.org/file46531/blob3.patch

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-06 Thread Aviv Palivoda
Aviv Palivoda added the comment: Uploading patch after fixes from berker CR. The `blob_open` API can can have the following options: 1. The table, column and row must be mandatory parameters. 2. The read/write permissions can have the following options: a. No default (mandatory parameter

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +244 ___ Python tracker <http://bugs.python.org/issue24905> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: I opened a PR in github. I tagged some other developers if that will not start a discussion on the API I will post in the python-ideas. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am not a DB expert but from a quick search I couldn't find a similar API. I did find a few API's in other programming languages to sqlite blob: 1. https://jgallagher.github.io/rusqlite/rusqlite/blob/index.html 2. https://godoc.org/github.com/mxk

[issue27645] Supporting native backup facility of SQLite

2017-02-28 Thread Aviv Palivoda
Aviv Palivoda added the comment: I actually looked at the patch and have a few comments: 1. You need to put Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS before the sqlite3 calls (especially the sleep). 2. I think that the `pysqlite_connection_backup` function will look a lot better if you

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-02-28 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +306 ___ Python tracker <http://bugs.python.org/issue9303> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24905] Allow incremental I/O to blobs in sqlite3

2017-02-28 Thread Aviv Palivoda
Aviv Palivoda added the comment: Just to make sure when you say "sequence protocol" you thin about the doing blob[4:6] = "ab"? I actually think this is a nice feature. The Blob and the mmap object has a lot in common so I think that making the same API will be best. I th

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-02-28 Thread Aviv Palivoda
Aviv Palivoda added the comment: I opened a PR. This actually is a bugfix in addition to an enhancement as it solves issue 26187 as well. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-03-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: from https://www.sqlite.org/changes.html: sqlite3_open_v2 - 2007-09-04 (3.5.0) alpha sqlite3_prepare_v2 - 2007-01-04 (3.3.9) sqlite3_close_v2 - 2012-09-03 (3.7.14) In issue 29355 Ma Lin says that RHEL6 comes with SQLite 3.6.x. I think that removing that

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2017-03-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: I changed the patch to use SQLITE_VERSION_NUMBER and it looks way better. Thanks Serhiy -- ___ Python tracker <http://bugs.python.org/issue9

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-08-16 Thread Aviv Palivoda
Aviv Palivoda added the comment: Pinging as mentioned in the devguide. -- ___ Python tracker <http://bugs.python.org/issue24905> ___ ___ Python-bugs-list mailin

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-08-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the review Serhiy. Attached is the updated patch after the changes. -- Added file: http://bugs.python.org/file44142/blob2.patch ___ Python tracker <http://bugs.python.org/issue24

[issue26488] hashlib command line interface

2016-08-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: Hi, is there anything more I need to do on this patch? If not do you think this can be added in 3.6? -- ___ Python tracker <http://bugs.python.org/issue26

[issue26488] hashlib command line interface

2016-08-18 Thread Aviv Palivoda
Aviv Palivoda added the comment: The use case that made me think about this feature was when I was working on a Windows PC and needed to calculate an md5 of a file. I agree that in a unix environment there are existing tools but on windows you usually don't have

[issue16379] SQLite error code not exposed to python

2016-08-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: Attached is a patch based on Daniel last patch with the following changes: * There is no errorcode mapping. * The exception object has a error_name attribute. I think this two changes should solve the API problems raised by Ezio and Gerhard about the error

[issue24139] Use sqlite3 extended error codes

2016-08-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: Attached is a patch to enable the extended error codes. This patch should be dependent on issue 16379. Without returning the sqlite error code in the exception the extended error code does not reveal any information not currently available. As you can see in

[issue26061] logging LogRecordFactory allow kwargs

2016-01-09 Thread Aviv Palivoda
New submission from Aviv Palivoda: The logging LogRecord factory receives kwargs. However because _log and makeRecord functions in the Logger class don't support kwargs we can't actually pass additional positional arguments to LogRecord. A use case for this is attached. I had made

[issue26061] logging LogRecordFactory allow kwargs

2016-01-09 Thread Aviv Palivoda
Aviv Palivoda added the comment: adding the patch :) -- keywords: +patch Added file: http://bugs.python.org/file41554/LogRecordFactoryKwargs.patch ___ Python tracker <http://bugs.python.org/issue26

[issue26187] sqlite3 trace callback prints duplicate line

2016-01-23 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am running the following script: -- >>> import sqlite3 >>> import os >>> import time >>> con1 = sqlite3.connect("/tmp/test.db") >>> con2 = sqlite3.connect(&qu

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-01-26 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker <http://bugs.python.org/issue24905> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26243] zlib.compress level as keyword argument

2016-01-30 Thread Aviv Palivoda
New submission from Aviv Palivoda: Currently zlib.compress allow only positional arguments. For code readability reasons i think that we should allow the level argument to be keyword argument. Now when someone uses zlib.compress he will be able to do zlib.compess(some_data, level=7) instead

[issue26244] zlib.compressobj level default value documentation

2016-01-30 Thread Aviv Palivoda
New submission from Aviv Palivoda: In the zlib.compressobj documentation the default value of the compress level is -1 while it is actually 6. patch is included -- assignee: docs@python components: Documentation, Extension Modules files: zlib-compressobj-level-doc.patch keywords

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-01-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: I opened a pull request for blob support in the pysqlite github repository: https://github.com/ghaering/pysqlite/pull/93 I will do the needed changes for python3 and will post a patch soon. -- ___ Python tracker

[issue26244] zlib.compressobj level default value documentation

2016-01-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: I think that we can leave the level=-1 as the default in the documentation. What should be added is what Z_DEFAULT_COMPRESSION means. I tried to be as close as possible to the zlib module documentation. -- Added file: http://bugs.python.org/file41766

[issue26243] zlib.compress level as keyword argument

2016-02-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the review. 1. Changed "bytes" to "data". 2. Updated Doc as in issue 26244 (will update the patch if there will be changes there). 3. Added version changed notice but i don't think there is a need for What's new update

[issue26243] zlib.compress level as keyword argument

2016-02-03 Thread Aviv Palivoda
Aviv Palivoda added the comment: Added the "suggested" test -- Added file: http://bugs.python.org/file41797/zlib-compress-level-keyword3.patch ___ Python tracker <http://bugs.python.o

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-02-03 Thread Aviv Palivoda
Aviv Palivoda added the comment: I did the needed changes for the pull request at pysqlite for porting to python3. I will continue updating the patch if there will be changes in pysqlite and vice versa. -- keywords: +patch Added file: http://bugs.python.org/file41798/blob.patch

[issue26250] no document for sqlite3.Cursor.connection

2016-02-06 Thread Aviv Palivoda
Aviv Palivoda added the comment: Added patch with my suggestion for sqlite3.Cursor.connection attribute documentation -- assignee: -> docs@python components: +Documentation, Extension Modules -Library (Lib) keywords: +patch nosy: +docs@python, ghaering, palaviv versions: +Python

[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-08 Thread Aviv Palivoda
New submission from Aviv Palivoda: When socketserver.BaseServer.verify_request() return False then we do not call shutdown_request. If we will take the TCPServer as example we will call get_request thus calling socket.accept() and creating a new socket but we will not call shutdown_request to

[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-08 Thread Aviv Palivoda
Aviv Palivoda added the comment: Had a small mistake in the previous patch (did not notice process_request) call shutdown_request. fixed the patch -- Added file: http://bugs.python.org/file41856/socketserver-shutdown-if-verify-false2.patch

[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-09 Thread Aviv Palivoda
Aviv Palivoda added the comment: I added a test to check the specific bug. There seems to be no testing at all on the verify_request feature so I will create some in different issue in the future. -- Added file: http://bugs.python.org/file41874/socketserver-shutdown-if-verify-false3

[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-15 Thread Aviv Palivoda
Aviv Palivoda added the comment: I changed the test to just check that shutdown_request is called. Hope this is more clear then the previous test. -- Added file: http://bugs.python.org/file41930/socketserver-shutdown-if-verify-false4.patch

[issue26392] socketserver.BaseServer.close_server should stop serve_forever

2016-02-19 Thread Aviv Palivoda
New submission from Aviv Palivoda: Currently if you call server_close you only close the socket. If we called serve_forever and then call server_close without calling shutdown the serve_forever loop keep running. Before using the selectors module for doing the poll we would have had

[issue26393] random.shuffled

2016-02-19 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am suggesting adding random.shuffled to the random module. This is very similar to the shuffle function just return a new shuffled list instead of in place shuffle. This is very similar to the sorted and list.sort. As you can see in the patch the shuffled

[issue26392] socketserver.BaseServer.close_server should stop serve_forever

2016-02-20 Thread Aviv Palivoda
Aviv Palivoda added the comment: I see your point about the server_close purpose and I changed the patch to simulate the behavior of closed file (raising ValueError when operating on closed file). I don't think that this should be an enhancement as what i try to do is return the behavi

[issue26404] socketserver context manager

2016-02-21 Thread Aviv Palivoda
New submission from Aviv Palivoda: As Martin commented on my patch at issue 26392 the socketserver.server_close is like the file close. That made me think that we should add a context manager to the socketserver. -- components: Library (Lib) files: socketserver_context_manager.patch

[issue26404] socketserver context manager

2016-02-22 Thread Aviv Palivoda
Aviv Palivoda added the comment: Only closing the server :). 1. Did the changes requested in the CR. 2. Changed the example's in xmlrpc.server, http.server to use context manager. 3. Changed the xmlrpc.server, http.server server implementation when running python -m {xmlrpc.server, http.s

[issue26392] socketserver.BaseServer.close_server should stop serve_forever

2016-02-23 Thread Aviv Palivoda
Aviv Palivoda added the comment: I understand the problem and why this patch should be rejected. -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue26404] socketserver context manager

2016-02-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: Updated the patch: 1. Did the changes requested in the CR. 2. Changed the example's in wsgiref.simple_server to use context manager. 3. Added What's New entry. -- Added file: http://bugs.python.org/file42016/socketserver_context_mana

[issue26404] socketserver context manager

2016-02-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: updated the patch according to the CR comments. -- Added file: http://bugs.python.org/file42030/socketserver_context_manager4.patch ___ Python tracker <http://bugs.python.org/issue26

[issue26404] socketserver context manager

2016-02-29 Thread Aviv Palivoda
Aviv Palivoda added the comment: The examples did not close the server but I am not sure if that was a mistake. The server is not being closed only on examples where it is expected to run until there is a keyboard interrupt. However you can see that when you send keyboard interrupt to a

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2016-03-05 Thread Aviv Palivoda
Aviv Palivoda added the comment: I fixed the tests to work with Steven patch. Also changed the patch to open sys.std{in,out} with closefd=False. I changed the 'io.StringIO' that we redirect the stdout, stderr to. Now the 'StdIOBuffer' return the real stdout,stderr w

[issue26488] hashlib command line interface

2016-03-05 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am suggesting to add a command line interface to the hashlib module. A simple example of the api I suggest is: $ python -m hashlib md5 /bin/sh $ d985d0ea551c1253c2305140c583d11f A patch is included. -- components: Library (Lib) files: hashlib

[issue25951] SSLSocket.sendall() does not return None on success like socket.sendall()

2016-03-24 Thread Aviv Palivoda
Aviv Palivoda added the comment: Changed SSLSocket.sendall() to return None. Also added a check of the return value of the SSLSocket.send(), SSLSocket.sendall() in the tests. -- keywords: +patch nosy: +palaviv Added file: http://bugs.python.org/file42278/25951.patch

[issue25951] SSLSocket.sendall() does not return None on success like socket.sendall()

2016-03-25 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the review. I don't have any use cases for this change. I just saw this issue while looking for something else and thought I will give it a try. -- Added file: http://bugs.python.org/file42285/25951-2.

[issue26488] hashlib command line interface

2016-03-28 Thread Aviv Palivoda
Aviv Palivoda added the comment: I actually have noticed issue 13824 while working on this issue. The patch I uploaded to Issue 14156 actually fixes the problem in issue 13824 in addition to the problem with the stdin/stdout. I think we should add a dependency in issue 14156 for this issue

[issue26488] hashlib command line interface

2016-03-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: Sorry on the late response for some reason i don't receive email notification from the tracker for the past few days. 1) Thanks for the review SilentGhost the patch attached include your CR suggestions. 2) Raymond I have fixed the problem with ctrl+D. I

[issue26488] hashlib command line interface

2016-03-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am adding a new patch with a API compatible to GNU md5sum: $ python -m hashlib md5 /bin/sh $ d985d0ea551c1253c2305140c583d11f /bin/sh I will soon add the feature's requested by Victor: 1) The check option. 2) Running the hash calculation for diff

  1   2   >