[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Chris Angelico
Chris Angelico added the comment: Another good option is read/write without the 'fd' suffix. Either works, I'd prefer the shorter one but by a small margin. -- nosy: +Rosuav ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536

[issue24534] disable executing code in .pth files

2015-06-30 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24534 ___ ___

[issue24534] disable executing code in .pth files

2015-06-30 Thread Nick Coghlan
Nick Coghlan added the comment: As others have noted, we're not going to change this default in the standard CPython executable (due to the degree of disruption involved), and the -S and -I switches already effectively turn it off (by disabling site module processing entirely) However, it

Scapy and MGCP

2015-06-30 Thread Devaki Chokshi (dchokshi)
Hello, As per reply received I have begun to use scapy for MGCP. I started off with reading a .pcap file with MGCP packets. For example: from scapy.all import * from scapy.utils import * from scapy.layers.mgcp import * mgcp_pkts = rdpcap(my-mgcp-capture.pcap) However, rdpcap() is

Segmentation Fault with multiple interpreters

2015-06-30 Thread Florian Rüchel
Hey there, I'm not sure this is the correct list considering the level of internal Python knowledge it likely requires. If I should take this to another list, please let me know. I have written an application that links against libpython and starts multiple interpreters within one thread. Beyond

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Jonathan Slenders
New submission from Jonathan Slenders: As discussed on python-ideas, os.pipe should return a structsequence instead of a plain tuple. To be decided is the naming for the read and write end. Personally, I'm in favour of using readfd/writefd. our_pipe = pipe() os.write(our_pipe.writefd,

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 02:09:17 UTC+2 skrev Ben Bacarisse: Ian Kelly ian.g.ke...@gmail.com writes: On Mon, Jun 29, 2015 at 4:56 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jun 29, 2015 at 4:39 PM, jonas.thornv...@gmail.com wrote: http://jt.node365.se/baseconversion8.html

Re: Linear time baseconversion

2015-06-30 Thread Christian Gollwitzer
Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on very big numbers if base outside integer scope. I am very keen on suggestions regarding the logic to make it faster. Concerning the algorithmic complexity, it can't be faster than square time in the number of digits

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Martin Panter
Martin Panter added the comment: Opened Issue 24541 related to this latest change. The test and documentation are still inconsistent, even if the test passes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400

[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Martin Panter
New submission from Martin Panter: Revision 0b7c313851ca highlights an inconsistency in the test case at the top of the TestPredicates class. After removing isawaitable() in Issue 24400, there are now actually eighteen is* functions. The comment in the test case still says there are sixteen

[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Yury Selivanov
Yury Selivanov added the comment: This has already been fix (see issue24400). I've also updated the comment (16 - 18). Let's keep the test as is. -- nosy: +yselivanov resolution: - fixed stage: - resolved status: open - closed ___ Python tracker

[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset a5c6eaa7d733 by Yury Selivanov in branch '3.5': Issue #24541: Update comment in test_inspect.test_eightteen https://hg.python.org/cpython/rev/a5c6eaa7d733 -- nosy: +python-dev ___ Python tracker

[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___ ___

[issue24132] Direct sub-classing of pathlib.Path

2015-06-30 Thread Kevin Norris
Kevin Norris added the comment: If I were designing pathlib from scratch, I would not have a separate Path class. I would instead do something like this: In pathlib.py: if os.name == 'nt': Path = WindowsPath else: Path = PosixPath Alternatively, Path() could be a

[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Martin Panter
Martin Panter added the comment: Reopening. The patch still applies to the current code (e.g. revision df310e5ac015, 30 June). It changes eight references of “async()” that still exist in this revision. -- status: closed - open ___ Python tracker

[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Martin! -- resolution: out of date - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___ ___

[issue24487] Change asyncio.async() → ensure_future()

2015-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b3be273e327 by Yury Selivanov in branch '3.5': Issue #24487: Rename async() - ensure_future() in asyncio docs. https://hg.python.org/cpython/rev/1b3be273e327 New changeset 3dc2a113e8a7 by Yury Selivanov in branch 'default': Merge 3.5 (Issue

[issue24542] ssl - SSL_OP_NO_TICKET not reimplemented

2015-06-30 Thread Samuel Hoffman
New submission from Samuel Hoffman: Realizing the _ssl module does not import very many constants, I think it might be worth while to reimplement and document SSL_OP_NO_TICKET (0x4000) as it's another one of the enable this for improved security at a cost options like SSL_OP_SINGLE_DH_USE

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread R. David Murray
R. David Murray added the comment: Look like you forgot to adjust test_inspect for the removal. eg: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/54 -- nosy: +r.david.murray status: closed - open ___ Python

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Yury Selivanov
Yury Selivanov added the comment: +1 for readfd/writefd. I think 'fd' suffix is necessary to make it explicit that those aren't file objects. -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Yury Selivanov
Yury Selivanov added the comment: Here's a patch, please review. -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file39839/ospipe.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Yury Selivanov
Yury Selivanov added the comment: Look like you forgot to adjust test_inspect for the removal. eg: My bad. Thanks, David! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b7c313851ca by Yury Selivanov in branch '3.5': Issue #24400: Fix failing unittest https://hg.python.org/cpython/rev/0b7c313851ca New changeset 8c85291e86bf by Yury Selivanov in branch 'default': Merge 3.5 (Issue #24400)

[issue24541] test_eightteen() in test_inspect out of sync with documentation

2015-06-30 Thread Martin Panter
Martin Panter added the comment: Okay but what about the documentation? It still claims sixteen. # This test is here for remember you to update Doc/library/inspect.rst -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24541

[issue23883] __all__ lists are incomplete

2015-06-30 Thread Martin Panter
Martin Panter added the comment: The technical bit of Issue23883_support_check__all__.v3.patch looks pretty good. Mainly some grammar suggestions for the documentation. Issue23883_test_gettext.v2.patch looks fine; just depends on check__all__() being added. Couple of comments about the APIs

Re: Parsing logfile with multi-line loglines, separated by timestamp?

2015-06-30 Thread Victor Hooi
Aha, cool, that's a good idea =) - it seems I should spend some time getting to know generators/iterators. Also, sorry if this is basic, but once I have the block list itself, what is the best way to parse each relevant line? In this case, the first line is a timestamp, the next two lines are

[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-30 Thread Ed Maste
Changes by Ed Maste carpedd...@gmail.com: -- nosy: +emaste ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24520 ___ ___ Python-bugs-list mailing

[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-30 Thread koobs
Changes by koobs koobs.free...@gmail.com: -- keywords: +needs review nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24520 ___ ___

EuroPython 2015: Call for On-site Volunteers

2015-06-30 Thread M.-A. Lemburg
EuroPython is organized and run by volunteers from the Python community, but we’re only a few and we will need more help to make the conference run smoothly. We need your help ! --- We will need help with the conference and registration desk, giving out the swag bags and

EuroPython 2015: Call for On-site Volunteers

2015-06-30 Thread M.-A. Lemburg
EuroPython is organized and run by volunteers from the Python community, but we’re only a few and we will need more help to make the conference run smoothly. We need your help ! --- We will need help with the conference and registration desk, giving out the swag bags and

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Jon Ribbens
On 2015-06-30, Steven D'Aprano st...@pearwood.info wrote: On Tue, 30 Jun 2015 06:52 am, Randall Smith wrote: Not sure why you posted the link. The crc32 checksum is just to check for possible filesystem corruption. The system does periodic data corruption checks. BTRFS uses crc32 checksums

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to stacked values with one header)

2015-06-30 Thread Chris Angelico
On Tue, Jun 30, 2015 at 11:26 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: My system takes something like three hours just to generate a 500GB backup (one partition each week -- I have a 4TB backup drive with only 740GB free; the other drives are only half full or I'd need an 8TB

[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-06-30 Thread Guido van Rossum
New submission from Guido van Rossum: See https://github.com/python/asyncio/issues/251. I'm on vacation and may or may not find the time to actually fix this (it needs a unittest written). -- components: asyncio messages: 245986 nosy: gvanrossum, haypo, yselivanov priority: normal

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread Gerrit Holl
Changes by Gerrit Holl topjakl...@gmail.com: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24538 ___ ___ Python-bugs-list

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread Gerrit Holl
New submission from Gerrit Holl: `shutil.copystat` fails on [panfs](https://en.wikipedia.org/wiki/Panasas#PanFS) if the source file lacks u+w, because setting extended attributes results in a `PermissionError`. This leads to higher end functions such as `shutil.copytree` to fail. More

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to stacked values with one header)

2015-06-30 Thread Robert Kern
On 2015-06-30 01:54, Denis McMahon wrote: On Sun, 28 Jun 2015 17:07:00 -0700, Ned Batchelder wrote: On Sunday, June 28, 2015 at 5:02:19 PM UTC-4, Denis McMahon wrote: things thingstring 3/thing thingstring 2/thing thingstring 1/thing /things Each thing is just a member of the

Re: get Coursera video download link via program

2015-06-30 Thread iMath
I know the two packages : BeautifulSoup and requests may help, I am also able to login in Coursera via requests, the difficulty is how to find out the video download link from the page. -- https://mail.python.org/mailman/listinfo/python-list

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-30 Thread Cyd Haselton
Cyd Haselton added the comment: Your question about -fPIE brings up a question: How should the differences between Android 5 and previous versions be handled in regards to this issue? Other than mandatory -fPIE, there are changes to Android[s libc that may make patches for python on Android

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread Gerrit Holl
Gerrit Holl added the comment: Perhaps the solution would be some kind of flag, at least for copytree and possibly others, on what to do when attributes cannot be completely copied — a bit like numpys options to raise, warn, or ignore? -- ___

[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2015-06-30 Thread R. David Murray
R. David Murray added the comment: There are a couple of related open issues. I think there is an stdlib problem here, but Im not sure what the solution is. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 11:43:55 UTC+2 skrev jonas.t...@gmail.com: Den tisdag 30 juni 2015 kl. 11:35:06 UTC+2 skrev jonas.t...@gmail.com: Den tisdag 30 juni 2015 kl. 11:08:01 UTC+2 skrev Christian Gollwitzer: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on

get Coursera video download link via program

2015-06-30 Thread iMath
I want extract Coursera video download link via program(mainly Python) behind those links https://www.coursera.org/learn/human-computer-interaction/lecture/s4rFQ/the-interaction-design-specialization https://www.coursera.org/learn/calculus1/lecture/IYGhT/why-is-calculus-going-to-be-so-much-fun

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 11:08:01 UTC+2 skrev Christian Gollwitzer: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on very big numbers if base outside integer scope. I am very keen on suggestions regarding the logic to make it faster. Concerning the algorithmic

Re: Parsing logfile with multi-line loglines, separated by timestamp?

2015-06-30 Thread Chris Angelico
On Wed, Jul 1, 2015 at 2:06 PM, Victor Hooi victorh...@gmail.com wrote: Aha, cool, that's a good idea =) - it seems I should spend some time getting to know generators/iterators. Also, sorry if this is basic, but once I have the block list itself, what is the best way to parse each relevant

Re: Matplotlib X-axis timezone trouble

2015-06-30 Thread Peter Pearson
On 30 Jun 2015 00:56:26 GMT, Peter Pearson pkpearson@nowhere.invalid wrote: The following code produces a plot with a line running from (9:30, 0) to (10:30, 1), not from (8:30, 0) to (9:30, 1) as I desire. If I use timezone None instead of pacific, the plot is as desired, but of course that

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-30 Thread Cyd Haselton
Cyd Haselton added the comment: On June 30, 2015 9:20:45 AM CDT, Ryan Gonzalez rep...@bugs.python.org wrote: Ryan Gonzalez added the comment: On June 30, 2015 8:14:34 AM CDT, Cyd Haselton rep...@bugs.python.org wrote: Cyd Haselton added the comment: Your question about -fPIE brings up a

Re: Linear time baseconversion

2015-06-30 Thread Michael Torrie
Do you have some Python code to show us? -- https://mail.python.org/mailman/listinfo/python-list

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Jonathan Slenders
Jonathan Slenders added the comment: Niki Spahiev made a valid argument saying that the following code is common: if not hasattr(src, 'read'): src = open(src) This will break if we name it 'read'/'write' like the methods of a file object. -- ___

Parsing logfile with multi-line loglines, separated by timestamp?

2015-06-30 Thread Victor Hooi
Hi, I'm trying to parse iostat -xt output using Python. The quirk with iostat is that the output for each second runs over multiple lines. For example: 06/30/2015 03:09:17 PM avg-cpu: %user %nice %system %iowait %steal %idle 0.030.000.030.000.00 99.94 Device:

Re: Parsing logfile with multi-line loglines, separated by timestamp?

2015-06-30 Thread Skip Montanaro
Maybe define a class which wraps a file-like object. Its next() method (or is it __next__() method?) can just buffer up lines starting with one which successfully parses as a timestamp, accumulates all the rest, until a blank line or EOF is seen, then return that, either as a list of strings, one

Re: Linear time baseconversion

2015-06-30 Thread Chris Angelico
On Wed, Jul 1, 2015 at 1:45 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Jun 30, 2015 at 9:40 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Jun 30, 2015 at 3:07 AM, Christian Gollwitzer aurio...@gmx.de wrote: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 15:22:44 UTC+2 skrev jonas.t...@gmail.com: Den tisdag 30 juni 2015 kl. 11:43:55 UTC+2 skrev jonas.t...@gmail.com: Den tisdag 30 juni 2015 kl. 11:35:06 UTC+2 skrev jonas.t...@gmail.com: Den tisdag 30 juni 2015 kl. 11:08:01 UTC+2 skrev Christian Gollwitzer: Am

Re: Linear time baseconversion

2015-06-30 Thread Ian Kelly
On Tue, Jun 30, 2015 at 3:07 AM, Christian Gollwitzer aurio...@gmx.de wrote: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on very big numbers if base outside integer scope. I am very keen on suggestions regarding the logic to make it faster. Concerning the

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-30 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: On June 30, 2015 8:14:34 AM CDT, Cyd Haselton rep...@bugs.python.org wrote: Cyd Haselton added the comment: Your question about -fPIE brings up a question: How should the differences between Android 5 and previous versions be handled in regards to this issue?

Re: Linear time baseconversion

2015-06-30 Thread Ian Kelly
On Tue, Jun 30, 2015 at 9:40 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Jun 30, 2015 at 3:07 AM, Christian Gollwitzer aurio...@gmx.de wrote: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on very big numbers if base outside integer scope. I am very keen on

Re: Parsing logfile with multi-line loglines, separated by timestamp?

2015-06-30 Thread Chris Angelico
On Wed, Jul 1, 2015 at 1:47 AM, Skip Montanaro skip.montan...@gmail.com wrote: Maybe define a class which wraps a file-like object. Its next() method (or is it __next__() method?) can just buffer up lines starting with one which successfully parses as a timestamp, accumulates all the rest,

Re: Linear time baseconversion

2015-06-30 Thread Ian Kelly
On Tue, Jun 30, 2015 at 8:13 AM, jonas.thornv...@gmail.com wrote: Regarding the time it seem to double the digits quadruple the time. And that is still linear or? 2x seem linear to me? That's not linear, nor is it 2x. If doubling the size of the input quadruples the time, then doubling the

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-06-30 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Note that I've signed the CLA, and it has been taken into account, as now I have a small star agains my name (if it was the limiting factor, we never know). -- ___ Python tracker rep...@bugs.python.org

Python 3 resuma a file download

2015-06-30 Thread zljubisic
Hi, I would like to download a file (http://video.hrt.hr/2906/otv296.mp4) If the connection is OK, I can download the file with: import urllib.request urllib.request.urlretrieve(remote_file, local_file) Sometimes when I am connected on week wireless (not mine) network I get WinError 10054

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-06-30 Thread Ethan Furman
Ethan Furman added the comment: 'read'/'write' is sufficient. +1 for the proposal. -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536 ___

Re: Matplotlib X-axis timezone trouble

2015-06-30 Thread Chris Angelico
On Wed, Jul 1, 2015 at 2:42 AM, Peter Pearson pkpearson@nowhere.invalid wrote: I'm just glad I don't have to worry about the distinctions among UTC, GMT, TAI, and UT1. Fortunately, that's often the case. GMT can be ignored, and the other three differ by less seconds than most humans ever care

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Randall Smith
On 06/29/2015 10:00 PM, Steven D'Aprano wrote: On Tue, 30 Jun 2015 06:52 am, Randall Smith wrote: Not sure why you posted the link. The crc32 checksum is just to check for possible filesystem corruption. The system does periodic data corruption checks. BTRFS uses crc32 checksums also.

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Jon Ribbens
On 2015-06-30, Steven D'Aprano st...@pearwood.info wrote: On Tue, 30 Jun 2015 10:19 pm, Jon Ribbens wrote: Eh? The game is over right there. I don't trust you, and yet I have just given you my private data, unencrypted. Yes. That is exactly the problem. If the application doesn't encrypt the

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to stacked values with one header)

2015-06-30 Thread Marko Rauhamaa
Robert Kern robert.k...@gmail.com: tuple itemtuplemember_1/item itemtuplemember_2/item itemtuplemember_n/item /tuple [...] Yes! Any conforming XML implementation will preserve the order. And not only the order: the newlines and other whitespace around the items are also

[issue24528] Misleading exeption for await in comprehensions.

2015-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30b676e8b21f by Yury Selivanov in branch '3.5': Issue #24528: Improve error message for awaits in comprehensions https://hg.python.org/cpython/rev/30b676e8b21f New changeset 9598bc916186 by Yury Selivanov in branch 'default': Merge 3.5 (Issue

Re: Linear time baseconversion

2015-06-30 Thread Ian Kelly
On Tue, Jun 30, 2015 at 10:10 AM, Chris Angelico ros...@gmail.com wrote: When there's a simple ratio between the bases, it's fairly straight-forward to convert a few digits at a time. Converting base 256 into base 64, for instance, can be done by taking three digits and yielding four. But

[issue24528] Misleading exeption for await in comprehensions.

2015-06-30 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24528 ___

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Steven D'Aprano
On Tue, 30 Jun 2015 10:19 pm, Jon Ribbens wrote: On 2015-06-30, Steven D'Aprano st...@pearwood.info wrote: On Tue, 30 Jun 2015 06:52 am, Randall Smith wrote: Not sure why you posted the link. The crc32 checksum is just to check for possible filesystem corruption. The system does periodic

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 18:12:46 UTC+2 skrev Michael Torrie: Do you have some Python code to show us? No i just thought you would find the digit search algorithm interesting. -- https://mail.python.org/mailman/listinfo/python-list

Re: Matplotlib X-axis timezone trouble

2015-06-30 Thread Peter Pearson
On Tue, 30 Jun 2015 17:01:15 +1000, Chris Angelico ros...@gmail.com wrote: On Tue, Jun 30, 2015 at 2:49 PM, Peter Pearson pkpearson@nowhere.invalid wrote: Time zones teem with sneaky software problems, and so does daylight-saving time, so this problem might strain my brain. Maybe it's going to

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Randall Smith
On 06/29/2015 03:49 PM, Jon Ribbens wrote: On 2015-06-29, Randall Smith rand...@tnr.cc wrote: Same reason newer filesystems like BTRFS use checkusms (BTRFS uses CRC32). The storage machine runs periodic file integrity checks. It has no control over the underlying filesystem. True, but

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Chris Angelico
On Wed, Jul 1, 2015 at 4:17 AM, Steven D'Aprano st...@pearwood.info wrote: If you can trick me into turning encryption off (say, you use a social engineering attack on me and convince me to delete the virus crypto.py), then I might inadvertently upload unencrypted data to you. Or maybe you

Re: Linear time baseconversion

2015-06-30 Thread Michael Torrie
On 06/30/2015 10:24 AM, jonas.thornv...@gmail.com wrote: Den tisdag 30 juni 2015 kl. 18:12:46 UTC+2 skrev Michael Torrie: Do you have some Python code to show us? No i just thought you would find the digit search algorithm interesting. Yeah it is interesting, although I didn't really see an

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Steven D'Aprano
On Wed, 1 Jul 2015 03:39 am, Randall Smith wrote: On 06/29/2015 10:00 PM, Steven D'Aprano wrote: I'm making an assumption here -- I assume that the sender records a checksum for uploaded files so that when they get something back again they can tell whether or not it is the same content they

[issue24534] disable executing code in .pth files

2015-06-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 30.06.2015 20:52, Min RK wrote: Thanks for the feedback, I thought it might be a long shot. I will go back to removing the *use* of the feature everywhere I can find it, since it is so problematic and rarely, if ever, desirable. Could you please

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Chris Angelico
On Wed, Jul 1, 2015 at 4:59 AM, Steven D'Aprano st...@pearwood.info wrote: Today, if the key is compromised, all is lost. Is it possible that there are ciphers that are resistant to discovery of the key? Obviously if you know the key you can read encrypted messages, that's what the key is for,

[issue24534] disable executing code in .pth files

2015-06-30 Thread Min RK
Min RK added the comment: Could you please post an example of where the feature is problematic ? setuptools/easy_install is the major one, which effectively does `sys.path[:0] = pth_contents`, breaking import priority. This has been known to result in adding

[issue24534] disable executing code in .pth files

2015-06-30 Thread Min RK
Min RK added the comment: Thanks for the feedback, I thought it might be a long shot. I will go back to removing the *use* of the feature everywhere I can find it, since it is so problematic and rarely, if ever, desirable. it's an essential feature that has been documented for a very long

[issue24540] Documentation about skipkeys parameter for json.dumps is incorrect

2015-06-30 Thread Matthew Havard
New submission from Matthew Havard: The documentation from json.dumps says this about skipkeys: If ``skipkeys`` is false then ``dict`` keys that are not basic types (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped instead of raising a ``TypeError``. However, that

Cross compiling C Python2.7.10 for arm on x86_64 linux box.

2015-06-30 Thread Andrew Robinson
Hi, I'm Needing to get python 2.7.10 to cross compile correctly for an ARM embedded device. I'm very close, as it does build with warnings, but the result is defective and I'm not sure how to fix it. For some odd reason, the interpreter does run -- but I either get random segfaults -- or if I

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-30 Thread STINNER Victor
STINNER Victor added the comment: Le lundi 29 juin 2015, Yury Selivanov rep...@bugs.python.org a écrit : You should develop using asyncio debug mode: Maybe we should promote this check to the production mode? asyncio must be slow. The check has a cost, I prefer to keep it only in debug

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-06-30 Thread Lars Gustäbel
Lars Gustäbel added the comment: Martin, I followed your suggestion to raise ReadError. This needed an additional change in copyfileobj() because it is used both for adding file data to an archive and extracting file data from an archive. But I think the patch is in good shape now.

Re: Matplotlib X-axis timezone trouble

2015-06-30 Thread Chris Angelico
On Tue, Jun 30, 2015 at 2:49 PM, Peter Pearson pkpearson@nowhere.invalid wrote: Time zones teem with sneaky software problems, and so does daylight-saving time, so this problem might strain my brain. Maybe it's going to turn out that my expectations are unreasonable . . . as in, Well, smarty

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 01:11:51 UTC+2 skrev Ian: On Mon, Jun 29, 2015 at 4:56 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jun 29, 2015 at 4:39 PM, jonas.thornv...@gmail.com wrote: http://jt.node365.se/baseconversion8.html Back of the envelope mental calculation, that appears

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 11:35:06 UTC+2 skrev jonas.t...@gmail.com: Den tisdag 30 juni 2015 kl. 11:08:01 UTC+2 skrev Christian Gollwitzer: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on very big numbers if base outside integer scope. I am very keen on

Re: Linear time baseconversion

2015-06-30 Thread jonas . thornvall
Den tisdag 30 juni 2015 kl. 11:08:01 UTC+2 skrev Christian Gollwitzer: Am 30.06.15 um 10:52 schrieb jonas.thornv...@gmail.com: It still bug out on very big numbers if base outside integer scope. I am very keen on suggestions regarding the logic to make it faster. Concerning the algorithmic

[issue24537] Py_Initialize unable to load the file system codec

2015-06-30 Thread Dana Christen
New submission from Dana Christen: I'm using the C API to embed the Python interpreter (see the attached example). Everything works fine until I try to run the resulting executable on a machine without a Python installation. In that case, the call to Py_Initialize fails with the following

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Yury Selivanov
Yury Selivanov added the comment: isawaitable(), however, should continue using abc.Awaitable, since it only checks for __await__ presence on the type (or should we just drop it?) I'd really remove it. It's not referring to an actual type, so it doesn't fit the purpose of the inspect

[issue24534] disable executing code in .pth files

2015-06-30 Thread Min RK
Min RK added the comment: Just because a feature can be misused doesn't make it a bad feature. That's fair. I'm just not aware of any uses of this feature that aren't misuses, hence the patch. Perhaps you could submit a fix for this to the setuptools maintainers instead. Yes, that's

Re: [issue24534] disable executing code in .pth files

2015-06-30 Thread M.-A. Lemburg
On 01.07.2015 00:16, Min RK wrote: Just because a feature can be misused doesn't make it a bad feature. That's fair. I'm just not aware of any uses of this feature that aren't misuses, hence the patch. I don't remember the details of why this feature was added, but can imagine that it was

Re: How to debug TypeError: required field lineno missing from expr?

2015-06-30 Thread Mark Lawrence
On 29/06/2015 03:44, Steven D'Aprano wrote: On Mon, 29 Jun 2015 11:14 am, Mark Lawrence wrote: Purely as an exercise I've been converting Grant Jenks' pypatt[1] from 2.7 to 3.4. I've managed to sort out most of the required changes by checking on what I can see with an AST pretty printer[2].

[issue24535] SELinux reporting writes, executes, and dac_overwrites

2015-06-30 Thread Nick Levinson
Nick Levinson added the comment: Thank you. I didn't know enough to understand the relevance of blueman. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24535 ___

[issue24534] disable executing code in .pth files

2015-06-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 30.06.2015 22:49, Min RK wrote: Could you please post an example of where the feature is problematic ? setuptools/easy_install is the major one, which effectively does `sys.path[:0] = pth_contents`, breaking import priority. This has been known

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Ben Darnell
Ben Darnell added the comment: Yes, I can switch use the ABC instead, and I agree that it doesn't make sense to have the inspect method if it's going to be equivalent to the ABC. I'm happy with the outcome here but AFAIK the original issue still stands: the Awaitable ABC is unusual in that

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset e20c197f19d6 by Yury Selivanov in branch '3.5': Issue #24400: Remove inspect.isawaitable(). https://hg.python.org/cpython/rev/e20c197f19d6 New changeset 800bf6a0e0d5 by Yury Selivanov in branch 'default': Merge 3.5 (Issue #24400)

Re: Linear time baseconversion

2015-06-30 Thread Christian Gollwitzer
Am 30.06.15 um 18:34 schrieb Ian Kelly: On Tue, Jun 30, 2015 at 10:10 AM, Chris Angelico ros...@gmail.com wrote: When there's a simple ratio between the bases, it's fairly straight-forward to convert a few digits at a time. Converting base 256 into base 64, for instance, can be done by taking

Re: Python 3 resuma a file download

2015-06-30 Thread Cameron Simpson
On 30Jun2015 08:34, zljubi...@gmail.com zljubi...@gmail.com wrote: I would like to download a file (http://video.hrt.hr/2906/otv296.mp4) If the connection is OK, I can download the file with: import urllib.request urllib.request.urlretrieve(remote_file, local_file) Sometimes when I am

Re: Linear time baseconversion

2015-06-30 Thread Christian Gollwitzer
Am 30.06.15 um 17:40 schrieb Ian Kelly: On Tue, Jun 30, 2015 at 3:07 AM, Christian Gollwitzer aurio...@gmx.de wrote: Concerning the algorithmic complexity, it can't be faster than square time in the number of digits N. Baseconversion needs to do a sequence of division operations, where every

Re: Pure Python Data Mangling or Encrypting

2015-06-30 Thread Jon Ribbens
On 2015-06-30, Steven D'Aprano st...@pearwood.info wrote: I don't think there has been much research into keeping at least *some* security even when keys have been compromised, apart from as it relates to two-factor authentication. That's because the key is all the secret part. If an attacker

  1   2   >