Re: hg, git, fossil, ...

2014-08-29 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com:

 So then to tag or branch a release I guess you would create the same
 tag/branch on every single component subrepository? And when you need
 to checkout that old version you checkout every subrepository
 independently. Sounds painful, but not unworkable.

Where I work, we actually have made a science out of componentization.
The individual components are very similar to linux's development
packages. They are released internally and have their own life cycles.
In particular, they are not rebuilt when the dependent application is
built.

 that old revision of that component may not be compatible with the
 other components at HEAD.

You don't alter ABIs. Component versioning and interdependencies are
managed rigorously. Even ABI breakages could be handled should they
arise.

 Even if it is, you're still checking out a version of the repository
 that never actually existed. You can't expect to reproduce behavior at
 a particular revision if you can't even consistently recreate the
 revision.

Generally, components only go forward linearly. If your ancient
application version needs a fresh bug fix in a component, it gets the
latest and greatest component version. Branching is supported but has
yet to be needed.


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


To automate email login through browser

2014-08-29 Thread subin alex
Hi Guys,

I am very new to python and am trying to  learn python.
I want to automate my email login through browser,in a way that when my
computer boots up,it must be automatically logged into my mailbox.

Please provide your suggestions on this :)

Thanks  Regards,
Subin Alex.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: hg, git, fossil, ...

2014-08-29 Thread Chris Angelico
On Fri, Aug 29, 2014 at 3:50 PM, Marko Rauhamaa ma...@pacujo.net wrote:
 Ian Kelly ian.g.ke...@gmail.com:

 On Wed, Aug 27, 2014 at 11:58 PM, Marko Rauhamaa ma...@pacujo.net wrote:
 I don't see why git has staging or branches, for example.

 I use short-lived development branches in git all the time. Start
 working on a bug or feature, checkout a new branch specifically for
 that work.

 I do the same thing, but I use forks (git clone). Branches and forks
 are conceptually almost identical, so why pollute your concept set with
 extras?

Why fork the repo when you can just branch? That makes no sense.
Nothing's being polluted here. Your comment is like pointing out
that separate text files can store documentation, so why have
docstrings and comments?

 Or why can't I revert my changes to a file easily?

 git checkout filename is not easy?

 Unfortunately, that's only half the story. If you have added but never
 committed the file, the command is:

git rm --cached filename

 I've been in more complicated situations as well.

So? What you're saying is that the staging area has its own set of
manipulation commands. If git didn't have the staging area, you
wouldn't need those commands. Fine. You can argue that you don't make
use of that particular functionality of git, but it's there, so you
have to cope with it. One easy way is to never git add new files
without immediately committing... then it's like lots of other source
control systems.

 Why should they be identical? If they are, then that means they're not
 accurately reporting the actual history of the repository. I don't
 understand why you would even want this.

 I don't think the repository should have one, linear narrative. Rather a
 large repository has numerous independent narratives.

 To quote URL: http://en.wikipedia.org/wiki/Darcs:

Darcs treats patches as first-class citizens. For the user, a
repository can be seen as a set of patches, where each patch is not
necessarily ordered with respect to other patches i.e. the set of
patches is only a partially ordered set. In many cases patches can be
independently transmitted between various repositories.

Many branching, merging and cherry-picking operations that would
require additional commands with snapshot-based systems like Git or
Mercurial, can be directly done with Darcs with the usual ‘pull’ and
‘push’ commands.

[...]

Intuitively, a patch B depends on another patch A if A provides the
content that B modifies. This means that patches that modify
different parts of the code are considered, by default, independent.


 Say you make a change to CPython's GC and I make a parallel change to the
 deque implementation:

common repo 
 \  /  /conflict!
 |\GC work /  /
 | +--+  /
  \ /
   \   deque work  /
+-+

 Hg and git report a conflict and force me to merge, IOW, decide which
 change comes earlier in the linear history.

 A conflict and merge should be rare and hint at development process
 problems. In hg and git, they are unavoidable, everyday occurrences. To
 put it bluntly, hg and git do not support parallel development.

You completely misuse conflict, then. This is not a conflict. This
is just a merge. In git, merging *is* an everyday occurrence, and it's
not a problem at all. That's an intrinsic part of the philosophy.
Branching/merging is the normal way to do *everything*. Even if you
think you're not, you probably are. A merge conflict happens when
there's edits to the same or very nearby lines of code, but otherwise,
that's not a conflict at all. And git doesn't force you to choose
which comes earlier in a linear history - the normal merge says those
two branches start from a common parent, and now have a common child.
That's not linear history at all. Of course, some repos choose to
favour rebasing over merging. I've done plenty of that; where it's a
source code policy to minimize merging - but that's not git's or hg's
rule.

Why are you so dead against merges?

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


Re: hg, git, fossil, ...

2014-08-29 Thread Chris Angelico
On Fri, Aug 29, 2014 at 3:59 PM, Marko Rauhamaa ma...@pacujo.net wrote:
 Where I work, we actually have made a science out of componentization.
 The individual components are very similar to linux's development
 packages. They are released internally and have their own life cycles.
 In particular, they are not rebuilt when the dependent application is
 built.

Then they're fundamentally separate, and they belong in separate
repos. Do you actually enforce that one file == one component
everywhere?

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


Re: hg, git, fossil, ...

2014-08-29 Thread Lele Gaifax
Marko Rauhamaa ma...@pacujo.net writes:

 Chris Angelico ros...@gmail.com:

 What you're saying, though, is that there's something inherently
 special about file boundaries. You want files to be magically
 separable within a repo. Why? What's the significance of the file?

 Files do have that magic property. That's only an approximation, but it
 is a very accurate and fitting approximation. Developers have a strong
 tendency of collecting functions to files. More to the point,
 functionality may be split across multiple files, but a large repository
 is far too blunt an abstraction.

 As I have mentioned, Darcs tries to get everything right. I haven't used
 it, but I have read it sometimes gets entangled in its smart algorithms.

Well, even conceding the file specialty, and more than that acknowledging
the extraordinary beauty of the darcs model, it too considers a patch
spanning several files as an atomic operation.

So, even if it makes very very easy to cherry-pick a given changeset,
it still insist in carrying in all the changes it involves: in your
scenario, you'd still need to withdraw the (unwanted) modifications
applied to the other files, recording an additional changeset with the
reverts.

As you cited in a later messages, unlike other systems which focuses in
tracking files *content*, darcs tracks *patches*: files content is
solely determined by the patches collected in the repository they
live. Darcs patch theory promises that non-conflicting patches may be
applied in any order (they can be commuted at will), that's what makes
cherry-picking a very common/no fuss operation. OTOH, that's also
exactly the main reason (the other is performance...) why Linus
discarded that tool when he looked around for a Bitkeeper replacement.

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.

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


Re: hg, git, fossil, ...

2014-08-29 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com:

 Why fork the repo when you can just branch? That makes no sense.

Why branch when you can just fork? That makes no sense.

I see branches as conceptual clutter.

 One easy way is to never git add new files without immediately
 committing...

My original statement was there was no simple command to revert your
changes.

 then it's like lots of other source control systems.

Well, gladly, emacs's VC mode makes it look like lots of other VC
systems.

 You completely misuse conflict, then. This is not a conflict. This
 is just a merge.

It is not a simple git push, that's for sure. In linear development,
you can repeatedly do git push, but if anybody has touched anything in
the meantime, you'll be blocked from doing that. The classic term for
the situation is a conflict. And the classic conflict resolution is
called a merge, which can be automatic or manual.

What I'm saying is that git push should almost always simply succeed,
and where there is an issue, of course you merge carefully, but you also
review your development discipline.


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


Re: hg, git, fossil, ...

2014-08-29 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com:

 On Fri, Aug 29, 2014 at 3:59 PM, Marko Rauhamaa ma...@pacujo.net wrote:
 Then they're fundamentally separate, and they belong in separate
 repos. Do you actually enforce that one file == one component
 everywhere?

No, not quite. One-file components exist, but the typical component is
smallish.

Point is, there has never been parallel development on any of the
components so git hasn't created any issues.


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


Re: hg, git, fossil, ...

2014-08-29 Thread Marko Rauhamaa
Lele Gaifax l...@metapensiero.it:

 Well, even conceding the file specialty, and more than that acknowledging
 the extraordinary beauty of the darcs model, it too considers a patch
 spanning several files as an atomic operation.

Yes. Darcs wants to get it right.

 So, even if it makes very very easy to cherry-pick a given
 changeset, it still insist in carrying in all the changes it involves:
 in your scenario, you'd still need to withdraw the (unwanted)
 modifications applied to the other files, recording an additional
 changeset with the reverts.

Darcs would probably be perfect, conceptually. According to rumors (the
Wikipedia article, for example), that rigor can come with a severe
performance penalty.

So we have two approximations of the Darcs ideal: file-level and
repo-level. The repo-level approximation is over-protective, the
file-level approximation is under-protective. I prefer the slight
under-protection to over-protection. (I guess that's I'm using Python in
the first place.)


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


Manually uninstall python 3.4.1 x64

2014-08-29 Thread Curtis Clauson

Python v3.4.1 x64 on Windows 7 x64.

I've a situation where the c:/Python34 directory was irrecoverably deleted.

When I run the python-3.4.1.amd64.msi installer and choose Remove, it 
gives me a dialog saying a required file is missing about halfway 
through. It gives me no clue as to what this file is.


If I choose Repair, it gives me a dialog saying The specified account 
already exists about halfway through. Totally cryptic.


If I choose Change and either select that all features or no features 
will be installed, it gives me a dialog saying The specified account 
already exists about halfway through.


I've tried hunting down and deleting every reference to the installation 
directory in the registry but it doesn't change this problem. I am 
completely unable to install, uninstall, or repair python.


Is there a resource that will completely uninstall python without 
requiring that any of the previously installed files exist, or that 
gives complete instructions on how to manually remove enough so that the 
installer will work again?


Any assistance with this issue would be greatly appreciated.
--
https://mail.python.org/mailman/listinfo/python-list


Re: python 3.4 use python-gcm can't import

2014-08-29 Thread Frank Liou
what?

So...My 3.4 can't use this package?

now 

i use http.client

reg_ids = []
reg_ids.append(GetCustomerGCMId[0])
API_KEY = 'xxx'
mydata = {'registration_ids': reg_ids, 'data': data}
jqs = json.dumps(mydata)
headers = {Content-type: application/json, Authorization: 
key=+API_KEY}
conn = http.client.HTTPConnection('android.googleapis.com')
conn.request('POST', '/gcm/send', jqs, headers)
res = conn.getresponse()
conn.close()
reason = res.reason
read = res.read().decode()
headers = res.headers
result = {'msg': res.status, 'reason': str(res.reason), 'read': 
str(res.read())}


i got status only 200 ok

and body is b' .is empty

i'm so confused.don't know it work or not
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: To automate email login through browser

2014-08-29 Thread Beau Taylor
Have you tried Selenium Python? http://selenium-python.readthedocs.org/

Beau

On Fri, Aug 29, 2014 at 4:11 PM, subin alex alexkutt...@gmail.com wrote:

 Hi Guys,

 I am very new to python and am trying to  learn python.
 I want to automate my email login through browser,in a way that when my
 computer boots up,it must be automatically logged into my mailbox.

 Please provide your suggestions on this :)

 Thanks  Regards,
 Subin Alex.

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


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


Teatro.io - features preview for web-applications in one click

2014-08-29 Thread Alexey Ermolaev
During developing web-projects, manager always need to test new features. 
Typically, this is done using test servers. Often, manager cannot run a test 
server himself to see new features and has to ask the developers for the help, 
distracting them from their work. Besides purchased test equipment is not 
necessary 90% of the time.

Teatro automatically creates a test server in the cloud for each new feature at 
the time it was added to the project. The manager doesn't need to configure 
anything himself - when developers have prepared a new feature which they want 
to show to their manager, they make changes to the code. Teatro sees these 
changes, launches a personal test server for this concrete feature and sends a 
unique link to the manager. It only remains to follow the link and start 
testing. 

Teatro deploys a dedicated cloud server for each Pull Request (change in the 
code) on GitHub, and provides a comment with the link to the server. No need to 
do anything manually - Teatro automatically creates server specially for each 
branch. Service monitors the new commits and updates code on the server 
automatically.
Thus, you can run any number of parallel test servers under each feature and 
only when it is needed. Servers are not live all the time, and are suspended 
during idle time and do not waste resources.

Access to the service is provided on a monthly subscription basis. Pricing 
depends on a maximum number of parallel servers and projects.

Our features:

- Everything is set automatically, without the participation of developers and 
system administrators
- You can test a few features parallel at any time
- Teatro lets you save money, because no longer need to have your own equipment 
and spend valuable human resources for serving test infrastructure


We offer special prices for early adopters. If you're interested in it, write 
me at ale...@teatro.io
-- 
https://mail.python.org/mailman/listinfo/python-list


PEP440 and pre-releases

2014-08-29 Thread Dave Shawley
So I am super enthused about the acceptance of PEP440 since it provides
some useful structure to the version attribute.  I am trying to reconcile
its usage with my release cycle and ran into a snag.  The release cycle
that I use is pretty simple.

1. A final release version (e.g., 1.1, 1.0.3) is represented by a tag in
   the SCM (currently git)

2. Development releases are incremental additions to the last release
   version but are not necessarily API compatible. They are released
   internally when changes are merged into master.

3. The next final release version is not known until it is released.
   IOW, the decision on which portion of the release segment to bump
   is delayed until it is tagged.

Before PEP-440, we used a scheme like:

N(.N)*[-X-R]

Where ``N(.N)*`` is the most recent release version derived directly from
the SCM tag.  The ``-X-R`` suffix designates a post release that is not
necessarily compatible with the previous final release version.  The
``X`` is the number of commits into master since the last tag and the
``R`` segment is the SCM revision (e.g., git committish).

I cannot figure out how to support not knowing what the next version is
going to be while remaining PEP-440 compliant.  My initial thought was to
use ``.postX`` to track the number of commits ahead of the most recent
tag and stick the SCM revision information in metadata.  The catch is that
post releases are required to be compatible with the final release
identified by the prefix.

Has anyone else run into similar difficulties?  I'm guessing that I am
over-thinking things again and no one really worries about such details.

Any advice (even opinions) very much appreciated.

- dave
--
State and behavior. State and behavior. If it doesn't bundle state
and behavior in a sensible way, it should not be an object, and there
should not be a class that produces it. eevee
-- 
https://mail.python.org/mailman/listinfo/python-list


Keeping python code and database in sync

2014-08-29 Thread Frank Millman
Hi all

Now that I have bitten the bullet and published my repository, I am forced 
to change my working practices (which is a good thing!).

The project is inherently database-driven. The python code expects to find 
certain tables and columns in the database. As I develop new features, I 
sometimes need to modify the database structure. In the bad old days (like 
yesterday) I would just make the modifications and carry on. Now I have to 
be aware that others may have downloaded the project, so I have to consider 
how to ensure that their database is kept up to date.

It is a simple matter to write a program that updates the database 
automatically. The question is, what should trigger such an update? My first 
thought is to use a version number - store a version number in the working 
directory, and have a matching number in the code. If someone downloads the 
latest version, the numbers will no longer match, and I can run the upgrade 
program.

The problem with that is that version numbers are usually reserved for 
tagged releases, but this could happen as the result of any commit in the 
current development cycle.

Any suggestions?

Frank Millman



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


Re: Keeping python code and database in sync

2014-08-29 Thread Rustom Mody
On Friday, August 29, 2014 6:12:06 PM UTC+5:30, Frank Millman wrote:
 Hi all

 Now that I have bitten the bullet and published my repository, I am forced 
 to change my working practices (which is a good thing!).

 The project is inherently database-driven. The python code expects to find 
 certain tables and columns in the database. As I develop new features, I 
 sometimes need to modify the database structure. In the bad old days (like 
 yesterday) I would just make the modifications and carry on. Now I have to 
 be aware that others may have downloaded the project, so I have to consider 
 how to ensure that their database is kept up to date.


There are tools like this
http://alembic.readthedocs.org/en/latest/

It may help to read that to avoid reinvention



 It is a simple matter to write a program that updates the database 
 automatically. The question is, what should trigger such an update? My first 
 thought is to use a version number - store a version number in the working 
 directory, and have a matching number in the code. If someone downloads the 
 latest version, the numbers will no longer match, and I can run the upgrade 
 program.

 The problem with that is that version numbers are usually reserved for 
 tagged releases, but this could happen as the result of any commit in the 
 current development cycle.


I dont think alembic can solve that.
Still it may help to study it
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Keeping python code and database in sync

2014-08-29 Thread Chris Angelico
On Fri, Aug 29, 2014 at 10:42 PM, Frank Millman fr...@chagford.com wrote:
 It is a simple matter to write a program that updates the database
 automatically. The question is, what should trigger such an update? My first
 thought is to use a version number - store a version number in the working
 directory, and have a matching number in the code. If someone downloads the
 latest version, the numbers will no longer match, and I can run the upgrade
 program.

This is a well-known problem, and there's no really perfect solution.
The first thing to consider is: What happens if someone back-levels
the program? If you can afford to say never back-level past a schema
change, then you can simply version the schema, independently of the
code. A simple incrementing integer will do - you don't need a
multipart version number. Then you just have code like this:

# Get the current schema version, or 0 if there's nothing yet
version = db.query(select schema_version from config)
if version  1:
# Brand new database
db.query(create table blah blah)
db.query(create table spam)
# etc
if version  2:
db.query(alter table spam add whatever)

# Add new patch levels here
db.query(update config set schema_version = 2)
else:
throw_really_noisy_error(YOU BACKLEVELLED!)

To add a new patch level, you add a new condition with the next
number, add its code, and change the update statement at the end. So
it'd look like this:

 if version  2:
 db.query(alter table spam add whatever)
+if version  3:
+db.query(create table brand_new_table)

 # Add new patch levels here
-db.query(update config set schema_version = 2)
+db.query(update config set schema_version = 3)
else:
 throw_really_noisy_error(YOU BACKLEVELLED!)

It's fairly straight-forward and readable. You'll sometimes need to go
back and defang old patch code (if you simplify or break stuff), and
you might prefer to keep your patch 0 handling up-to-date (so it
doesn't then have to do all the rest of the patches - have that one
immediately set version and bail out), but that's a basic structure
that's been proven in real-world usage. (Note that the exact code
above might be buggy. I'm recreating from memory and porting to Python
at the same time. But the design intent is there.)

Ideally, you want to minimize churn. Don't do heaps of schema changes
in a short period of time. But this can handle plenty of changes
fairly easily, and it'll handle either incremental changes or big
blocks of them just the same way (if you upgrade from patch level 10
to patch level 35 all at once, it'll just grind through all those
changes one after another).

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


Re: Keeping python code and database in sync

2014-08-29 Thread Frank Millman

Rustom Mody rustompm...@gmail.com wrote in message 
news:1cdf6e52-e09b-40f1-8db1-db6cbbee9...@googlegroups.com...
 On Friday, August 29, 2014 6:12:06 PM UTC+5:30, Frank Millman wrote:
 Hi all

 Now that I have bitten the bullet and published my repository, I am 
 forced
 to change my working practices (which is a good thing!).

 The project is inherently database-driven. The python code expects to 
 find
 certain tables and columns in the database. As I develop new features, I
 sometimes need to modify the database structure. In the bad old days 
 (like
 yesterday) I would just make the modifications and carry on. Now I have 
 to
 be aware that others may have downloaded the project, so I have to 
 consider
 how to ensure that their database is kept up to date.


 There are tools like this
 http://alembic.readthedocs.org/en/latest/

 It may help to read that to avoid reinvention


Thanks for the link, Rustom.

I glanced at it, and it looks very powerful, but I will have to find the 
time to study it at leisure.

In the meantime, Chris' suggestion is simple to implement and adequate for 
my present needs, so I will run with that for now.

Frank



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


Re: Keeping python code and database in sync

2014-08-29 Thread Frank Millman

Chris Angelico ros...@gmail.com wrote in message 
news:CAPTjJmrJBciRuterUKWP=qtqxd8xyqum4nx+ofd-twm5oos...@mail.gmail.com...
 On Fri, Aug 29, 2014 at 10:42 PM, Frank Millman fr...@chagford.com 
 wrote:
 It is a simple matter to write a program that updates the database
 automatically. The question is, what should trigger such an update? My 
 first
 thought is to use a version number - store a version number in the 
 working
 directory, and have a matching number in the code. If someone downloads 
 the
 latest version, the numbers will no longer match, and I can run the 
 upgrade
 program.

 This is a well-known problem, and there's no really perfect solution.
 The first thing to consider is: What happens if someone back-levels
 the program? If you can afford to say never back-level past a schema
 change, then you can simply version the schema, independently of the
 code. A simple incrementing integer will do - you don't need a
 multipart version number.

Thanks, Chris, this sounds ideal for my current requirements.

You mentioned keeping schema changes to a minimum, which I agree with, but 
that is not actually my main problem.

Right now I am writing a tool to allow users to view and modify menu 
definitions. The tool is effectively a form definition, which in my system 
is expressed in xml and stored in the database in the 'sys_form_defns' 
table. The raw xml will be uploaded as part of the commit, and will be 
downloaded when someone pulls the latest version, but it still has to be 
inserted into the database before it is accessible.

It is not a problem - I can use the same mechanism that you described - but 
it will be happening quite a lot until the system settles down.

Frank



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


Re: Keeping python code and database in sync

2014-08-29 Thread Chris Angelico
On Fri, Aug 29, 2014 at 11:31 PM, Frank Millman fr...@chagford.com wrote:
 Right now I am writing a tool to allow users to view and modify menu
 definitions. The tool is effectively a form definition, which in my system
 is expressed in xml and stored in the database in the 'sys_form_defns'
 table. The raw xml will be uploaded as part of the commit, and will be
 downloaded when someone pulls the latest version, but it still has to be
 inserted into the database before it is accessible.

 It is not a problem - I can use the same mechanism that you described - but
 it will be happening quite a lot until the system settles down.

The system I described is intended for cases where each edit builds on
the previous ones - for instance, if patch 4 creates a table and patch
7 adds a column to it, you have to have done them in that order. But
for that XML data, it sounds as if each update completely overwrites
all previous ones - is this right? In that case, I'd simplify it:
after doing all the other patches (anything more complicated than
update this one column can still go through a patching scheme like I
described), you just hard code an overwrite that sets the appropriate
field to the current XML. You don't need to update it through all the
previous states just to get to this one.

Basically, take the simplest approach that will do what you want :)

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


Re: Keeping python code and database in sync

2014-08-29 Thread Frank Millman

Chris Angelico ros...@gmail.com wrote in message 
news:captjjmp68kh5zcxq50pi0yeaaapnqotxybg1+f58mv__xd9...@mail.gmail.com...
 On Fri, Aug 29, 2014 at 11:31 PM, Frank Millman fr...@chagford.com 
 wrote:
 Right now I am writing a tool to allow users to view and modify menu
 definitions. The tool is effectively a form definition, which in my 
 system
 is expressed in xml and stored in the database in the 'sys_form_defns'
 table. The raw xml will be uploaded as part of the commit, and will be
 downloaded when someone pulls the latest version, but it still has to be
 inserted into the database before it is accessible.

 It is not a problem - I can use the same mechanism that you described - 
 but
 it will be happening quite a lot until the system settles down.

 The system I described is intended for cases where each edit builds on
 the previous ones - for instance, if patch 4 creates a table and patch
 7 adds a column to it, you have to have done them in that order. But
 for that XML data, it sounds as if each update completely overwrites
 all previous ones - is this right? In that case, I'd simplify it:
 after doing all the other patches (anything more complicated than
 update this one column can still go through a patching scheme like I
 described), you just hard code an overwrite that sets the appropriate
 field to the current XML. You don't need to update it through all the
 previous states just to get to this one.

 Basically, take the simplest approach that will do what you want :)


I *think* I understand, but let me restate it in my terms just to be sure.

When I have got this menu definition tool working, I will commit. The files 
involved will probably be one or more 'py' files, and one 'xml' file.

Once downloaded, the 'py' files are automatically 'live', because that is 
how python works. But the xml file will just be sitting in a directory. 
*Something* has to trigger running a program that reads the xml file and 
inserts it into the database.

My idea is to put the 'version number check' in the main program 'start.py'. 
If it detects that an upgrade is required, it will display a warning message 
to the user and then run the upgrade program. The same upgrade program can 
handle both 'schema' changes and (for want of a word) 'meta-data' changes 
such as the menu definition.

Frank



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


Re: Keeping python code and database in sync

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 12:12 AM, Frank Millman fr...@chagford.com wrote:
 Once downloaded, the 'py' files are automatically 'live', because that is
 how python works. But the xml file will just be sitting in a directory.
 *Something* has to trigger running a program that reads the xml file and
 inserts it into the database.

I'm not 100% certain of this distinction, but it depends on how your
code gets invoked.

 My idea is to put the 'version number check' in the main program 'start.py'.
 If it detects that an upgrade is required, it will display a warning message
 to the user and then run the upgrade program. The same upgrade program can
 handle both 'schema' changes and (for want of a word) 'meta-data' changes
 such as the menu definition.

Yes... or start.py can do it directly and automatically, just check
and do whatever changes are needed. That's how I'd do it.

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


Re: Keeping python code and database in sync

2014-08-29 Thread Roy Smith
In article mailman.13604.1409316126.18130.python-l...@python.org,
 Frank Millman fr...@chagford.com wrote:

 The project is inherently database-driven. The python code expects to find 
 certain tables and columns in the database. As I develop new features, I 
 sometimes need to modify the database structure. In the bad old days (like 
 yesterday) I would just make the modifications and carry on. Now I have to 
 be aware that others may have downloaded the project, so I have to consider 
 how to ensure that their database is kept up to date.

Yeah, schema migration is an ugly problem.  There's a number of tools to 
help here, most of which reduce the suckitude, but don't eliminate it 
completely.  Some things you might want to look at:

* SQLAlchemy Migrate
* South (django-specific)
* yoyo-migrations
* alembic

Google for python schema migration tools and you'll probably find 
others.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Keeping python code and database in sync

2014-08-29 Thread Jean-Michel Pichavant


- Original Message -
 From: Roy Smith r...@panix.com
 
 Yeah, schema migration is an ugly problem.  There's a number of tools
 to
 help here, most of which reduce the suckitude, but don't eliminate it
 completely.  Some things you might want to look at:
 
 * SQLAlchemy Migrate
 * South (django-specific)
 * yoyo-migrations
 * alembic
 
 Google for python schema migration tools and you'll probably find
 others.

Note that South is now fully integrated in django 1.7 (It's still ugly but it 
has been polished by the django team).
The OP may want to consider moving to such framework, they tend to provide 
working concepts on critical issues when it comes to webapp/database.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be 
privileged. If you are not the intended recipient, please notify the sender 
immediately and do not disclose the contents to any other person, use it for 
any purpose, or store or copy the information in any medium. Thank you.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python 3.4 use python-gcm can't import

2014-08-29 Thread Mark Lawrence

On 29/08/2014 09:35, Frank Liou wrote:

what?

So...My 3.4 can't use this package?

now

i use http.client

 reg_ids = []
 reg_ids.append(GetCustomerGCMId[0])
 API_KEY = 'xxx'
 mydata = {'registration_ids': reg_ids, 'data': data}
 jqs = json.dumps(mydata)
 headers = {Content-type: application/json, Authorization: 
key=+API_KEY}
 conn = http.client.HTTPConnection('android.googleapis.com')
 conn.request('POST', '/gcm/send', jqs, headers)
 res = conn.getresponse()
 conn.close()
 reason = res.reason
 read = res.read().decode()
 headers = res.headers
 result = {'msg': res.status, 'reason': str(res.reason), 'read': 
str(res.read())}


i got status only 200 ok

and body is b' .is empty

i'm so confused.don't know it work or not



Thankfully I've one of my crystal balls back from the menders so I know 
that you're responding to Ian Kelly.  Having said that have you tried 
running the code through 2to3?


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


Re: To automate email login through browser

2014-08-29 Thread Mark Lawrence

On 29/08/2014 09:40, Beau Taylor wrote:

Have you tried Selenium Python? http://selenium-python.readthedocs.org/

Beau



or intersperse your answers when using this list, thank you.


On Fri, Aug 29, 2014 at 4:11 PM, subin alex alexkutt...@gmail.com
mailto:alexkutt...@gmail.com wrote:

Hi Guys,

I am very new to python and am trying to  learn python.
I want to automate my email login through browser,in a way that when
my computer boots up,it must be automatically logged into my mailbox.

Please provide your suggestions on this :)

Thanks  Regards,
Subin Alex.

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



Please bottom post

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


Re: Keeping python code and database in sync

2014-08-29 Thread Skip Montanaro
On Fri, Aug 29, 2014 at 9:54 AM, Roy Smith r...@panix.com wrote:
 Yeah, schema migration is an ugly problem.

It's not really any worse than any other sort of complex data
structure change, is it? If your persistent data lived in a pickle
file, it would likely be as bad or worse.

 ... suckitude ...

Nice word. Let's use it more so my polly app will see it as a common
word and maybe offer it to me in a potential XKCD 936 password. :-)

suckitude suckitude suckitude suckitude suckitude suckitude suckitude

:-)

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


suckitude classifications [was Re: Keeping python code and database in sync]

2014-08-29 Thread Ethan Furman

On 08/29/2014 10:04 AM, Skip Montanaro wrote:

On Fri, Aug 29, 2014 at 9:54 AM, Roy Smith r...@panix.com wrote:

Yeah, schema migration is an ugly problem.


It's not really any worse than any other sort of complex data
structure change, is it? If your persistent data lived in a pickle
file, it would likely be as bad or worse.


... suckitude ...


Nice word. Let's use it more so my polly app will see it as a common
word and maybe offer it to me in a potential XKCD 936 password. :-)

suckitude suckitude suckitude suckitude suckitude suckitude suckitude


Speaking of suckitude, we could classify technologies that way:

xml: major suckitude

rpc: no suckitude

python: negative suckitude

oh, and suckitude is neither cruft nor corpus !

Polly want a cracker?  ;)

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: Manually uninstall python 3.4.1 x64

2014-08-29 Thread Tim Golden

On 29/08/2014 09:19, Curtis Clauson wrote:

Python v3.4.1 x64 on Windows 7 x64.

I've a situation where the c:/Python34 directory was irrecoverably deleted.

When I run the python-3.4.1.amd64.msi installer and choose Remove, it
gives me a dialog saying a required file is missing about halfway
through. It gives me no clue as to what this file is.

If I choose Repair, it gives me a dialog saying The specified account
already exists about halfway through. Totally cryptic.

If I choose Change and either select that all features or no features
will be installed, it gives me a dialog saying The specified account
already exists about halfway through.

I've tried hunting down and deleting every reference to the installation
directory in the registry but it doesn't change this problem. I am
completely unable to install, uninstall, or repair python.

Is there a resource that will completely uninstall python without
requiring that any of the previously installed files exist, or that
gives complete instructions on how to manually remove enough so that the
installer will work again?


Unfortunately I don't think there's a simple answer to this one. (Altho' 
I'm not an MSI expert and I'd be very happy to be overruled). 
msiexec.exe, which is the program which actually runs the MSIs, has a 
number of options you can invoke, including a verbose logging option. 
You can see them all by doing:


  msiexec /?

or, presumably some MSDN page with the same information.

Some things which might be worth trying include:

  msiexec /log whatever.log python-xx-yy.msi

to log verbosely, in the hope that some missing or present file or 
registry might show up. And/or playing with the Repair Options to narrow 
things down.


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


Re: Keeping python code and database in sync

2014-08-29 Thread Ben Finney
Roy Smith r...@panix.com writes:

 Yeah, schema migration is an ugly problem. There's a number of tools
 to help here, most of which reduce the suckitude, but don't eliminate
 it completely. Some things you might want to look at:

 * SQLAlchemy Migrate
 * alembic

I can strongly recommend SQLAlchemy. It has several levels of working
with the RDBMS, and they all work well together; you can code primarily
to one API and occasionally use a different part, and it all works
together.

I've never used Alembic, but it is a migration tool built on SQLAlchemy.

 * South (django-specific)

It's worth noting the South is no longer developed as a separate
library:

Please note that South is now end of lifed in favour of the new
migrations framework in Django 1.7, which is based on South but with
significant design improvements. South will not work with Django
1.7; it supports only versions 1.4, 1.5 and 1.6.

URL:http://south.aeracode.org/

-- 
 \ “I think Western civilization is more enlightened precisely |
  `\ because we have learned how to ignore our religious leaders.” |
_o__)—Bill Maher, 2003 |
Ben Finney

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


Typing help brings up a screen that says type help()

2014-08-29 Thread Seymore4Head
What is the logic behind that?
Couldn't help do the same thing as help()?
But the reason I ask is that I see (from a video of Getting Started
with Python) that older versions of python would allow ? as help.  I
get syntax error when I try ?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Joel Goldstick
On Fri, Aug 29, 2014 at 4:40 PM, Seymore4Head
Seymore4Head@hotmail.invalid wrote:
 What is the logic behind that?

It would seem that help() is a function.  You are in the python shell
when you type it, and it runs the function that displays help.

 Couldn't help do the same thing as help()?
 But the reason I ask is that I see (from a video of Getting Started
 with Python) that older versions of python would allow ? as help.  I
 get syntax error when I try ?
 --
 https://mail.python.org/mailman/listinfo/python-list



-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Joel Goldstick
Your invalid email address is annoying to anyone who uses gmail to
respond to this group.  It requires send all, and every time I answer
you, I get a mail notice telling me about your bad email address.
What exactly is the reason you don't supply a correct address?
-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Why is w9xpopen.exe bundled with Python 2.7 on Windows?

2014-08-29 Thread ps16thypresenceisfullnessofjoy
According to the message box that appears when it is run, w9xpopen.exe is only 
used on Windows 95/98. If that is the case, why it is still included in Python 
2.7, since Python 2.5.4 is the last version that works on Windows 9x?

I've been excluding w9xpopen.exe in my py2exe setup script for my Python 
application, since my app won't run on Windows 9x anyway. Is there still some 
good reason to include it that I'm not aware of?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Seymore4Head
On Fri, 29 Aug 2014 17:15:11 -0400, Joel Goldstick
joel.goldst...@gmail.com wrote:

Your invalid email address is annoying to anyone who uses gmail to
respond to this group.  It requires send all, and every time I answer
you, I get a mail notice telling me about your bad email address.
What exactly is the reason you don't supply a correct address?

Yes.  There are some kooky people on the Internet.  There are also
spammers.  IMO there are more reasons not to use real email or real
name than vaild reasons to use it.

It is not my intention to annoy sane people.
Sorry
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 7:15 AM, Joel Goldstick
joel.goldst...@gmail.com wrote:
 Your invalid email address is annoying to anyone who uses gmail to
 respond to this group.  It requires send all, and every time I answer
 you, I get a mail notice telling me about your bad email address.
 What exactly is the reason you don't supply a correct address?

Gmail does *not* require reply all, and even if you do use it, you
can delete his address. Please don't always use reply-all - it ends up
accumulating superfluous destination addresses.

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


Re: Keeping python code and database in sync

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 3:04 AM, Skip Montanaro s...@pobox.com wrote:
 On Fri, Aug 29, 2014 at 9:54 AM, Roy Smith r...@panix.com wrote:
 Yeah, schema migration is an ugly problem.

 It's not really any worse than any other sort of complex data
 structure change, is it? If your persistent data lived in a pickle
 file, it would likely be as bad or worse.

Well, correct. The problem isn't because it's in a database; the
problem is a consequence of persistent structured data that can get
out of sync.

It's easy to solve in a simple way that breaks on any sort of
confusion. It takes a bit more complexity (like the scheme I
suggested) to handle a few more cases. It takes a lot more complexity
(like the migration tools Roy listed) to cope with lots of awkward
cases (I suspect at least some of them will handle back-levelling,
which my scheme doesn't). And I doubt any of them is absolutely
perfect.

 ... suckitude ...

 Nice word. Let's use it more so my polly app will see it as a common
 word and maybe offer it to me in a potential XKCD 936 password. :-)

 suckitude suckitude suckitude suckitude suckitude suckitude suckitude


Yeah, it's a great word. As a general rule, suckitude increases with
the square of design complexity and superlinearly with number of bugs.
I'm not sure how suckitude is affected by bugs, exactly; possibly O(N
log N), because each bug has a small probability of affecting another
bug.

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


Re: suckitude classifications [was Re: Keeping python code and database in sync]

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 5:02 AM, Ethan Furman et...@stoneleaf.us wrote:
 Speaking of suckitude, we could classify technologies that way:

 xml: major suckitude

 rpc: no suckitude

 python: negative suckitude

I disagree with your last two qualifications. RPC still sucks, just
not as much as some things do. And your last statement implies that
Python actually fixes other problems, which violates one of the
fundamental laws of physics: the Law of Conservation of Suckitude and
Frustration. It's possible to reduce suckitude in one system by
shifting it to another system, and it's possible to overall reduce
suckitude in the universe by engaging in a very frustrating job, but
merely combining two entities cannot actively reduce suckitude. Of
course, sometimes you can wrap the suckitude up in another layer, thus
reducing *apparent* suckitude, and this can make a system safer to
use; but maintenance on the wrapper layer will reveal that nothing has
been destroyed.

Hello, Polly!

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


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Joel Goldstick
On Fri, Aug 29, 2014 at 6:22 PM, Chris Angelico ros...@gmail.com wrote:
 On Sat, Aug 30, 2014 at 7:15 AM, Joel Goldstick
 joel.goldst...@gmail.com wrote:
 Your invalid email address is annoying to anyone who uses gmail to
 respond to this group.  It requires send all, and every time I answer
 you, I get a mail notice telling me about your bad email address.
 What exactly is the reason you don't supply a correct address?

 Gmail does *not* require reply all, and even if you do use it, you
 can delete his address. Please don't always use reply-all - it ends up
 accumulating superfluous destination addresses.

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

On this list I use reply all (using gmail) because reply takes the
first recipient, which is the poster.  I am on another list where this
isn't true.

-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 8:40 AM, Joel Goldstick
joel.goldst...@gmail.com wrote:
 On this list I use reply all (using gmail) because reply takes the
 first recipient, which is the poster.  I am on another list where this
 isn't true.

Yes, and I've been on a few lists that have gone through the
discussion of why it should be one way or the other way.

The biggest problem is that Gmail doesn't have a reply to list
option to select as the default. (Nor do a number of other mail
clients; I'm not knocking Gmail specifically here, but it's what
several of us use, so it's the example I'm discussing.) In the absence
of such, there are basically four possibilities:

1) The list can be set to send replies to the list
1a) You might want to send to the list
1b) You might want to send a private message
2) The list can be set to send replies to the original poster
2a) As above
2b) As above
3) The list can also be set to send replies somewhere else, but that's
not germane to this discussion.

In case 1a, it's easy. Everything happens as it should. In case 2b,
it's also easy. You hit reply, it goes to the original poster, like
you want. So how do we handle the cross cases?

Case 2a is what python-list and Savoynet are set to. You want to reply
to the list? Hit Reply-All and then remove the original poster, or hit
Reply and change the destination. (That's a great option if you have
only one list. It's a terrible option if you have as many lists as I
have, because you'll change the destination wrongly.)

Case 1b is how I set up the Gilbert  Sullivan Society Committee
mailing list. It's meant primarily to be for discussions amongst a
small group (the committee consists of maybe a dozen people), and most
of them are not particularly technically adept (the GS Society is an
artistic society (we perform light opera/operetta), so most of the
people who run it are artistic people, although we have for example a
treasurer who's an accountant); sending replies to the list makes the
most sense, and keeps the discussion where it needs to be. But how do
you go about sending a private reply? It's unusual on the committee
list, but it does happen; and you have to hit Reply or Reply-All, then
delete the list's name and manually copy and paste (or retype!) the
sender's address. This is VERY error-prone. It's really easy to
accidentally tell the list what was supposed to be private. The bigger
the list, the more common private replies will tend to be.

I would advise huge lists of unrelated people (python-list, Savoynet,
any general interest group) to have replies go to the poster, and
small lists of closely related people can consider having replies to
the list by default. But of course, there'll be exceptions either way.

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


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Joel Goldstick
On Fri, Aug 29, 2014 at 6:54 PM, Chris Angelico ros...@gmail.com wrote:
 On Sat, Aug 30, 2014 at 8:40 AM, Joel Goldstick
 joel.goldst...@gmail.com wrote:
 On this list I use reply all (using gmail) because reply takes the
 first recipient, which is the poster.  I am on another list where this
 isn't true.

 Yes, and I've been on a few lists that have gone through the
 discussion of why it should be one way or the other way.

 The biggest problem is that Gmail doesn't have a reply to list
 option to select as the default. (Nor do a number of other mail
 clients; I'm not knocking Gmail specifically here, but it's what
 several of us use, so it's the example I'm discussing.) In the absence
 of such, there are basically four possibilities:

 1) The list can be set to send replies to the list
 1a) You might want to send to the list
 1b) You might want to send a private message
 2) The list can be set to send replies to the original poster
 2a) As above
 2b) As above
 3) The list can also be set to send replies somewhere else, but that's
 not germane to this discussion.

 In case 1a, it's easy. Everything happens as it should. In case 2b,
 it's also easy. You hit reply, it goes to the original poster, like
 you want. So how do we handle the cross cases?

 Case 2a is what python-list and Savoynet are set to. You want to reply
 to the list? Hit Reply-All and then remove the original poster, or hit
 Reply and change the destination. (That's a great option if you have
 only one list. It's a terrible option if you have as many lists as I
 have, because you'll change the destination wrongly.)

 Case 1b is how I set up the Gilbert  Sullivan Society Committee
 mailing list. It's meant primarily to be for discussions amongst a
 small group (the committee consists of maybe a dozen people), and most
 of them are not particularly technically adept (the GS Society is an
 artistic society (we perform light opera/operetta), so most of the
 people who run it are artistic people, although we have for example a
 treasurer who's an accountant); sending replies to the list makes the
 most sense, and keeps the discussion where it needs to be. But how do
 you go about sending a private reply? It's unusual on the committee
 list, but it does happen; and you have to hit Reply or Reply-All, then
 delete the list's name and manually copy and paste (or retype!) the
 sender's address. This is VERY error-prone. It's really easy to
 accidentally tell the list what was supposed to be private. The bigger
 the list, the more common private replies will tend to be.

 I would advise huge lists of unrelated people (python-list, Savoynet,
 any general interest group) to have replies go to the poster, and
 small lists of closely related people can consider having replies to
 the list by default. But of course, there'll be exceptions either way.

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

That was enlighting Chris.  I apologize to list readers if they are
getting two versions of everything I send.  I don't get two versions
sent to me, so I assumed others wouldn't either.  I'm not sure why I
assumed that, as it really doesn't make sense.  Maybe gmail filters
one of them for me.  Anyway, I'll do reply all and delete the OP.

-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 9:02 AM, Joel Goldstick
joel.goldst...@gmail.com wrote:
 That was enlighting Chris.  I apologize to list readers if they are
 getting two versions of everything I send.  I don't get two versions
 sent to me, so I assumed others wouldn't either.  I'm not sure why I
 assumed that, as it really doesn't make sense.  Maybe gmail filters
 one of them for me.  Anyway, I'll do reply all and delete the OP.

I think Mailman is set to not send duplicates if it notices a
destination in the headers, so anyone who receives the mailing list
won't get two copies. But people who read the corresponding newsgroup
will be getting one copy in news and another copy in email.

But hey. You didn't know that what you were doing could annoy people,
and as soon as you found out, you changed. That puts you better than,
sadly, a lot of people on this list...

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


Re: suckitude classifications [was Re: Keeping python code and database in sync]

2014-08-29 Thread Roy Smith
In article mailman.13623.1409351910.18130.python-l...@python.org,
 Chris Angelico ros...@gmail.com wrote:

 On Sat, Aug 30, 2014 at 5:02 AM, Ethan Furman et...@stoneleaf.us wrote:
  Speaking of suckitude, we could classify technologies that way:
 
  xml: major suckitude
 
  rpc: no suckitude
 
  python: negative suckitude
 
 I disagree with your last two qualifications. RPC still sucks, just
 not as much as some things do.

Are we talking the generic concept of Remote Procedure Calls, or the 
specific implementation of Sun RPC?

I'm surprised at the reaction to the word, as if it were something new.  
I thought the term has been in common parlance for many years.  Contrast 
with winitude.

Anyway, I think it is unfair to describe xml as major suckitude.  True, 
it is somewhat outdated, with more modern alternatives such as JSON, 
YAML, protobuffers, etc.  In its day, however, it was a breakthrough 
technology, even if only an incremental outgrowth of SGML.
-- 
https://mail.python.org/mailman/listinfo/python-list


python-dateutil suggestiopn

2014-08-29 Thread Skip Montanaro
It doesn't look like Gustavo Niemeyer is actively working on
python-dateutil. Tomi Pievilaeinen is listed on PyPI as the author, but I
have no email address for him, so I'm tossing this message in a bottle out
into the Gulf Stream in hopes that Gustavo or Tomi notice it.

I'm using imaplib to download and process messages from Gmail. I use
dateutil.parser.parse to parse the Date header into a datetime object, then
use the most recent date I've seen to decide where to start up on the next
run.

Every once in awhile, I encountered a Date header I couldn't parse. The
couple I've seen so far have the same problem: two different spellings of
the timezone offset.

Sat, 23 Aug 2014 16:42:08 -0700 (GMT-07:00)
Fri, 22 Aug 2014 18:14:46 -0700 (GMT-07:00)

Discarding the extra timezone info in the (GMT-07:00) suffix makes the
string parseable:

 dateutil.parser.parse('Sat, 23 Aug 2014 16:42:08 -0700 (GMT-07:00)')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /Users/skip/.local/lib/python2.7/site-packages/dateutil/parser.py,
line 748, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
  File /Users/skip/.local/lib/python2.7/site-packages/dateutil/parser.py,
line 310, in parse
res, skipped_tokens = self._parse(timestr, **kwargs)
TypeError: 'NoneType' object is not iterable
 dateutil.parser.parse('Sat, 23 Aug 2014 16:42:08 -0700')
datetime.datetime(2014, 8, 23, 16, 42, 8, tzinfo=tzoffset(None, -25200))

I suppose I could work around the problem, but it occurs so rarely, it's
just easier to discard that particular date. This would seem to be low
priority for Tomi and Gustavo, but thought that if it was an easy change it
might be worthwhile.

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


Re: suckitude classifications [was Re: Keeping python code and database in sync]

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 9:19 AM, Roy Smith r...@panix.com wrote:
 In article mailman.13623.1409351910.18130.python-l...@python.org,
  Chris Angelico ros...@gmail.com wrote:

 On Sat, Aug 30, 2014 at 5:02 AM, Ethan Furman et...@stoneleaf.us wrote:
  Speaking of suckitude, we could classify technologies that way:
 
  xml: major suckitude
 
  rpc: no suckitude
 
  python: negative suckitude

 I disagree with your last two qualifications. RPC still sucks, just
 not as much as some things do.

 Are we talking the generic concept of Remote Procedure Calls, or the
 specific implementation of Sun RPC?

I was thinking of XML-RPC, a particular protocol. Although the generic
concept of remotely calling something isn't entirely free of suckitude
- it's all very well in its way, but like everything else, it has its
flaws. In systems that completely hide the details and make it look
identical to local procedure calls, you have the same problem as
creating a Python property that does a lot of work (wait, that call
actually goes out over the network??), and in systems that make it
more clear that this is a network transaction, it's not really a
remote procedure call any more, it's a network action like any other.
But these are small nitpicks. Enough that I'd say minor suckitude or
slight suckitude, but not no suckitude.

 I'm surprised at the reaction to the word, as if it were something new.
 I thought the term has been in common parlance for many years.  Contrast
 with winitude.

It has. It's just that Skip's Polly has never heard the word before,
so we're teaching her.

 Anyway, I think it is unfair to describe xml as major suckitude.  True,
 it is somewhat outdated, with more modern alternatives such as JSON,
 YAML, protobuffers, etc.  In its day, however, it was a breakthrough
 technology, even if only an incremental outgrowth of SGML.

I've never used XML for anything that wasn't mandated by some other
end, and in every single one of those cases, JSON would have been a
much better fit for the data structure. XML is frequently shoehorned
into carrying array data like this:

root
entryheadingfoo/headingsubentrytext/subentrysubentrymore
text/subentrysubentryblah/subentry/entry
entryheadingbar/headingsubentryonly one element/subentry/entry
/root

In JSON, this would be:

{entry:[
{heading:foo,subentry:[text,more text,blah]},
{heading:bar,subentry:[only one element]}
]}

But in XML, there's no way to represent lists/arrays at all, and the
usual way of fitting them in doesn't allow you to distinguish
one-element lists from text strings (compare the heading entry).

So what's the value of XML for information storage? What's it being
compared against that makes it look good? And above all, why do people
still use it when JSON and other formats are available and well known?

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


Re: python-dateutil suggestiopn

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 9:35 AM, Skip Montanaro s...@pobox.com wrote:
 I'm using imaplib to download and process messages from Gmail. I use
 dateutil.parser.parse to parse the Date header into a datetime object, then
 use the most recent date I've seen to decide where to start up on the next
 run.

 Every once in awhile, I encountered a Date header I couldn't parse. The
 couple I've seen so far have the same problem: two different spellings of
 the timezone offset.

 Sat, 23 Aug 2014 16:42:08 -0700 (GMT-07:00)
 Fri, 22 Aug 2014 18:14:46 -0700 (GMT-07:00)

That's an RFC 822 comment attached to the Date header. I've no idea
why you're seeing that - which client feels the need to adorn the date
like that??? - but I think it would be appropriate to remove anything
in parentheses before attempting to parse the date.

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


Re: python-dateutil suggestiopn

2014-08-29 Thread Mark Lawrence

On 30/08/2014 00:35, Skip Montanaro wrote:

It doesn't look like Gustavo Niemeyer is actively working on
python-dateutil. Tomi Pievilaeinen is listed on PyPI as the author, but
I have no email address for him, so I'm tossing this message in a bottle
out into the Gulf Stream in hopes that Gustavo or Tomi notice it.

I'm using imaplib to download and process messages from Gmail. I use
dateutil.parser.parse to parse the Date header into a datetime object,
then use the most recent date I've seen to decide where to start up on
the next run.

Every once in awhile, I encountered a Date header I couldn't parse. The
couple I've seen so far have the same problem: two different spellings
of the timezone offset.

 Sat, 23 Aug 2014 16:42:08 -0700 (GMT-07:00)
 Fri, 22 Aug 2014 18:14:46 -0700 (GMT-07:00)

Discarding the extra timezone info in the (GMT-07:00) suffix makes the
string parseable:

  dateutil.parser.parse('Sat, 23 Aug 2014 16:42:08 -0700 (GMT-07:00)')
Traceback (most recent call last):
   File stdin, line 1, in module
   File
/Users/skip/.local/lib/python2.7/site-packages/dateutil/parser.py,
line 748, in parse
 return DEFAULTPARSER.parse(timestr, **kwargs)
   File
/Users/skip/.local/lib/python2.7/site-packages/dateutil/parser.py,
line 310, in parse
 res, skipped_tokens = self._parse(timestr, **kwargs)
TypeError: 'NoneType' object is not iterable
  dateutil.parser.parse('Sat, 23 Aug 2014 16:42:08 -0700')
datetime.datetime(2014, 8, 23, 16, 42, 8, tzinfo=tzoffset(None, -25200))

I suppose I could work around the problem, but it occurs so rarely, it's
just easier to discard that particular date. This would seem to be low
priority for Tomi and Gustavo, but thought that if it was an easy change
it might be worthwhile.

Skip



The Gulf Stream is not likely to reach a large enough audience, I 
suggest you expand the numbers by trying the North Atlantic Drift.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


Re: Keeping python code and database in sync

2014-08-29 Thread Skip Montanaro
On Aug 29, 2014 5:34 PM, Chris Angelico ros...@gmail.com wrote:

 I'm not sure how suckitude is affected by bugs, exactly; possibly O(N
 log N), because each bug has a small probability of affecting another
 bug.

OTOH, bug fixes often have a fairly high probability of adding more bugs to
the system, especially if your test suite isn't up to snuff.

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


Re: Keeping python code and database in sync

2014-08-29 Thread Ethan Furman

On 08/29/2014 04:47 PM, Skip Montanaro wrote:

On Aug 29, 2014 5:34 PM, Chris Angelico wrote:


I'm not sure how suckitude is affected by bugs, exactly; possibly O(N
log N), because each bug has a small probability of affecting another
bug.


OTOH, bug fixes often have a fairly high probability of adding more bugs to the 
system, especially if your test suite


Major suckitude !!  must be O(N**2) at least!

[Thus endeth my attempts to train Skip's Polly.  But I am curious -- if 'suckitude' is in immediate contact with 
punctuation such as just now, or at the end of a sentence, does it not count?  That would be suckitude indeed! ;) ]


--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: Why is w9xpopen.exe bundled with Python 2.7 on Windows?

2014-08-29 Thread Terry Reedy

On 8/29/2014 6:08 PM, ps16thypresenceisfullnessof...@gmail.com wrote:

According to the message box that appears when it is run,
w9xpopen.exe is only used on Windows 95/98. If that is the case, why
it is still included in Python 2.7,


Please be more specific as to python installer source, python version, 
and location. I do not see it in my 2.7.8 directory installed by the psf 
.msi installer.


--
Terry Jan Reedy

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


Re: Why is w9xpopen.exe bundled with Python 2.7 on Windows?

2014-08-29 Thread ps16thypresenceisfullnessofjoy
On Friday, August 29, 2014 8:54:47 PM UTC-4, Terry Reedy wrote:
 Please be more specific as to python installer source, python version, 
 
 and location. I do not see it in my 2.7.8 directory installed by the psf 
 
 .msi installer.

I'm also using the Python 2.7.8 MSI installer from the PSF, but the 32-bit 
version of it. The file is in the top-level Python27 directory.
I just checked, and a 64-bit installation of Python 2.7 that I have access to 
doesn't contain w9xpopen.exe. Are you using the 64-bit version?
I don't see the need for it in the 32-bit version either, unless there's a 
reason I'm not aware of.

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


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Terry Reedy

On 8/29/2014 4:40 PM, Seymore4Head wrote:

What is the logic behind that?


You should better ask, How does that happen?.  Attend carefully and 
you should learn much.


In expressions, python replaces names with the object the name is bound 
to. In batch mode, a bare name is equivalent to 'pass'.  In interactive 
mode, a bare name is equivalent to print(repr(name)).


 s = 'abc'
 s
'abc'
 print(str(s))
abc
 print(repr(s))
'abc'

This is a handy shortcut. repr(name) in turn, is also a shortcut.  It 
looks for the .__repr__ attribute of type(name) or one of the 
superclasses.  If there in no override in the inheritance tree, you see 
the default from object:


 object()
object object at 0x001B2C70

You have probably seen this pattern already. Now, what is the class of 
the object bound to 'help' (and 'quit' and 'exit')?


 type(help)
class '_sitebuiltins._Helper'
 type(quit)
class '_sitebuiltins.Quitter'
 type(exit)
class '_sitebuiltins.Quitter'

Each of these classes has a .__repr__ method and a .__call__ method. 
The first simply echoes a fixed string regardless of input.


 type(help).__repr__(object())
'Type help() for interactive help, or help(object) for help about object.'

We can play the same game with python code.

 class Helper:
def __repr__(self):
		return 'Type myhelp() for interactive help, or myhelp(object) for help 
about object.'

def __call__(self, arg):
help(arg)

 myhelp = Helper()
 myhelp
Type myhelp() for interactive help, or myhelp(object) for help about object.
 myhelp(Helper)
Help on class Helper in module __main__:

class Helper(builtins.object)
 |  Methods defined here:
 |
 |  __call__(self, arg)
 |
 |  __repr__(self)
 |
 |  --
 |  Data descriptors defined here:
 |
 |  __dict__
 |  dictionary for instance variables (if defined)
 |
 |  __weakref__
 |  list of weak references to the object (if defined)



Couldn't help do the same thing as help()?


Couldn't python stab people in the back by violating its own rules ;-?

(See the doc for what repr and hence .__repr__ are supposed to do.)

You should now understand that the interpreter has *no special 
knowledge* about help, exit, or quit.  The special behavior is built 
into their classes.  That is how Python objects work in relation to a 
few simple syntax rules, like callable(args) meaning 'call callable 
with args'.


 older versions of python would allow ? as help.

If I ever knew that, I have forgotten.  The interpreter must have 
treated '?' as a special case for interactive input. I suspect help was 
changed when quit and exit were added.


--
Terry Jan Reedy

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


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Zachary Ware
On Fri, Aug 29, 2014 at 8:41 PM, Terry Reedy tjre...@udel.edu wrote:
 On 8/29/2014 4:40 PM, Seymore4Head wrote:
 older versions of python would allow ? as help.

 If I ever knew that, I have forgotten.  The interpreter must have treated
 '?' as a special case for interactive input. I suspect help was changed when
 quit and exit were added.

I don't believe '?' has ever been a feature of Python itself.
However, IPython does use '?' as a syntax for help; you can try it
with the in-browser interpreter at python.org.

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


Re: Keeping python code and database in sync

2014-08-29 Thread Skip Montanaro
On Fri, Aug 29, 2014 at 6:54 PM, Ethan Furman et...@stoneleaf.us wrote:
 Thus endeth my attempts to train Skip's Polly.  But I am curious -- if 
 'suckitude' is in immediate contact with punctuation such as just now, or at 
 the end of a sentence, does it not count?  That would be suckitude indeed! ;)

Thank you all, suckitude made it into the corpus, or cruft, or
dustbin, whatever. :-)

? dict /usr/share/dict/words
accessing accounts adapted adding addressed adds adjusted adjusting
advantages advertised aired akumbo algorithms alister allen allowed
...
subscribed suckitude suffered suggested suggestions suggests suited
...

/usr/share/dict/words really isn't a very good dictionary. Note all
the words that are valid but which get flagged, mostly because they
have common suffixes applied to words. I'll fix that shortly.

Yes, words are skipped if they contain anything other than lower
case alphabetic characters. Really simple words = text.split(), then
discard words not meeting the criteria.

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


Re: Keeping python code and database in sync

2014-08-29 Thread Chris Angelico
On Sat, Aug 30, 2014 at 12:14 PM, Skip Montanaro s...@pobox.com wrote:
 Yes, words are skipped if they contain anything other than lower
 case alphabetic characters. Really simple words = text.split(), then
 discard words not meeting the criteria.

Easy way to catch a few more: Just .strip() off a few common items of
punctuation (quotes (all types), full stop, comma, brackets (all
types), etc). If there are any inside the word, discard the word, but
those at one end or other aren't a problem.

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


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Seymore4Head
On Fri, 29 Aug 2014 21:41:30 -0400, Terry Reedy tjre...@udel.edu
wrote:

On 8/29/2014 4:40 PM, Seymore4Head wrote:
 What is the logic behind that?

You should better ask, How does that happen?.  Attend carefully and 
you should learn much.

In expressions, python replaces names with the object the name is bound 
to. In batch mode, a bare name is equivalent to 'pass'.  In interactive 
mode, a bare name is equivalent to print(repr(name)).

  s = 'abc'
  s
'abc'
  print(str(s))
abc
  print(repr(s))
'abc'

This is a handy shortcut. repr(name) in turn, is also a shortcut.  It 
looks for the .__repr__ attribute of type(name) or one of the 
superclasses.  If there in no override in the inheritance tree, you see 
the default from object:

  object()
object object at 0x001B2C70

You have probably seen this pattern already. Now, what is the class of 
the object bound to 'help' (and 'quit' and 'exit')?

  type(help)
class '_sitebuiltins._Helper'
  type(quit)
class '_sitebuiltins.Quitter'
  type(exit)
class '_sitebuiltins.Quitter'

Each of these classes has a .__repr__ method and a .__call__ method. 
The first simply echoes a fixed string regardless of input.

  type(help).__repr__(object())
'Type help() for interactive help, or help(object) for help about object.'

We can play the same game with python code.

  class Helper:
   def __repr__(self):
   return 'Type myhelp() for interactive help, or myhelp(object) 
 for help 
about object.'
   def __call__(self, arg):
   help(arg)

  myhelp = Helper()
  myhelp
Type myhelp() for interactive help, or myhelp(object) for help about object.
  myhelp(Helper)
Help on class Helper in module __main__:

class Helper(builtins.object)
  |  Methods defined here:
  |
  |  __call__(self, arg)
  |
  |  __repr__(self)
  |
  |  --
  |  Data descriptors defined here:
  |
  |  __dict__
  |  dictionary for instance variables (if defined)
  |
  |  __weakref__
  |  list of weak references to the object (if defined)


 Couldn't help do the same thing as help()?

Couldn't python stab people in the back by violating its own rules ;-?

(See the doc for what repr and hence .__repr__ are supposed to do.)

You should now understand that the interpreter has *no special 
knowledge* about help, exit, or quit.  The special behavior is built 
into their classes.  That is how Python objects work in relation to a 
few simple syntax rules, like callable(args) meaning 'call callable 
with args'.

  older versions of python would allow ? as help.

If I ever knew that, I have forgotten.  The interpreter must have 
treated '?' as a special case for interactive input. I suspect help was 
changed when quit and exit were added.

I think that is more than I wanted to know.  :)
Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Manually uninstall python 3.4.1 x64

2014-08-29 Thread Llelan D.

On 8/29/2014 12:53 PM, Tim Golden wrote:

On 29/08/2014 09:19, Curtis Clauson wrote:

Unfortunately I don't think there's a simple answer to this one. (Altho'
I'm not an MSI expert and I'd be very happy to be overruled).
msiexec.exe, which is the program which actually runs the MSIs, has a
number of options you can invoke, including a verbose logging option.
You can see them all by doing:

   msiexec /?

or, presumably some MSDN page with the same information.

Some things which might be worth trying include:

   msiexec /log whatever.log python-xx-yy.msi

to log verbosely, in the hope that some missing or present file or
registry might show up. And/or playing with the Repair Options to narrow
things down.

TJG


Actually, I do know more than a little about the Windows MSI service and 
application, and had already perused the logs to no avail. All of the 
listed registry keys were deleted without changing the problem. The 
missing file is of no importance since I already know the installation 
directory is deleted. It's just that the installer should normally 
supply that information.


The error messages are Windows System errors that are being caused by 
requirements of the MSI installer file and not the msiexec.exe 
application. The problem is with how the installer is written and not 
the MSI system.


There's always a simple answer to things like this. It's just that the 
simple answers are harder to find in poorly written code.


I randomly poked around the registry a lot more, deleting anything I 
could find referring to Python34 and then the string Python 3.4.1. I 
finally got desperate enough to delete the python installer entries 
under the Windows Installer key (the list of installed applications in 
the Windows Uninstall or Change a Program Control Panel). You know, 
the registry keys you are *NEVER* to use as an indication if the 
application is currently installed because MS constantly corrupts this 
list and can leave your installation in an un-installable, 
un-repairable, and un-removeable state?


Well it worked. The Python installer no longer sees the application as 
installed and happily performs a full installation. I did that, a full 
removal to get rid of any other problems, and a clean installation and 
everything works fine now.


This installer is seriously screwed up and desperately needs a re-write. 
It should use its own key to indicate whether the application is 
installed but should not depend on it in case of a partially 
installed/removed state, should not require any installed file to fully 
repair or remove the application, and should query the user if any 
information required is missing from the installation or registry. In 
other words, the normal MSI installer guidelines.


I hope this is of help to someone out there.

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


Re: Typing help brings up a screen that says type help()

2014-08-29 Thread Steven D'Aprano
Seymore4Head wrote:

 What is the logic behind that?
 Couldn't help do the same thing as help()?

Not without being annoyingly, obnoxiously too clever by half.

In Python, all values are objects, so apart from a handful of statements
(such as if blah blah:, for x in blah: etc.) everything you type in
Python is an object. That includes functions like len() and help() itself.

In the interactive interpreter, hitting Enter with an object on the command
line displays that object. That's the expected behaviour, and so
conveniently the help object is designed to display: 

Type help() for interactive help ...

It does this by having __repr__ and __str__ methods which return the message
we want to be displayed.

Now, it is *technically* possible to have those __repr__ and __str__ methods
automatically call the help object, as if you had typed help() with the
round brackets. But that would be Just Plain Wrong. Python makes a
fundamental distinction between displaying a function or method, and
calling it:

py from random import random
py random
built-in method random of Random object at 0x90f6ca4
py random()
0.016599200602883224

and it would be surprising to break that distinction for the help object. It
would lead to deeply disturbing behaviour. E.g. suppose you ended up
somehow with a list or dict containing the help object, which is quite easy
to do when exploring interactively. For example, in Python 2:

py import __builtin__
py print __builtin__.__dict__

or in Python 3:

py import builtins
py print(builtins.__dict__)

Or even something like this:

py stuff = [len, help, dict]
py print(stuff)

You wouldn't expect those simple commands to launch the help system, would
you? And if they did, it would probably make it difficult to debug exactly
how and why that was happening, since you couldn't print the dict or list
to see what was in it without launching the help system.


 But the reason I ask is that I see (from a video of Getting Started
 with Python) that older versions of python would allow ? as help.  I
 get syntax error when I try ?

Regular Python has never accepted ? however the custom IPython interactive
interpreter does.



-- 
Steven

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


Re: Why is w9xpopen.exe bundled with Python 2.7 on Windows?

2014-08-29 Thread Terry Reedy

On 8/29/2014 9:16 PM, ps16thypresenceisfullnessof...@gmail.com wrote:

On Friday, August 29, 2014 8:54:47 PM UTC-4, Terry Reedy wrote:

Please be more specific as to python installer source, python
version,

and location. I do not see it in my 2.7.8 directory installed by
the psf

.msi installer.


I'm also using the Python 2.7.8 MSI installer from the PSF, but the
32-bit version of it. The file is in the top-level Python27
directory. I just checked, and a 64-bit installation of Python 2.7
that I have access to doesn't contain w9xpopen.exe. Are you using the
64-bit version? I don't see the need for it in the 32-bit version
either, unless there's a reason I'm not aware of.


The tracker has a search function. Searching all issues for 'w9xpopen' 
turned up 15 issues including

http://bugs.python.org/issue2405
The last msg by (benrg) starts on Windows 7 32-bit with COMSPEC 
pointing to command.com, platform.popen('dir').read() works with 
w9xpopen and fails (no output) without it.


http://bugs.python.org/issue14470
In 3.4, we no longer support platforms that set COMSPEC to command.com, 
hence 'BOOM'.


--
Terry Jan Reedy

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


Re: Manually uninstall python 3.4.1 x64

2014-08-29 Thread Terry Reedy

On 8/29/2014 11:26 PM, Llelan D. wrote:


Actually, I do know more than a little about the Windows MSI service and
application, and had already perused the logs to no avail. All of the
listed registry keys were deleted without changing the problem. The
missing file is of no importance since I already know the installation
directory is deleted. It's just that the installer should normally
supply that information.

The error messages are Windows System errors that are being caused by
requirements of the MSI installer file and not the msiexec.exe
application. The problem is with how the installer is written and not
the MSI system.

There's always a simple answer to things like this. It's just that the
simple answers are harder to find in poorly written code.

I randomly poked around the registry a lot more, deleting anything I
could find referring to Python34 and then the string Python 3.4.1. I
finally got desperate enough to delete the python installer entries
under the Windows Installer key (the list of installed applications in
the Windows Uninstall or Change a Program Control Panel). You know,
the registry keys you are *NEVER* to use as an indication if the
application is currently installed because MS constantly corrupts this
list and can leave your installation in an un-installable,
un-repairable, and un-removeable state?

Well it worked. The Python installer no longer sees the application as
installed and happily performs a full installation. I did that, a full
removal to get rid of any other problems, and a clean installation and
everything works fine now.

This installer is seriously screwed up and desperately needs a re-write.
It should use its own key to indicate whether the application is
installed but should not depend on it in case of a partially
installed/removed state, should not require any installed file to fully
repair or remove the application, and should query the user if any
information required is missing from the installation or registry. In
other words, the normal MSI installer guidelines.

I hope this is of help to someone out there.


Please file an issue on the tracker reporting the problem (you are not 
the first!) and your suggested solutions and add steve.dower as nosy. He 
is a MS employee - Python volunteer who has very recently assumed 
maintenance of the msi installer.  He wants to upgrade it.


The installer is build with msilib.  Feel free to take a look at that.

--
Terry Jan Reedy

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


[issue22261] Document how to use Concurrent Build when using MsBuild

2014-08-29 Thread Zachary Ware

Zachary Ware added the comment:

I finally managed to get a review posted on Rietveld, which should have sent 
you an email (sorry for the delay!).

--

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



[issue21720] TypeError: Item in ``from list'' not a string message

2014-08-29 Thread David Szotten

David Szotten added the comment:

not sure i follow. we need a different message if e.g. an integer is passed in

updated the patch to only run the unicode check for non-strings

or do you have a suggestion for an error message that works nicely in both 
cases?

--
Added file: http://bugs.python.org/file36501/fromlist2.patch

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



[issue22296] cookielib uses time.time(), making incorrect checks of expiration times in cookies

2014-08-29 Thread Rebecka

New submission from Rebecka:

The cookielib module uses time.time(), which produces a timestamp in the local 
timezone (as read from the system time?), as the timestamp against which 
expiration dates in cookies are compared.

However, typical usage of HTTP cookies would be specifying the expiration date 
in UTC. This assumption seems to be supported for example by the inclusion of 
cookielib.http2time, which (only) supports UTC timestamps.

This behaviour is also included in e.g. MozillaCookieJar, which (erroneously) 
excludes cookies from being saved/loaded based on the local timestamp from 
time.time().

See the attached file for a small example where the check if a cookie is 
expired against a UTC time is correct but the check against local time fails 
(simulating the behaviour of the cookielib module).

--
components: Library (Lib)
files: cookie_timestamp_test.py
messages: 226056
nosy: regu0004
priority: normal
severity: normal
status: open
title: cookielib uses time.time(), making incorrect checks of expiration times 
in cookies
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36502/cookie_timestamp_test.py

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



[issue22297] json encoding broken for

2014-08-29 Thread Edward O

New submission from Edward O:

_make_iterencode in python2.7/json/encoder.py encodes custom enum types 
incorrectly (the label will be printed without '') because of these lines 
(line 320 in 2.7.6):
elif isinstance(value, (int, long)):
yield buf + str(value)

in constract, _make_iterencode in python 3 explicitly supports the enum types:

elif isinstance(value, int):
# Subclasses of int/float may override __str__, but we still
# want to encode them as integers/floats in JSON. One example
# within the standard library is IntEnum.
yield buf + str(int(value))

--
components: Library (Lib)
messages: 226057
nosy: eddygeek
priority: normal
severity: normal
status: open
title: json encoding broken for
type: behavior
versions: Python 2.7

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



[issue22297] 2.7 json encoding broken for enums

2014-08-29 Thread Edward O

Changes by Edward O edoubray...@gmail.com:


--
title: json encoding broken for - 2.7 json encoding broken for enums

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



[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

2014-08-29 Thread Julius Lehmann-Richter

New submission from Julius Lehmann-Richter:

In Lib/warnings.py the _show_warning function catches IOError with the 
commented intention to ward against an invalid file:

def _show_warning(message, category, filename, lineno, file=None, line=None):
Hook to write a warning to a file; replace if you like.
if file is None:
file = sys.stderr
try:
file.write(formatwarning(message, category, filename, lineno, line))
except IOError:
pass # the file (probably stderr) is invalid - this warning gets lost.

If for some reason the file like object, and in the default case stderr, is 
closed, a calling program is faced with a ValueError, which is not being caught.

It seems to me, and correct me if I am wrong, that a file object which has been 
closed is a case of an invalid file and that the warning subsystem should in 
that case behave in the same manner as in the case of the IOError.

This behavior is the same for python 3.2 with the function renamed to 
showwarning and can be reproduced with for example

from sys import stderr  
from warnings import warn
 
stderr.close()
try:
warn(foo)
except ValueError as e:
print(e)

--
components: Library (Lib)
messages: 226058
nosy: Julius.Lehmann-Richter
priority: normal
severity: normal
status: open
title: Lib/warnings.py _show_warning does not protect against being called with 
a file like object which is closed
type: behavior
versions: Python 2.7, Python 3.2

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



[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint

2014-08-29 Thread Michael Foord

Michael Foord added the comment:

Switching to Mock instead of MagicMock may help, as that doesn't have the magic 
proxies at all. (patch has an argument to specify which class of Mock should be 
used to create the mock object, MagicMock is just the default.)

Other wise using __slots__ would be fine. An alternative approach would be for 
MagicMock to use __getattribute__ instead of the magic proxies.

--

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Kevin Norris

New submission from Kevin Norris:

Run Python as an administrator:

 import pathlib 
 pth = pathlib.Path('//?/C:/foo.')
 pth.mkdir()
 pth.resolve().rmdir()
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\Python34\lib\pathlib.py, line 1141, in rmdir
self._accessor.rmdir(self)
  File C:\Python34\lib\pathlib.py, line 323, in wrapped
return strfunc(str(pathobj), *args)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 
'C:\\foo.'
 pth.rmdir()

You do not need to be an administrator so long as you can create a directory in 
the requested location, but the \\?\ prefix only works with absolute paths so 
it's easier to demonstrate in the root of the drive.

--
components: Library (Lib), Windows
messages: 226060
nosy: Kevin.Norris
priority: normal
severity: normal
status: open
title: resolve() on Windows makes some pathological paths unusable
type: behavior
versions: Python 3.4

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Kevin Norris

Kevin Norris added the comment:

When the directory name is '...', the error is different:

 pth = pathlib.Path('//?/C:/...')
 pth.mkdir()
 pth.resolve().rmdir()
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\Python34\lib\pathlib.py, line 1141, in rmdir
self._accessor.rmdir(self)
  File C:\Python34\lib\pathlib.py, line 323, in wrapped
return strfunc(str(pathobj), *args)
PermissionError: [WinError 5] Access is denied: 'C:\\...'
 pth.rmdir()


--

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



[issue22287] Use clock_gettime() in pytime.c

2014-08-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8e13ad4e5ae6 by Victor Stinner in branch 'default':
Issue #22287: On UNIX, _PyTime_gettimeofday() now uses
http://hg.python.org/cpython/rev/8e13ad4e5ae6

--
nosy: +python-dev

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



[issue22287] Use clock_gettime() in pytime.c

2014-08-29 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue22300] PEP 446 What's New Updates for 2.7.9

2014-08-29 Thread Nick Coghlan

New submission from Nick Coghlan:

The Python 2.7 What's New now has a section recording the feature updates in 
maintenance releases.

Because of the live docs updates, these need to be added on the day of the 
release, rather than being able to be done in advance.

--
assignee: benjamin.peterson
files: pep466_whats_new_py279.diff
keywords: patch
messages: 226063
nosy: benjamin.peterson, ncoghlan
priority: release blocker
severity: normal
stage: commit review
status: open
title: PEP 446 What's New Updates for 2.7.9
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file36503/pep466_whats_new_py279.diff

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



[issue22043] Use a monotonic clock to compute timeouts

2014-08-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 668e0bf30042 by Victor Stinner in branch 'default':
Issue #22043: _PyTime_Init() now checks if the system clock works.
http://hg.python.org/cpython/rev/668e0bf30042

--
nosy: +python-dev

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



[issue22043] Use a monotonic clock to compute timeouts

2014-08-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 76bc15c918b1 by Victor Stinner in branch 'default':
Issue #22043: Simplify time.perf_counter() on Windows
http://hg.python.org/cpython/rev/76bc15c918b1

--

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



[issue22043] Use a monotonic clock to compute timeouts

2014-08-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ab81b4cdc33c by Victor Stinner in branch 'default':
Issue #22043: Oops, fix perf_counter() on UNIX if no monotonic clock is
http://hg.python.org/cpython/rev/ab81b4cdc33c

--

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



[issue22043] Use a monotonic clock to compute timeouts

2014-08-29 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I prepared Python for monotonic clock, I attached an updated patch. It is 
now much simpler.

pymonotonic-3.patch:

* time.monotonic() is now always available

* _PyTime_Init() ensures that the operating system provides a monotonic clock 
and that the clock works

* Python 3.5 now requires a monotonic clock. All operating systems supported by 
Python 3.5 provides a monotonic clock. GNU Hurd doesn't, but it is not 
supported.

* drop try/except ImportError around from time import monotonic

* use a monotonic clock in _thread, gc and socket modules to compute elapsed 
time and timeouts

--
Added file: http://bugs.python.org/file36504/pymonotonic-3.patch

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



[issue22185] Occasional RuntimeError from Condition.notify

2014-08-29 Thread Doug Zongker

Doug Zongker added the comment:

So, what happens now?  What do I need to do to make progress on this?

--

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2014-08-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Are you planning to un-defer the PEP, and remove the Deferral section?

The PEP proposes 5 'phases'. How does that mesh with 2 'steps'?

Gregory's message is helpful to me. The Idle startup needs to be documented 
(AFAIK only code now ) and modified. Internal error messages are 'print'ed to a 
text console that is normally not present on Windows (resulting in an exception 
message that cannot be displayed!).  I want to add a new startup 'service', as 
early as possible, to direct error messages to a gui message box or window. 
This means getting a tkinter event loop running as soon as possible so 
everything after can depend on that.  Perhaps it already is, perhaps not.

--
nosy: +terry.reedy

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



[issue22270] cache version selection for documentation

2014-08-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree that this is a bad idea.

1. Cookies are generally a nuisance. I like the fact that docs.python.org is 
(apparently) cookie free and that python sites only use a few short-lived 
cookies. The complications you propose would be a nuisance to create and 
maintain.

2. Not too long ago, we created docs.python.org/2/ and /3/ so people can use 
generic links to the latest docs for the latest released version of either 
Python 2 or 3. The aim was to reduce the problem of links to stale docs. Both 
sets of docs have version added notes for changes within a series. Those two 
docs are not interchangeable and should not be automatically switched.

If someone links now to a fixed version of the docs, they are either ignorant 
of the new system *or* they have a purpose that should not be over-riden.

If someone quotes or paraphrases a portion of a page (which is a claim about 
what the page says) or otherwise makes a claim about Python, and posts a link 
as evidence of the claim, clicking the link should take one to the 'evidence', 
not one's preferred version.

--
nosy: +terry.reedy
resolution:  - rejected
stage:  - needs patch
status: open - closed
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue6588] insert cookies into cookie jar - cookielib.py

2014-08-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

2.7 does not get enhancements and Lu's comment suggests that the enhancement is 
already in 3.x.

--
nosy: +terry.reedy
resolution:  - out of date
status: open - closed

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



[issue22297] 2.7 json encoding broken for enums

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +ezio.melotti, pitrou, rhettinger
stage:  - test needed

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +pitrou
stage:  - test needed

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Why is it a pathological path? Can you explain?

--
nosy: +steve.dower, tim.golden, zach.ware

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



[issue22298] Lib/warnings.py _show_warning does not protect against being called with a file like object which is closed

2014-08-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

3.1-3.3 only get security fixes. 3.4 outputs write to closed file, so it 
appears to have the same issue. The proposed change seems reasonable to me, as 
a bugfix.

--
nosy: +terry.reedy
stage:  - test needed
versions: +Python 3.4, Python 3.5 -Python 3.2

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



[issue22301] smtplib.SMTP.starttls' documentation is just confusing

2014-08-29 Thread Michele Orrù

New submission from Michele Orrù:

maker hello! In 
https://docs.python.org/2/library/smtplib.html#smtplib.SMTP.starttls I read::
maker If keyfile and certfile are provided, these are passed to the socket 
module’s ssl() function.
maker socket.ssl() exists, though it is not documented (not even in 
/dev/library/socket)
maker and furthermore, the link on ssl() points to the ssl module, which is 
just confusing.
bitdancer maker: open an issue.

(I'm noising ap and chris because afaik they were working on the latest ssl 
security stuff)

--
assignee: docs@python
components: Documentation, Library (Lib), email
messages: 226074
nosy: barry, christian.heimes, docs@python, maker, pitrou, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib.SMTP.starttls' documentation is just confusing
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue22301] smtplib.SMTP.starttls' documentation is just confusing

2014-08-29 Thread Alex Gaynor

Alex Gaynor added the comment:

Attached patch fixes this up.

--
keywords: +needs review, patch
nosy: +alex
Added file: http://bugs.python.org/file36505/t22301.diff

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



[issue22301] smtplib.SMTP.starttls' documentation is just confusing

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - patch review
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue22294] 2to3 consuming_calls: len, min, max, zip, map, reduce, filter, dict, xrange

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue22269] Resolve distutils option conflicts with priorities

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - patch review
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue4277] asynchat's handle_error inconsistency

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

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



[issue22163] max_wbits set incorrectly to -zlib.MAX_WBITS in tarfile, shouldn't be negative

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +lars.gustaebel
stage:  - patch review
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue22141] rlcompleter.Completer matches too much

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - patch review
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue16037] httplib: header parsing is unlimited

2014-08-29 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage: needs patch - patch review
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Steve Dower

Steve Dower added the comment:

Is resolve() using an *A() API rather than *W()? The \\?\ prefix does not work 
with *A() APIs.

Also, names that are all dots are not supported by Windows at all. I'd expect 
mkdir() to fail on that, but the \\?\ prefix disables some validation, so it's 
possible that it is getting through that way.

--

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



[issue16037] httplib: header parsing is unlimited

2014-08-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Looking further, already fixed in 3.x

--
nosy: +terry.reedy
resolution:  - fixed
status: open - closed

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

resolve() should use the *W APIs since it is using only functions from the os 
module with str objects. Perhaps you want to double-check that, since I don't 
have a Windows VM anymore.

--

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



[issue16037] httplib: header parsing is unlimited

2014-08-29 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

Python 3.2 still receives security fixes.

--
resolution: fixed - 
status: closed - open
versions: +Python 3.2 -Python 3.4, Python 3.5

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



[issue22301] smtplib.SMTP.starttls' documentation is just confusing

2014-08-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Or perhaps we should remove the function to wrap_socket(), which is just an 
implementation detail?

--

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread eryksun

eryksun added the comment:

The \\?\ extended-path prefix bypasses normal path processing. The path is 
passed directly to the filesystem driver. For example, to accommodate the POSIX 
namespace, NTFS allows any character except NUL and slash, so it happily 
creates a directory named foo.. This name is invalid in the Win32 namespace. 

resolve() should skip calling _ext_to_normal on the result of _getfinalpathname 
if the input path is extended.

http://hg.python.org/cpython/file/c0e311e010fc/Lib/pathlib.py#l178

--
nosy: +eryksun

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



[issue22299] resolve() on Windows makes some pathological paths unusable

2014-08-29 Thread Steve Dower

Steve Dower added the comment:

Removing the _ext_to_normal() call in resolve() looks like the right fix to me.

--

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



[issue22301] smtplib.SMTP.starttls' documentation is just confusing

2014-08-29 Thread R. David Murray

R. David Murray added the comment:

Remove the reference, you mean?  As in just delete the confusing line?  Since 
we want to encourage people to use the context, that sounds reasonable for 3.x 
at least.

--

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



  1   2   >