ANN: python-ldap 2.4.17

2014-09-27 Thread Michael Ströder
Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.17 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related

Understanding co_lnotab

2014-09-27 Thread Shiyao Ma
When reading the notes on co_lnotab I totally got lost at this line:https://hg.python.org/cpython/file/fd0c02c3df31/Objects/lnotab_notes.txt#l31 It says,In case #b, there's no way to know from looking at the table later how many were written. No way to know what is written? And why no way to

Storage Cost Calculation

2014-09-27 Thread Abohfu venant zinkeng
- Hard drives have been the secondary storage of choice on computers for many years. They have improved in speed, in capacity, and in cost for over 50 years. It's interesting to look at how the prices have dropped, or, conversely, how much storage your money will buy now as

tkinter and gtk problem

2014-09-27 Thread Paula Estrella
Hello, we are working on ubuntu 12.04 LTS; we use gtk to take screenshots and we added a simple interface to select a file using tkFileDialog but it doesn't work; is it possible that tkinter and gtk are incompatible? a test script to open a file with tkFileDialog works fine but if we import gtk

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sat, Sep 27, 2014 at 4:53 AM, Abohfu venant zinkeng vice...@gmail.com wrote: QUESTION Could someone help me with a design and a python program to implement that design to solve the above problem? We are not going to do your homework for you. ChrisA --

Re: tkinter and gtk problem

2014-09-27 Thread Chris Angelico
On Sat, Sep 27, 2014 at 4:15 AM, Paula Estrella pestre...@gmail.com wrote: Hello, we are working on ubuntu 12.04 LTS; we use gtk to take screenshots and we added a simple interface to select a file using tkFileDialog but it doesn't work; is it possible that tkinter and gtk are incompatible? a

Re: tkinter and gtk problem

2014-09-27 Thread dieter
Paula Estrella pestre...@gmail.com writes: Hello, we are working on ubuntu 12.04 LTS; we use gtk to take screenshots and we added a simple interface to select a file using tkFileDialog but it doesn't work; is it possible that tkinter and gtk are incompatible? a test script to open a file with

Re:Leap year

2014-09-27 Thread Dave Angel
Seymore4Head Seymore4Head@Hotmail.invalid Wrote in message: Still practicing. Since this is listed as a Pseudocode, I assume this is a good way to explain something. That means I can also assume my logic is fading with age. http://en.wikipedia.org/wiki/Leap_year#Algorithm cut I didn't

ANN: python-ldap 2.4.17

2014-09-27 Thread Michael Ströder
Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.17 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related

Re: Storage Cost Calculation

2014-09-27 Thread Skip Montanaro
On Sep 27, 2014 1:06 AM, Chris Angelico ros...@gmail.com wrote: We are not going to do your homework for you. Perhaps it was a take home test... What then? :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sat, Sep 27, 2014 at 9:14 PM, Skip Montanaro skip.montan...@gmail.com wrote: On Sep 27, 2014 1:06 AM, Chris Angelico ros...@gmail.com wrote: We are not going to do your homework for you. Perhaps it was a take home test... What then? :-) Then we are not going to do his take home test for

Re: Storage Cost Calculation

2014-09-27 Thread Larry Martell
On Sat, Sep 27, 2014 at 7:18 AM, Chris Angelico ros...@gmail.com wrote: On Sat, Sep 27, 2014 at 9:14 PM, Skip Montanaro skip.montan...@gmail.com wrote: On Sep 27, 2014 1:06 AM, Chris Angelico ros...@gmail.com wrote: We are not going to do your homework for you. Perhaps it was a take

Re: Storage Cost Calculation

2014-09-27 Thread Larry Martell
On Sat, Sep 27, 2014 at 7:18 AM, Chris Angelico ros...@gmail.com wrote: On Sat, Sep 27, 2014 at 9:14 PM, Skip Montanaro skip.montan...@gmail.com wrote: On Sep 27, 2014 1:06 AM, Chris Angelico ros...@gmail.com wrote: We are not going to do your homework for you. Perhaps it was a take

Re: Understanding co_lnotab

2014-09-27 Thread Ned Batchelder
On 9/26/14 7:13 AM, Shiyao Ma wrote: When reading the notes on co_lnotab I totally got lost at this line:https://hg.python.org/cpython/file/fd0c02c3df31/Objects/lnotab_notes.txt#l31 It says,In case #b, there's no way to know from looking at the table later how many were written. No

Re: Understanding co_lnotab

2014-09-27 Thread Skip Montanaro
On Sat, Sep 27, 2014 at 7:08 AM, Ned Batchelder n...@nedbatchelder.com wrote: Just out of curiosity, what are you writing, it sounds interesting! :) Ned would say that. I think he has an unusual fondness for static code analysis tools. :-) Skip --

Re: Storage Cost Calculation

2014-09-27 Thread Ian Kelly
On Fri, Sep 26, 2014 at 12:53 PM, Abohfu venant zinkeng vice...@gmail.com wrote: This site was written by a person (in 2009) who had considered this amazing trend. He collected a lot of data about hard drive capacity and price. The formula he extrapolated by using the data he found is cost

Re: Storage Cost Calculation

2014-09-27 Thread MRAB
On 2014-09-27 15:30, Ian Kelly wrote: On Fri, Sep 26, 2014 at 12:53 PM, Abohfu venant zinkeng vice...@gmail.com wrote: This site was written by a person (in 2009) who had considered this amazing trend. He collected a lot of data about hard drive capacity and price. The formula he extrapolated

Re: Storage Cost Calculation

2014-09-27 Thread Seymore4Head
On Fri, 26 Sep 2014 11:53:32 -0700, Abohfu venant zinkeng vice...@gmail.com wrote: QUESTION - Could someone help me with a design and a python program to implement that design to solve the above problem? As a side note, it would be handy to compare HD cost to CD cost. I am still

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 3:01 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: As a side note, it would be handy to compare HD cost to CD cost. I am still trying to get my own personal copy of the Internet. If you set your sights a bit lower, Google might be able to help. They pretty much

Re: Storage Cost Calculation

2014-09-27 Thread Ian Kelly
On Sat, Sep 27, 2014 at 11:12 AM, Chris Angelico ros...@gmail.com wrote: On Sun, Sep 28, 2014 at 3:01 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: As a side note, it would be handy to compare HD cost to CD cost. I am still trying to get my own personal copy of the Internet. If you

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 3:21 AM, Ian Kelly ian.g.ke...@gmail.com wrote: If you set your sights a bit lower, Google might be able to help. They pretty much have their own copy of the World Wide Web, indexed and cached. I've no idea how many dollars they annually spend on hard drives, but

Python unittesting method call issue

2014-09-27 Thread Milson Munakami
I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the code with in that method i.e. SetPreConditionFirewall() with setup variable

Re: Python unittesting method call issue

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 9:25 AM, Milson Munakami milson...@gmail.com wrote: I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the

Re: Python unittesting method call issue

2014-09-27 Thread Ian Kelly
On Sat, Sep 27, 2014 at 5:25 PM, Milson Munakami milson...@gmail.com wrote: I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the

Question about uninstallation.

2014-09-27 Thread Gregory Johannes-Kinsbourg
Hello, This whole world of Python language is completely new to me (never programmed before in my life) - anyway sort of besides the point. Anyway, I’ve sort of been learning ‘all over the place’, that is to say that ill read something do it and then find out i should have done something else

Re: Question about uninstallation.

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 11:07 AM, Gregory Johannes-Kinsbourg harmonoisemu...@gmail.com wrote: Anyway, I’ve basically ended up installing both Python 2 3 (I’m on OS X 10.10 btw) and first of all was curious to know if they will clash with each when being used in terminal and how do i safely

Re: Storage Cost Calculation

2014-09-27 Thread Steven D'Aprano
MRAB wrote: In 1981 the BBC Micro was released. There were 2 versions, model A with 16K and model B was 32K. The price difference was £100, so that's £100 for 16K of RAM. That doesn't follow. The model A might have been £1 (in which case you could get 16K for £1) or it might have been £1.

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 11:14 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: MRAB wrote: In 1981 the BBC Micro was released. There were 2 versions, model A with 16K and model B was 32K. The price difference was £100, so that's £100 for 16K of RAM. That doesn't follow. The

Re: Python unittesting method call issue

2014-09-27 Thread Steven D'Aprano
Milson Munakami wrote: I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the code with in that method i.e.

Re: Storage Cost Calculation

2014-09-27 Thread Steven D'Aprano
Chris Angelico wrote: The RAM was presumably the only difference between the two models, so as long as Model A cost at least £100 (which seems likely; a bit of quick Googling suggests that it may have been of the order of £400), a £100 difference can plausibly be called the price of the RAM.

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 12:47 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Chris Angelico wrote: The RAM was presumably the only difference between the two models, so as long as Model A cost at least £100 (which seems likely; a bit of quick Googling suggests that it may

Re: Storage Cost Calculation

2014-09-27 Thread Steven D'Aprano
Chris Angelico wrote: On Sun, Sep 28, 2014 at 12:47 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [...] But no, you can't put the £100 difference down to the price of the RAM even if RAM were the only difference between the two model Micros. There's not enough information

Re: Storage Cost Calculation

2014-09-27 Thread Ian Kelly
On Sat, Sep 27, 2014 at 8:47 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: http://www.theregister.co.uk/Print/2011/11/30/bbc_micro_model_b_30th_anniversary/ At the time, the BBC Micro memory was (I think) expandable: the Model B could be upgraded to 128K of memory, double

please suggest me best way to learn REST API call with CLI

2014-09-27 Thread Unix SA
Hello, I am intermediate to python and i am familier with OOP, but sometime i lost some where looking at OOP in class and objects :( I am looking at https://github.com/pulp/pulp .. basically it uses okaara to generate CLI and calls API. so for example if i run pulp-admin -u admin -p

[issue22486] Add math.gcd()

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is fixed patch. There was integer overflow. In C short*short is extended to int, but int*int results int. -- Added file: http://bugs.python.org/file36741/lehmer_gcd_7.patch ___ Python tracker

[issue22486] Add math.gcd()

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And for comparison here is simpler patch with Euclidean algorithm. -- Added file: http://bugs.python.org/file36742/euclidean_gcd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22486

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that abspath() can return incorrect result in case of symbolic links to directories and pardir components. I.e. abspath('symlink/..'). -- ___ Python tracker rep...@bugs.python.org

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20267 ___ ___ Python-bugs-list

[issue22502] Ctl-C after continue in pdb stops in signal.py

2014-09-27 Thread Xavier de Gaye
New submission from Xavier de Gaye: With the following script: import time def foo(): import pdb; pdb.set_trace() while 1: time.sleep(.5) foo() Hitting ^C after continue gives: $ ./python foo.py foo.py(5)foo() - while 1: (Pdb) continue ^C Program interrupted. (Use 'cont'

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21883

[issue22503] Signal stack overflow in faulthandler_user

2014-09-27 Thread Andreas Schwab
New submission from Andreas Schwab: test_register_chain fails on aarch64 due to signal stack overflow, when re-raising the signal in faulthandler_user. The problem is that the signal stack can only handle a single signal frame, but faulthandler_user adds a second one. _Py_Faulthandler_Init

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Error message for posixpath.join() was fixed and enhanced in issue22034. Here is a patch which extends this enhancement to relpath() and to other os.path implementations (ntpath and macpath). -- Added file:

[issue15986] memoryview: expose 'buf' attribute

2014-09-27 Thread Stefan Krah
Stefan Krah added the comment: Sometimes I've used memoryview slices to model pointers in C code. memoryview could have limited number methods for pointer arithmetic on the buf pointer. Arithmetic would return new slices, so in fact everything would be safe with respect to bounds checking and

[issue22486] Add math.gcd()

2014-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: Patch 7 works for me. Why are the two Py_ABS() calls at the end needed when we start off the algorithm with long_abs()? The Lehmer code is complex (I guess that's why you added the pure Euclidean implementation), but it's the right algorithm to use here, so

[issue21883] relpath: Provide better errors when mixing bytes and strings

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, tests fail when Python runs without the -bb option. Here is fixed path. -- Added file: http://bugs.python.org/file36744/os_path_typeerrors_2.patch ___ Python tracker rep...@bugs.python.org

[issue22486] Add math.gcd()

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why are the two Py_ABS() calls at the end needed when we start off the algorithm with long_abs()? Because long_abs()'s are omitted for small enough numbers (common case). So we avoid a copying for negative numbers or int subclasses. I guess that's why

[issue9393] shelve.open/bsddb.hashopen exception with unicode paths

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: dbm_open_unicode-32.patch no longer applied cleanly due to Argument Clinic. I'm not sure about applying patches to 2.7. I support this, but it looks as new feature, and you should ask on Python-Dev mailing list. -- nosy: +serhiy.storchaka

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Idea looks good to me. -- components: +Interpreter Core nosy: +serhiy.storchaka type: - enhancement versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569

[issue20021] modernize makeopcodetargets.py

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +easy stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20021 ___

[issue20335] bytes constructor accepts more than one argument even if the first one is not a string

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Do you want to provide a test Renaud? -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - test needed type: - behavior versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3 ___ Python

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does the __attribute__ work for macros as well? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue22034. See also issue21883. -- nosy: +serhiy.storchaka resolution: - out of date stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17174

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ram Rachum
New submission from Ram Rachum: I suggest making Enum members orderable, according to their order in the enum type. Currently trying to order them raises an exception: import enum class Number(enum.Enum): ... one = 1 ... two = 2 ... three = 3

[issue20164] Undocumented KeyError from os.path.expanduser

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python stage: - needs patch versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue15414] os.path.join behavior on Windows (ntpath.join) is unexpected and not well documented

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review stage: - patch review versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15414 ___

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___ ___

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
New submission from Ram Rachum: I'd like Enum objects to expose their serial numbers. Currently it seems the only way to get this is `MyEnum._member_names_.index(my_enum.name)`, which is not cool because it's cumbersome and involves private variables. Perhaps we can use `int(my_enum) == 7`?

[issue1669539] Add os.path.isrelative() and improve ntpath.isabs()

2014-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- title: Improve Windows os.path.join (ntpath.join) smart joining - Add os.path.isrelative() and improve ntpath.isabs() versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: expandvars() works with string, not with path, and I don't think there is a place for it in pathlib. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21301

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22505 ___

[issue22506] `dir` on Enum subclass doesn't expose parent class attributes

2014-09-27 Thread Ram Rachum
New submission from Ram Rachum: Calling `dir` on an enum subclass shows only the contents of that class, not its parent classes. In normal classes, you can do this: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on win32 Type help, copyright,

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 02:40 PM, Ram Rachum wrote: I'd like Enum objects to expose their serial numbers. Can you please provide some motivating use cases? -- ___ Python tracker rep...@bugs.python.org

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: Right now I want it for this: http://bugs.python.org/issue22504 Another use case I can think of is that if you store enum values in a database, you're probably using an int field and you'd want to easily convert between an enum and it's int value. --

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 02:28 PM, Ram Rachum wrote: I suggest making Enum members orderable, according to their order in the enum type. Can you please provide a motivating use case? -- nosy: +barry ___ Python tracker

[issue18855] Inconsistent README filenames

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +easy stage: - needs patch versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18855 ___

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why don't you use IntEnum? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22504 ___ ___

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: Just because I want to be able to get the `int` value of an enum object, doesn't mean I want the enum object to *be* an `int`, which is what `IntEnum` means. I don't want it to be comparable to an int, I don't want to use arithmetic on it, and most importantly I

[issue9850] obsolete macpath module dangerously broken and should be removed

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2ae2ca9d2b66 by Serhiy Storchaka in branch '2.7': Issue #9850: Fixed macpath.join() for empty first component. Patch by https://hg.python.org/cpython/rev/2ae2ca9d2b66 New changeset 54987723de99 by Serhiy Storchaka in branch '3.4': Issue #9850:

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 03:35 PM, Ram Rachum wrote: Just because I want to be able to get the `int` value of an enum object, doesn't mean I want the enum object to *be* an `int`, which is what `IntEnum` means. I don't want it to be comparable to an int, I don't

[issue22503] Signal stack overflow in faulthandler_user

2014-09-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22503 ___ ___ Python-bugs-list

[issue9850] obsolete macpath module dangerously broken and should be removed

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed macpath_join_fix_with_test.patch with some additional tests. Thank you for your contribution Oleg. Needed a patch for deprecating all module or some functions. -- nosy: +serhiy.storchaka stage: commit review - needs patch type: behavior -

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: https://docs.python.org/3/library/enum.html#orderedenum -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22504 ___

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2014-09-27 Thread Daniel Holth
Daniel Holth added the comment: I am not the copyright holder, I only maintain the pypi package for python-ntlm. I might have 10 lines of my own code in the whole package. If running on Windows it would be great to have out of the box native windows NTLM which can be done somehow with the win32

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 02:59 PM, Ram Rachum wrote: Right now I want it for this: http://bugs.python.org/issue22504 https://docs.python.org/3/library/enum.html#orderedenum Another use case I can think of is that if you store enum values in a database, you're

[issue22504] Add ordering between `Enum` objects

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: My particular use case is that I have objects with a tuple of enum objects to each, and I want the tuple to be in canonical order rather than random, for convenience. I can easily use a subclass, but I think it's general enough functionality for it to be

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: https://docs.python.org/3/library/enum.html#orderedenum As I said in the other ticket: I can easily use a subclass, but I think it's general enough functionality for it to be included in the standard library. I could continue the discussion about databases, but

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Deprecated macros can be replaced by deprecated functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19569 ___

[issue11102] configure doesn't find major() on HP-UX v11.31

2014-09-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: -r.david.murray stage: commit review - needs patch versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11102

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks to me as documentation issue. Unfortunately it is not explicitly documented that os.path.join() shouldn't mix str and unicode components (except ascii-only str, such as '.'). There is relevant note in 3.x documentation. It should be adapted to

[issue16121] shlex.shlex.error_leader() reports incorrect line number

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I think I'll leave it up to whoever works on this whether they want to tackle making posix mode and non-posix mode return the same values or turn this into an enhancement ticket for the proposed wrapped_lineno. Or, if no one is interested, we can just close

[issue11479] Add discussion of trailing backslash in raw string to tutorial

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I'm on a quest to clear my 'commit ready' queue. This issue needs to go back to 'needs patch' stage...I'll leave it to someone else to rewrite my original patch based on the feedback, since it is unlikely I will get back to it any time soon. I'll commit it

[issue4755] Add function to get common path prefix

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is more developed patch in issue10395. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4755 ___

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: Note that abspath() can return incorrect result in case of symbolic links to directories and pardir components. I.e. abspath('symlink/..'). Good catch.. Should I use os.path.realpath? -- ___ Python tracker

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 27, 2014, at 04:15 PM, Ram Rachum wrote: The main principle is: If something has an important property (in this case an enum object's numerical value), it should be publicly exposed. I think this is a misunderstanding. Only IntEnum members have a

[issue22505] Expose an Enum object's serial number

2014-09-27 Thread Ram Rachum
Ram Rachum added the comment: Enum members are also defined to be unordered, so their serial number is meaningless. Are you sure? The documentation says Enumerations support iteration, in definition order and shows how `tuple(MyEnum)` outputs the values in definition order. Likewise,

[issue20021] modernize makeopcodetargets.py

2014-09-27 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch. -- keywords: +patch nosy: +berker.peksag, brett.cannon stage: needs patch - patch review Added file: http://bugs.python.org/file36745/issue20021.diff ___ Python tracker rep...@bugs.python.org

[issue19062] Idle: problem confighandler getting userdir

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose that on patrick's computeron his account (but not on admin account) HOME is literal %userprofile%. It looks as just misconfiguration. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-09-27 Thread Francis MB
Francis MB added the comment: I've downloaded 'remove_Netrc_class2.patch' and passes the test suite, the examples on the documentation run ok and manually from the command line: $hg tip changeset: 92597:e29866cb6b98 tag: tip parent: 92594:d43d4d4ebf2c parent:

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6623 ___

[issue22507] PyType_IsSubtype doesn't call __subclasscheck__

2014-09-27 Thread Maries Ionel Cristian
New submission from Maries Ionel Cristian: It appears it just does a reference check: https://hg.python.org/cpython/file/3.4/Objects/typeobject.c#l1300 It appears it's the same in 2.7: https://hg.python.org/cpython/file/2.7/Objects/typeobject.c#l1161 But this is not the intended behaviour

[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Great. The patch looks good to me, too. Can someone add a What's New removal entry to the patch? (See the 3.4 What's New for a model of what removals look like in What's New.) (It would also be nice if the patch were in hg format so that we get a 'review'

[issue4755] Add function to get common path prefix

2014-09-27 Thread Skip Montanaro
Skip Montanaro added the comment: Feel free to close this ticket. I long ago gave up on it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4755 ___

[issue22501] Optimise PyLong division by 1 or -1

2014-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: One more comment: I also benchmarked the change in long_true_div() now and found that it's only a minor improvement for large numbers and a *pessimisation* for small numbers: Before: $ ./python -m timeit -s 'x = 5' 'x / -1' 1000 loops, best of 3: 0.0313

[issue9104] test.support method for dual-testing accelerated code (fixes test_exceptions and other's pickle testing)

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Looks like there is still some disagreement about the implementation here, so this isn't actually ready to commit yet? -- resolution: accepted - stage: commit review - needs patch title: test_exceptions does not test pickling with pickle.py -

[issue22486] Add math.gcd()

2014-09-27 Thread Stefan Behnel
Stefan Behnel added the comment: My personal take is: if there is an implementation in the stdlib, it should be the one that's most widely applicable. And that includes large numbers. We have a working implementation that is algorithmically faster for large numbers, so I can't see why we

[issue7665] test_urllib2 and test_ntpath fail if path contains \

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The ntpath test failure is replicated when the test is ran directly: ~/py/cpython\1$ ./python Lib/test/test_ntpath.py sE. == ERROR: test_relpath

[issue20974] email module docs say not compatible with current python version

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2eea52c287b7 by R David Murray in branch '3.4': #20974: Update version table in email intro. https://hg.python.org/cpython/rev/2eea52c287b7 New changeset 655b34cd8871 by R David Murray in branch 'default': Merge: #20974: Update version table in

[issue20974] email module docs say not compatible with current python version

2014-09-27 Thread R. David Murray
R. David Murray added the comment: I've updated the table (thanks for the patch) but noted that after 5.1/3.2 there is no independent email version. I'd like to just delete __version__ in 3.5, but I don't know if I have to deprecate the constant first :) It didn't get updated in 3.3 or 3.4,

[issue18854] is_multipart and walk should document their treatment of 'message' parts.

2014-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset b717128799b5 by R David Murray in branch '3.4': #18854: make it explicit that is_multipart does not mean 'multipart/xxx'. https://hg.python.org/cpython/rev/b717128799b5 New changeset 9909de463dc9 by R David Murray in branch 'default': Merge:

[issue18854] is_multipart and walk should document their treatment of 'message' parts.

2014-09-27 Thread R. David Murray
R. David Murray added the comment: Thanks Abhilash. I decided to use the full example after all, but tuned up the language a bit. -- resolution: - fixed stage: commit review - resolved status: open - closed type: - behavior versions: +Python 3.5 -Python 3.3

  1   2   >