[issue26488] hashlib command line interface

2016-03-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the review SilentGhost. I am including the patch after the changes from your CR comments. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26488] hashlib command line interface

2016-03-31 Thread Aviv Palivoda
Changes by Aviv Palivoda : Added file: http://bugs.python.org/file42337/hashlib-script-mod-md5sum-style-2.patch ___ Python tracker <http://bugs.python.org/issue26

[issue26488] hashlib command line interface

2016-04-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am adding a new patch with changes from Martin CR (Thanks for the review) and support in the "check" option. I also changed to examples in the Documentation to use sha256 instead of md5 as Christian asked. I left one example with sha1 so when someo

[issue17436] hashlib: add a method to hash the content of a file

2016-04-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: While working on issue 26488 I found a real need for this feature. I added a new method to the hash object named fromfile(). The function update the hash object with the content of the file like object it receives. I only added the feature to hash algorithm

[issue26488] hashlib command line interface

2016-04-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: Publishing another patch after SilentGhost and Victor CR. I also changed the block size to 256 KB. If someone can remove the dependency on issue 14156 (I don't think I have permissions). -- Added file: http://bugs.python.org/file42347/hashlib-s

[issue26488] hashlib command line interface

2016-04-02 Thread Aviv Palivoda
Aviv Palivoda added the comment: Adding new patch after CR changes. -- Added file: http://bugs.python.org/file42355/hashlib-script-mod-md5sum-style-5.patch ___ Python tracker <http://bugs.python.org/issue26

[issue17436] hashlib: add a method to hash the content of a file

2016-04-02 Thread Aviv Palivoda
Aviv Palivoda added the comment: > * hashobj.readfile(filename: str) > * hashobj.readfileobj(file) where file is an object with a read() method > which returns bytes strings I changed the API to the one Victor suggested. > For readfile() it might make more sense to implement it d

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-06 Thread Aviv Palivoda
New submission from Aviv Palivoda: Currently all the stdlib logging handlers (except BufferingHandler) emit method have the following structure: def emit(self, record): try: // do the emit except Exception: self.handleError(record) I suggest changing

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: I see the backwards compatibility issue. I have two suggestion's how to improve the code without breaking backwards compatibility: 1. Add a new Handler class named SafeHandler that will implement handle in the way suggested in the previous patch. Al

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-10 Thread Aviv Palivoda
Changes by Aviv Palivoda : Added file: http://bugs.python.org/file42426/logging-handleException.patch ___ Python tracker <http://bugs.python.org/issue26705> ___ ___ Pytho

[issue14265] Fully qualified test name in failure output

2016-04-11 Thread Aviv Palivoda
Aviv Palivoda added the comment: Included is a patch with the suggested change. I changed the TestCase.__str__ method to: return "%s (%s.%s)" % (self._testMethodName, strclass(self.__class__), self._testMethodName) instead of return "%s (%s)" % (self._testMetho

[issue26781] os.walk max_depth

2016-04-16 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am suggesting to add max_depth argument to os.walk. I think this is very useful for two cases. The trivial one is when someone wants to walk on a directory tree up to specific depth. The second one is when you follow symlinks and wish to avoid infinite

[issue26783] test_os.WalkTests.test_walk_topdown don't test fwalk and Bytes

2016-04-16 Thread Aviv Palivoda
New submission from Aviv Palivoda: test_walk_topdown call os.walk directly instead of using self.walk. This test currently run 3 time's while checking the same thing. The test should use self.walk to check fwalk and Bytes as well. -- components: Tests files: os-test-walk-topdow

[issue26781] os.walk max_depth

2016-04-16 Thread Aviv Palivoda
Changes by Aviv Palivoda : Added file: http://bugs.python.org/file42494/os-walk-max-depth-2.patch ___ Python tracker <http://bugs.python.org/issue26781> ___ ___ Python-bug

[issue26781] os.walk max_depth

2016-04-20 Thread Aviv Palivoda
Aviv Palivoda added the comment: I am not sure about the wide use of this feature but I do think this is a nice feature to add to os.walk. I can see how you can implement is_too_deep by counting the number of separators in the path. However I don't think it is trivial to do that. In add

[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple

2016-04-26 Thread Aviv Palivoda
New submission from Aviv Palivoda: I am suggesting that os.walk and os.fwalk will yield a namedtuple instead of the regular tuple they currently yield. The use case for this change can be seen in the next example: def walk_wrapper(walk_it): for dir_entry in walk_it: if dir_entry[0

[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple

2016-04-29 Thread Aviv Palivoda
Aviv Palivoda added the comment: In regard to Raymond`s points I agree with Serhiy`s comments. As for Serhiy`s doubts: > 3. Using namedtuple is slower and consumes more memory than using tuple. Even > for FS-related operation like os.walk() this can matter. A lot of code is > opti

[issue26860] os.walk and os.fwalk yield namedtuple instead of tuple

2016-04-29 Thread Aviv Palivoda
Aviv Palivoda added the comment: Thanks for the response Ethan I think that I will leave the tests as they are in the current patch. > No doubt, there are exceptions to the rule in the standard library which is > less consistent than we might like: "stat_result". That s

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

2016-04-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: I made a new patch to fix this issue. I left a fallback to the old API as Jim suggested. In addition to the changes in Robin`s patch I changed sqlite3_close to sqlite3_close_v2 if available. This solves issue 26187 as well. -- nosy: +palaviv Added

[issue26187] sqlite3 trace callback prints duplicate line

2016-04-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: This issue will be resolved when we change the sqlite3_prepare to sqlite3_prepare_v2. So there should be a dependency on issue 9303. -- ___ Python tracker <http://bugs.python.org/issue26

[issue24887] Sqlite3 has no option to provide open flags

2016-04-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: IMO this issue can be closed as the URI filename interface can be used instead of the flags. The URI interface parameters can override the flags given as specified in: https://www.sqlite.org/c3ref/open.html -- nosy: +palaviv

[issue16379] SQLite error code not exposed to python

2016-08-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Attached is a new patch with the encoding problem fixed. -- Added file: http://bugs.python.org/file44306/16379-2.patch ___ Python tracker <http://bugs.python.org/issue16

[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: > Are the changes in the other ticket needed to implement new tests? > Or is it possible to include tests here? It is not possible to add any tests to this issue before exposing the error code. I will implement new tests when issue 16379 will be re

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Xiang what do you think about changing the isolation_levels list to begin_statements list: static const char * const begin_statements[] = {"BEGIN", "BEGIN DEFERRED", "BEGIN IMMEDIATE", "BEGIN EXCLUSIVE", NULL}; This

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-09-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: What do you think about removing the isolation_level member from the pysqlite_Connection. It is only there to be for the pysqlite_connection_get_isolation_level and that could be easily calculated from the begin_statement. -- Added file: http

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-09-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: The only change I see that can happen is that we return upper case isolation level when the user used a lower case. I think that it is worth to slow down the getter for the code simplification. -- ___ Python tracker

[issue16379] SQLite error code not exposed to python

2016-09-01 Thread Aviv Palivoda
Changes by Aviv Palivoda : Added file: http://bugs.python.org/file44331/16379-3.patch ___ Python tracker <http://bugs.python.org/issue16379> ___ ___ Python-bugs-list m

[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used

2016-10-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: Attached is patch with a fix for this issue. This is not as comprehensive as the solution in apsw but I think this should cover most of the cases. The result for Ronny dump after this fix is: BEGIN TRANSACTION; PRAGMA writable_schema=ON; INSERT INTO

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

2016-10-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: I looked into this error and I think the problem is the sqlite3_stmt_readonly check in _pysqlite_query_execute (cursor.c line 517): if (self->connection->begin_statement && !sqlite3_stmt_readonly(self->statement->st) &&a

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

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

<    1   2