[issue22674] RFE: Add signal.strsignal(): string describing a signal

2018-03-06 Thread Chris Rebert

Change by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue22674>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28537] abc module fails to reject instantiation of some multiply-inheriting classes that fail to implement abstract methods

2016-10-25 Thread Chris Rebert

Changes by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28537>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Chris Rebert

Changes by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27587>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-22 Thread Chris Rebert

Changes by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27561>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23496] Steps for Android Native Build of Python 3.4.2

2016-06-07 Thread Chris Rebert

Changes by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23496>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23670] Modifications to support iOS as a cross-compilation target

2016-06-07 Thread Chris Rebert

Changes by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23670>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Urgent - Would like to see output of each block of python

2016-06-06 Thread Chris Rebert
On Sun, Jun 5, 2016 at 11:57 PM, Archana Sonavane
 wrote:
> Hi Team,
>
> I don't have any idea about python scripts, i have ganglia tool python 
> scripts.
>
> I would like see the output of each code block, could you please guide.
>
> The code as follows:


With regard to your Subject line, please don't attempt to mark posts
as "urgent".
See http://www.catb.org/esr/faqs/smart-questions.html#urgent

Regards,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26252] Add an example to importlib docs on setting up an importer

2016-01-31 Thread Chris Rebert

Changes by Chris Rebert <pyb...@chrisrebert.com>:


--
nosy: +cvrebert

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26252>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: python domain in China. This showed up on Python list

2015-12-01 Thread Chris Rebert
On Tue, Dec 1, 2015 at 2:10 AM, Laura Creighton  wrote:
> I think we have just dodged a bullet, let us now go thank the
> nice people who sent us this and figure out how we should
> secure the domain.
>
> Laura
>
>
> --- Forwarded Message
>
> Return-Path: 
> Date: Tue, 1 Dec 2015 15:12:58 +0800
> From: "Ian Liu" 
> To: 
> Subject: python CN domain and keyword


I hate to break it to you, but this seems to be just another of those
come-ons spammed out by various scummy businesses that trawl WHOIS
databases for people to scam into buying extra/unnecessary domain
names. Google "chinese domain scam" for more info. I've received
similar spams after having registered some .com domains that no
corporation could possibly legitimately want the .cn equivalents of.

Additionally, the two most obvious relevant domains were already
registered by non-PSF parties years ago, and aren't set to expire
imminently. Per https://ewhois.cnnic.cn :

Domain Name: python.cn
Registrant: 北京开心杯科技有限公司
Registrant Contact Email: @happylatte.com
Registration Time: 2003-03-17 12:20:05
Expiration Time: 2017-03-17 12:48:36

Domain Name: python.org.cn
Registrant Contact Email: @lxl.cn
Registration Time: 2007-04-12 14:02:16
Expiration Time: 2016-04-12 14:02:16


Regards,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: more itertools

2015-08-31 Thread Chris Rebert
On Mon, Aug 31, 2015 at 6:42 PM, Mark Lawrence  wrote:
> This contained the itertool recipes and was available on pypi but looks like
> it's gone.  Can anybody tell me if it's defunct, superseded or what?

What do you mean? It's still there AFAICT:
https://pypi.python.org/pypi/more-itertools
Still installs fine too:

$ pip install more-itertools
Collecting more-itertools
  Downloading more-itertools-2.2.tar.gz
Installing collected packages: more-itertools
  Running setup.py install for more-itertools
Successfully installed more-itertools-2.2
$ python
Python 2.7.10 (default, Jul 17 2015, 01:43:42)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import more_itertools
>>>

Cheers,
Chris

P.S. It annoys me that the most of "recipes", which IME normally need
no tweaking whatsoever, aren't just part of itertools proper.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23597] Allow easy display of local variables in log messages?

2015-08-25 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23597
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python/Github

2015-08-24 Thread Chris Rebert
On Mon, Aug 24, 2015 at 1:14 PM, DBS davanand.bah...@gmail.com wrote:
 Hello,

 I'm trying to retrieve the number of commits and changed files on all pull 
 requests submitted to a branch.

 The call to get all the pull requests is GET /repos/:owner/:repo/pulls, but 
 it does not return commits or changed_files.

 The call that returns number of commits and changed files is GET 
 /repos/:owner/:repo/pulls/:number.

 Any guidance on how I can modify the call below to include commits and 
 changed files on all pull requests?

 #!/usr/bin/env python
 import json
 import requests
snip

Have you considered using a GitHub API Python library such as
github3.py (https://github.com/sigmavirus24/github3.py ) rather than
reinventing the wheel?

Cheers,
Chris
--
http://chrisrebert.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: looking for standard/builtin dict-like data object

2015-08-10 Thread Chris Rebert
On Mon, Aug 10, 2015 at 8:22 PM, Vladimir Ignatov kmis...@gmail.com wrote:
 Hi,

 In my code I often use my own home-brewed object for passing bunch of
 data between functions. Something like:

 class Data(object):
 def __init__ (self, **kwargs):
 self.__dict__ = kwargs

 

 return Data(attr1=..., attr2=..., attr3=...)

 Logically it works like plain dictionary but with nice result.attrX
 syntax on client side (instead of resut['attrX']).   Overall I am
 pretty happy with this approach except that I need to drag Data class
 around my projects and import its module in every code producing data.

 I am curious if anybody knows similar dummy class located in
 standard libraries? I'd be glad to use it instead.

This is commonly known as a Bunch class, after the Python Cookbook
recipe. I don't believe there's any public version of it in the std
lib, but there is a PyPI package for it:
https://pypi.python.org/pypi/bunch

However, if the set of attribute names is fixed and an immutable
datatype is acceptable, you could use the std lib's namedtuple type:
https://docs.python.org/3/library/collections.html#collections.namedtuple

Cheers,
Chris
--
http://chrisrebert.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24842] Mention SimpleNamespace in namedtuple docs

2015-08-10 Thread Chris Rebert

New submission from Chris Rebert:

There is a cross-reference to namedtuple in SimpleNamespace's docs, but not 
vice-versa, despite these types being fairly similar.

--
assignee: docs@python
components: Documentation
messages: 248389
nosy: cvrebert, docs@python
priority: normal
severity: normal
status: open
title: Mention SimpleNamespace in namedtuple docs
type: enhancement
versions: Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24842
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24668] Deprecate 00000 as a synonym for 0

2015-07-19 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24064] Make the property doctstring writeable

2015-05-01 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24064
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23622] Deprecate unrecognized backslash+letter escapes

2015-03-13 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23622
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23342] run() - unified high-level interface for subprocess

2015-02-06 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23342
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Decimals and other numbers

2015-01-08 Thread Chris Rebert
On Thu, Jan 8, 2015 at 6:33 PM, Devin Jeanpierre jeanpierr...@gmail.com wrote:
 I noticed some very PHP-ish behavior today:

 import decimal
 x = 0
 y = float(x)
 z = decimal.Decimal(x)
 x == y == z == x
 True
 x ** x
 1
 y**y
 1.0
 z**z
 Traceback (most recent call last):
   File stdin, line 1, in module
   File /usr/lib/python2.7/decimal.py, line 2216, in __pow__
 return context._raise_error(InvalidOperation, '0 ** 0')
   File /usr/lib/python2.7/decimal.py, line 3872, in _raise_error
 raise error(explanation)
 decimal.InvalidOperation: 0 ** 0

 I'd file a bug report but I'm anticipating some rational (heh)
 explanation. Any ideas?

The `decimal` std lib module implements the General Decimal Arithmetic
Specification (http://speleotrove.com/decimal/decarith.html ).
In the Exceptional conditions section
(http://speleotrove.com/decimal/daexcep.html ), it specifies the
following:
Invalid operation
This occurs and signals invalid-operation if:
[...]
* both operands of the power operation are zero

No idea why it chose to differ from IEEE-754.

Cheers,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23201] Decimal(0)**0 is an error, 0**0 is 1, but Decimal(0) == 0

2015-01-08 Thread Chris Rebert

Chris Rebert added the comment:

This behavior seems to be required by the General Decimal Arithmetic
Specification (http://speleotrove.com/decimal/daexcep.html ):

 The following exceptional conditions can occur:
 [...]
 Invalid operation
 This occurs and signals invalid-operation if:
 [...]
 * both operands of the power operation are zero

signals invalid-operation apparently being mapped by default in Python to 
raise the InvalidOperation exception.

--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23201
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19776] Provide expanduser() on Path objects

2014-12-24 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19776
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16329] mimetypes does not support webm type

2014-12-03 Thread Chris Rebert

Chris Rebert added the comment:

WebM's docs use video/webm and never use an application/* type.
See http://www.webmproject.org/docs/container/

They also specify audio/webm for audio-only content, but both use the same 
file extension, so associating .webm with video/webm seems quite reasonable 
since it's more general (an audio-only file is just a degenerate case of an 
audiovideo file).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16329
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16329] mimetypes does not support webm type

2014-12-03 Thread Chris Rebert

Chris Rebert added the comment:

Yes, the existing patch looks fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16329
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21557] os.popen os.system lack shell-related security warnings

2014-12-01 Thread Chris Rebert

Chris Rebert added the comment:

Here is a patch that adds the necessary warnings from issue 7950.
Please review it when you get a chance.

--
keywords: +patch
Added file: http://bugs.python.org/file37338/fix-21557.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21557
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-12-01 Thread Chris Rebert

Chris Rebert added the comment:

Ping. This small patch has been waiting nearly 3 months for a review.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22356
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22936] traceback module has no way to show locals

2014-11-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22951] unexpected return from float.__repr__() for inf, -inf, nan

2014-11-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22951
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-11-27 Thread Chris Rebert

Chris Rebert added the comment:

Thanks Serhiy!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13212] json library is decoding/encoding when it should not

2014-11-27 Thread Chris Rebert

Chris Rebert added the comment:

Ping!
Seems like this should be closed since the new RFC explicitly legalizes the 
feature in question and since the docs explicitly warn about the 
interoperability of the feature.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13212
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-11-11 Thread Chris Rebert

Chris Rebert added the comment:

Ping! It's been about 3 months since this was given the green light...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Import Doesn't Import

2014-10-15 Thread Chris Rebert
On Wednesday, October 15, 2014, ryguy7272 ryanshu...@gmail.com wrote:

 So sorry everyone.  I've posted here several times today.  This is VERY
 frustrating.

 So, I'm reading this link.
 https://docs.python.org/2/howto/urllib2.html



Important note!: The /2/ in the URL means those docs are for Python 2.x
When using Python 3, ensure that the docs you're consulting have a /3/ in
them instead.


 Fetching URLs
 The simplest way to use urllib2 is as follows:
 import urllib2
 response = urllib2.urlopen('http://python.org/')
 html = response.read()


 So, I fire up Python, and create a new file and name it and hit F5.

 All I have is thins in the file:
 import urllib2
 response = urllib2.urlopen('http://python.org/')
 html = response.read()

 It immediately produces this error:
 Traceback (most recent call last):
   File C:/Python34/import_web_data.py, line 1, in module
 import urllib2
 ImportError: No module named 'urllib2'


You're using Python 3, and the urllib2 module no longer exists in Python 3.
The URL/HTTP modules got refactored on Python 3. You want the
`urllib.request` module instead.

Although most folks nowadays use http://docs.python-requests.org/ instead,
though it's third-party and outside the std lib.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-09-12 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22356
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2014-09-12 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22393
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22189] collections.UserString missing some str methods

2014-08-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22189
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22276] pathlib glob issues

2014-08-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22276
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21611] int() docstring - unclear what number is

2014-08-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21611
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20779] Add pathlib.chown method

2014-08-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20779
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Linux distros w/o Python in base installation

2014-08-11 Thread Chris Rebert
On Mon, Aug 11, 2014 at 11:53 AM, Grant Edwards invalid@invalid.invalid wrote:
 I just installed Arch Linux for the first time, and was surprosed to
 find that Python isn't installed as part of a base system.  It's
 also not included in the 'base-devel' package group.  It's trivial to
 install, but I'd still pretty surprised it's not there by default.  I
 guess I've spent too much time with Gentoo, Debian, and RedHat
 derivitives which require Python be installed.

 I've probably used at least a dozen Linux distros over the years, and
 this is the first time I've noticed that Python wasn't installed by
 default.

 Just for the sake of curiosity, are there any other significant
 desktop/server Linux distros that don't come out of the box with
 Python?

It would seem that such distros are opting to not be LSB-compliant?:
http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Languages/LSB-Languages/pylocation.html

Cheers,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-08-10 Thread Chris Rebert

Chris Rebert added the comment:

So, when might I expect to see this patch merged, since it's now been approved?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16535] json encoder unable to handle decimal

2014-07-26 Thread Chris Rebert

Chris Rebert added the comment:

 1) JSON just support floats

If you read the JSON standards documents, you'll see that this isn't accurate.

Regardless, a general solution for non-built-in numeric types does seem 
preferable.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16535
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18355] Merge super() guide into documentation

2014-07-23 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18355
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Distributing python applications as a zip file

2014-07-22 Thread Chris Rebert
On Tue, Jul 22, 2014 at 9:23 PM, Steven D'Aprano st...@pearwood.info wrote:
 A little known feature of Python: you can wrap your Python application in
 a zip file and distribute it as a single file. The trick to make it
 runnable is to put your main function inside a file called __main__.py
 inside the zip file.
snip
 It's not quite self-contained, as you still need to have Python
 installed, but otherwise it's a good way to distribute a Python
 application as a single file that users can just copy and run.

And if you want something nearly completely self-contained (probably
modulo dynamic linking), it seems that there's PEX
(http://pex.readthedocs.org/en/latest/ ).

Cheers,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-07-14 Thread Chris Rebert

Chris Rebert added the comment:

Thanks for the speedy review!

Those NaN-related arguments are already mentioned in the docs (see last 2 
sentences of 
https://docs.python.org/3/library/json.html#infinite-and-nan-number-values ), 
and this patch doesn't touch that subsection.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-07-13 Thread Chris Rebert

Chris Rebert added the comment:

Here's a draft patch against the default branch that updates the json module's 
docs accordingly.

Note that under Implementation Limitations, the statement This module does 
not impose any such limits beyond those of the relevant Python datatypes 
themselves or the Python interpreter itself. is just a guess; I need someone 
who's familiar with the implementation to verify/correct this.

--
keywords: +patch
Added file: http://bugs.python.org/file35945/json-rfc-7159_1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10289] Document magic methods called by built-in functions

2014-07-13 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10289
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13212] json library is decoding/encoding when it should not

2014-05-30 Thread Chris Rebert

Chris Rebert added the comment:

Okay, so can this issue be closed in light of the existing docs and issue 21514 
then?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13212
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21557] os.popen os.system lack shell-related security warnings

2014-05-22 Thread Chris Rebert

New submission from Chris Rebert:

Since these functions run shell commands, which is a common vector for 
security-related bugs (see
* http://cwe.mitre.org/data/definitions/78.html
* http://cwe.mitre.org/data/definitions/88.html
), I suggest that they should have security warning boxes analogous to the one 
for the `subprocess` module:
https://docs.python.org/2/library/subprocess.html#frequently-used-arguments

--
assignee: docs@python
components: Documentation
messages: 218921
nosy: cvrebert, docs@python
priority: normal
severity: normal
status: open
title: os.popen  os.system lack shell-related security warnings
versions: Python 2.7, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21557
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21545] Tutorial: examples and comment about mutation methods

2014-05-20 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21545
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17909] Autodetecting JSON encoding

2014-05-15 Thread Chris Rebert

Chris Rebert added the comment:

You'll need to also update the Character Encodings subsection of the json 
docs.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17909
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17909] Autodetecting JSON encoding

2014-05-15 Thread Chris Rebert

Chris Rebert added the comment:

I agree that the state of encoding detection in the new RFC seems unclear, 
given that the old RFC prefaced the part about the encoding detection with:
 Since the first two characters of a JSON text will always be ASCII
 characters

But in the new RFC:
 Appendix A.  Changes from RFC 4627
[...]
o  Changed the definition of JSON text so that it can be any JSON
   value, removing the constraint that it be an object or array.

Thus,
 ಠ_ಠ
whose 2nd character is decidedly non-ASCII, is now a valid JSON text (i.e. 
standalone JSON document).

There seems to have been a thread about encoding detection in the RFC 7159 
working group, but I don't have the time to read through it all:

 Re: [Json] JSON: remove gap between Ecma-404 and IETF draft
 http://www.ietf.org/mail-archive/web/json/current/msg01936.html

It eventually leads to a dedicated sub-thread:

 [Json] Encoding detection (Was: Re: JSON: remove gap between Ecma-404 and 
 IETF draft)
 http://www.ietf.org/mail-archive/web/json/current/msg01959.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17909
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18820
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19361] Specialize exceptions thrown by JSON parser

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19361
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13212] json library is decoding/encoding when it should not

2014-05-15 Thread Chris Rebert

Chris Rebert added the comment:

Note that, per the new JSON RFC 7159 (https://tools.ietf.org/html/rfc7159 ), 
top-level non-collection values are now de-jure permissible in JSON:

 Appendix A.  Changes from RFC 4627
o  Changed the definition of JSON text so that it can be any JSON
   value, removing the constraint that it be an object or array.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13212
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-15 Thread Chris Rebert

Chris Rebert added the comment:

The new JSON RFC now at least mentions BOM handling:
https://tools.ietf.org/html/rfc7159#section-8.1 :
 Implementations MUST NOT add a byte order mark to the beginning of a
 JSON text.  In the interests of interoperability, implementations
 that parse JSON texts MAY ignore the presence of a byte order mark
 rather than treating it as an error.

--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21509
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-05-15 Thread Chris Rebert

New submission from Chris Rebert:

json module docs: https://docs.python.org/3/library/json.html

New superseding JSON RFC: https://tools.ietf.org/html/rfc7159
Errata to the new RFC: http://www.rfc-editor.org/errata_search.php?rfc=7159
ECMA-404: http://www.ecma-international.org/publications/standards/Ecma-404.htm

These updated specs are of particular relevance to the Standard Compliance 
section of the json module docs. There are also a bunch of new interoperability 
notes in the RFC that could probably bear repeating in the module's docs.

--
assignee: docs@python
components: Documentation
messages: 218644
nosy: cvrebert, docs@python
priority: normal
severity: normal
status: open
title: update json module docs in light of RFC 7159  ECMA-404
versions: Python 2.7, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21514
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21401] python2 -3 does not warn about str/unicode to bytes conversions and comparisons

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21401
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1043134] Add preferred extensions for MIME types

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1043134
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1521950] shlex.split() does not tokenize like the shell

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1521950
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13826] Having a shlex example in the subprocess.Popen docs is confusing

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13826
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13197] subprocess: move shell arguments to a separate keyword param

2014-05-15 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13197
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21414] Add an intersperse function to itertools

2014-05-02 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21414
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21413] urllib.request.urlopen dies on non-basic/digest auth schemes

2014-05-02 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21413
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21347] Don't use a list argument together with shell=True in subprocess' docs

2014-05-02 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21347
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19475] Add microsecond flag to datetime isoformat()

2014-04-23 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19475
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19837] Wire protocol encoding for the JSON module

2014-03-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19837
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17909] Autodetecting JSON encoding

2014-03-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17909
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10976] json.loads() raises TypeError on bytes object

2014-03-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10976
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21092] json serializer implicitly stringifies non-string keys

2014-03-28 Thread Chris Rebert

New submission from Chris Rebert:

Python 3.3.4 (default, Feb 21 2014, 18:00:34) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type help, copyright, credits or license for more information.
 from json import dumps
 dumps({True: True, False: False, None: None, 42: 42})
'{false: false, true: true, 42: 42, null: null}'



This implicit stringification of non-string dictionary keys does not currently 
appear to be documented.

--
assignee: docs@python
components: Documentation
messages: 215105
nosy: cvrebert, docs@python
priority: normal
severity: normal
status: open
title: json serializer implicitly stringifies non-string keys
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19871] json module won't parse a float that starts with a decimal point

2014-03-24 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19871
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16535] json encoder unable to handle decimal

2014-03-24 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16535
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13697] python RLock implementation unsafe with signals

2014-03-18 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13697
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16329] mimetypes does not support webm type

2014-03-18 Thread Chris Rebert

Chris Rebert added the comment:

So, nobody seems to have cared enough about the policy change to weigh in 
during the intervening year and ~3mos...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16329
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13212] json library is decoding/encoding when it should not

2014-03-18 Thread Chris Rebert

Chris Rebert added the comment:

 FWIW, I’m +1 for a doc section about how to achieve strict mode with special 
 arguments and callbacks (if the recent doc patch does not already have that)

The docs added by that patch do indeed cover this:
http://docs.python.org/2/library/json.html#standard-compliance

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13212
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2014-03-11 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5207
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2014-03-05 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13936
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20727] Improved roundrobin itertools recipe

2014-02-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20727
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20246] buffer overflow in socket.recvfrom_into

2014-02-25 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20630] Add sorting helpers for collections containing None values

2014-02-21 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20630
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20632] Define a new __key__ protocol

2014-02-21 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20632
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: UTC timezone causing brain explosions

2014-01-29 Thread Chris Rebert
On Wed, Jan 29, 2014 at 1:52 PM, Skip Montanaro s...@pobox.com wrote:
 Following up on my earlier note about UTC v. GMT, I am having some
 trouble grokking attempts to convert a datetime into UTC. Consider
 these three values:

 import pytz
 UTC = pytz.timezone(UTC)
 LOCAL_TZ = pytz.timezone(America/Chicago)
 LOCAL_TZ
 DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD
 now = datetime.datetime.now()
 now
 datetime.datetime(2014, 1, 29, 15, 39, 35, 263666)

 All well and good, right? The variable now is a naive datetime
 object. I happen to be sitting in a chair in the city of Chicago, so
 let's call it what it is, a datetime in the America/Chicago timezone:

 s = LOCAL_TZ.localize(now)
 s
 datetime.datetime(2014, 1, 29, 15, 39, 35, 263666, tzinfo=DstTzInfo
 'America/Chicago' CST-1 day, 18:00:00 STD)

 That looks good to me. Now, let's normalize it to UTC:

I don't think .normalize() doesn't do what you think it does; it's
related to timezones with DST.
I believe you want datetime.astimezone() instead.

 t = UTC.normalize(s)
 t
 datetime.datetime(2014, 1, 29, 15, 39, 35, 263666, tzinfo=UTC)
 t.hour
 15

 WTF? Why isn't the t.hour == 21?

Because you didn't actually perform a proper timezone conversion:
 t = s.astimezone(UTC)
 t
datetime.datetime(2014, 1, 29, 21, 39, 35, 263666, tzinfo=UTC)
 t.hour == 21
True

snip
 That looks correct, but I don't understand why I don't get hour==21
 out of the UTC.normalize call. It's like it's a no-op.

It is indeed a no-op:
You can take shortcuts when dealing with the UTC side of timezone
conversions. normalize() and localize() are not really necessary when
there are no daylight savings time transitions to deal with.
-- http://pytz.sourceforge.net

Cheers,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-06 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20138
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Postfix conditionals

2014-01-05 Thread Chris Rebert
On Sun, Jan 5, 2014 at 12:24 PM, Göktuğ Kayaalp s...@gkayaalp.com wrote:
 Hi,

 AFAIK, we do not have postfix conditionals in Python, i.e. a condition
 appended to a
 statement, which determines whether the statement runs or not:

   py for i in [False]:
   ... break if not i

 The above piece of code is equivalent to this in Python:

   py for i in [False]:
   ...if not i
   ...break

 I believe that the first example is superior to the second example when the
 two is compared
 for readability and intuitiveness.

I'm going to have to disagree. I dislike how this obscures the
if-statement, complicates the language grammar, and adds another
unnecessary way to express the same thing (which violates TOOWTDI)
with little countervailing benefit.

 We already have a ternary statement that
 looks similar,

   py print('hi') if True else None

Actually, to be pedantic, it's a ternary *expression*. Using it purely
for side-effects (i.e. as a statement) is rather unidiomatic, in the
same way that abusing list comprehensions, e.g.:

[print(i) for i in range(42)]

is frowned upon.
Not to mention that the ternary doesn't work for actual statements
(print() is just a function call in Python 3):

 (x = 1) if True else (x = 2)
  File stdin, line 1
(x = 1) if True else (x = 2)
   ^
SyntaxError: invalid syntax

 so I reckon there would be no breakage in old code if this kind of syntax
 was added.  Ruby has
 this, and AFAIK Perl also does.

 I lack the knowledge of whether the community has opinions on this kind of
 notation, so I am
 posting this here instead of the ideas list.  What are your thoughts on
 this?

You can already write:

for i in [False]:
if not i: break

if you feel the need for terseness or a one-liner. Perhaps this
satisfies your desire?

Cheers,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Re: Postfix conditionals

2014-01-05 Thread Chris Rebert
On Sun, Jan 5, 2014 at 2:12 PM, Göktuğ Kayaalp s...@gkayaalp.com wrote:

 This was sent to me as a private reply

No, it was sent as a public reply via Reply-All; note that python-list
was CC-ed, which works just fine:
https://mail.python.org/pipermail/python-list/2014-January/663858.html

 to a question that I have posted
 to python-list@python.org, so I am forwarding it to here.
snip
  Original Message 
 Subject: Re: Postfix conditionals
 Date: Sun, 5 Jan 2014 14:09:14 -0800
 From: Chris Rebert c...@rebertia.com
 To: Göktuğ Kayaalp s...@gkayaalp.com
 CC: Python python-list@python.org
message body snipped because there's no need
for a third redundant copy of my message
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2013-12-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20059
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20050] distutils should check PyPI certs when connecting to it

2013-12-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20050
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20078] zipfile - ZipExtFile.read goes into 100% CPU infinite loop on maliciously binary edited zips

2013-12-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20078
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: a Python Static Analyzer

2013-12-14 Thread Chris Rebert
On Sat, Dec 14, 2013 at 5:31 PM, Dan Stromberg drsali...@gmail.com wrote:
 Where does PySonar2 sit in the spectrum from pylint
 (thorough/pedantic) to pyflakes (relaxed/few-false-positives)?

 I use pylint and pyflakes a lot, and I've heard that PyChecker sits in
 between them on this axis.

My impression is that PyChecker has been abandoned.
The last commit in its SourceForge CVS repo is from 2008, and `pip
install PyChecker` fails.

Cheers,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to parse JSON passed on the command line?

2013-11-06 Thread Chris Rebert
On Wed, Nov 6, 2013 at 7:53 PM, Anthony Papillion papill...@gmail.com wrote:
 Hello Everyone,

 I'm writing a little helper script in Python that will access a JSON
 formatted argument from the shell when it's called. The parameter will
 look like this:

 {url:http://www.google.com}

 So, if my program is called getargfromcli.py the call will look like this:

 getargfromcli.py {url:http://www.google.com}

You probably want
getargfromcli.py '{url:http://www.google.com}'
instead, so that your string of JSON is treated literally by the shell.

 In the case above, I assume my JSON string will be argv[1]. In fact,
 when I do

 print sys.argv[1]

 It works as expected and prints out the JSON string as expected like
 this: {url:http://www.google.com}

No, that's not JSON anymore! All the required quotation marks have
gone missing. The shell ate them.

Regards,
Chris
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I am never going to complain about Python again

2013-10-09 Thread Chris Rebert
On Wed, Oct 9, 2013 at 9:36 PM, Steven D'Aprano st...@pearwood.info wrote:
 Just came across this little Javascript gem:

 ,,, == Array((null,'cool',false,NaN,4));

 = evaluates as true

 http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array

 I swear, I am never going to complain about Python again.

Oh, indeed, you have no idea.
Since we're talking about JavaScript suckage, I'm obliged to link to
this wonderful video on the subject:
https://www.destroyallsoftware.com/talks/wat

Cheers,
Chris R.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue17359] Mention __main__.py explicitly in command line docs

2013-10-06 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17359
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Language design

2013-09-10 Thread Chris Rebert
* No explicit variable declarations (modulo `global`+`nonlocal`) means
that variable name typos can't be reliably detected at compile-time.
* The value of the loop variable at call-time for functions defined
within a loop trips people up.
* No self-balancing tree datatype of any kind is included in the std lib.
* Function scope rather than block scope (e.g. `while` doesn't
introduce a new scope) [Personally, I don't have much of a problem
with this, but some people do.]
* No anonymous block syntax (cf. Ruby or Smalltalk). Makes it
harder/uglier to define/use custom control structures. The `with`
statement would have been unnecessary.

Cheers,
Chris


On Mon, Sep 9, 2013 at 11:09 PM, Steven D'Aprano st...@pearwood.info wrote:
 Some time ago, Tom Christiansen wrote about the Seven Deadly Sins of
 Perl:

 http://www.perl.com/doc/FMTEYEWTK/versus/perl.html


 What design mistakes, traps or gotchas do you think Python has? Gotchas
 are not necessarily a bad thing, there may be good reasons for it, but
 they're surprising.

 To get started, here are a couple of mine:


 - Python is so dynamic, that there is hardly anything at all that can be
 optimized at compile time.

 - The behaviour of mutable default variables is a gotcha.

 - Operators that call dunder methods like __add__ don't use the same
 method resolution rules as regular methods, they bypass the instance and
 go straight to the type, at least for new-style classes.



 --
 Steven
 --
 https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue18436] Add mapping of symbol to function to operator module

2013-07-19 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18436
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-07-18 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18264
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18369] X509 cert class for ssl module

2013-07-12 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18369
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2013-07-08 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18406
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Looking for a name for a deployment framework...

2013-06-24 Thread Chris Rebert
On Jun 24, 2013 5:36 AM, jonathan.slend...@gmail.com wrote:

 Hi all,

 Any suggestions for a good name, for a framework that does automatic
server deployments?

 It's like Fabric, but more powerful.
 It has some similarities with Puppet, Chef and Saltstack, but is written
in Python.

Er, Salt is likewise written in Python.
(Your statement seemed to imply otherwise.)

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie: The philosophy behind list indexes

2013-06-14 Thread Chris Rebert
On Jun 14, 2013 10:26 PM, ian.l.came...@gmail.com wrote:
 I bet this is asked quite frequently, however after quite a few hours
searching I haven't found an answer.

 What is the thinking behind stopping 'one short' when slicing or
iterating through lists?

 By example;

  a=[0,1,2,3,4,5,6]
  a
 [0, 1, 2, 3, 4, 5, 6]
  a[2:5]
 [2, 3, 4]

 To my mind, it makes more sense to go to 5. I'm sure there's a good
reason, but I'm worried it will result in a lot of 'one-off' errors for me,
so I need to get my head around the philosophy of this behaviour, and where
else it is observed (or not observed.)

I find Dijkstra's explanation rather convincing:
http://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list


[issue18163] Add a 'key' attribute to KeyError

2013-06-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18163
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >