[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Likely they were written before the invention of unittest test skpping. They could be converted. See issue18702. -- ___ Python tracker ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Likely they were written before the invention of unittest test skpping. They could be converted. 2013/8/10 Terry J. Reedy : > > Terry J. Reedy added the comment: > > This was the only failure on 2 of 4 buildbots when I last looked. > > test_os has several met

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: This was the only failure on 2 of 4 buildbots when I last looked. test_os has several methods like this: def test_dup2(self): if hasattr(os, "dup2"): self.check(os.dup2, 20) Should the hasattr be moved to skipUnless for all of these? Th

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b0e9e9812f8 by Terry Jan Reedy in branch 'default': Issue #15301: skip new test method so Windows builtbots stop failing. http://hg.python.org/cpython/rev/9b0e9e9812f8 -- ___ Python tracker

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: The Windows buildbots are broken: == ERROR: test_chown_uid_gid_arguments_must_be_index (test.test_os.MakedirTests) -- Traceba

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Larry Hastings
Larry Hastings added the comment: Okay then, closing. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Georg Brandl
Georg Brandl added the comment: Looks like an unnecessary change for the maintenance releases then. -- ___ Python tracker ___ ___ Pyth

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original issue was fixed in issue4591. Larry's patch only adds support of PyNumber_Index() and refactors already existing uid/gid converters. -- ___ Python tracker _

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think we should leave 2.7 at rest for the moment. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Larry Hastings
Larry Hastings added the comment: Now fixed in trunk. I am waiting to hear from Georg and the only-recently-pinged Benjamin to see if they want these fixes in 3.3 or 2.7. -- ___ Python tracker ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset f871f8662509 by Larry Hastings in branch 'default': Issue #15301: Parsing fd, uid, and gid parameters for builtins http://hg.python.org/cpython/rev/f871f8662509 -- ___ Python tracker

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-07 Thread Larry Hastings
Larry Hastings added the comment: Benjamin, do you want my elaborate fix in for 2.7? It means adding two new converters, one for pid and one for gid, and switching everything that takes pid/gid arguments to use those. -- nosy: +benjamin.peterson __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let's push. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-07-02 Thread Scott Leerssen
Scott Leerssen added the comment: Regarding whether or not to include the fix in 2.7, I'd like to suggest that it be included there as well. It will be quite some time before the project on which I work moves to Python 3, and I just hit the same issue. -- nosy: +Scott.Leerssen __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is what I had in mean. Sorry for indistinctness. As far as you change _fd_converter() it will be good to add also a test for float/decimal/fractional fd. Otherwise the patch LGTM. -- ___ Python tracker

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-23 Thread Larry Hastings
Larry Hastings added the comment: Serhiy: Oh, I get it, your critique was about the "Note:" part at the bottom. It would have been helpful if you had inserted your feedback there, instead of at the top. Yeah, you're right, the note was incorrect. I considered adding a note saying that the co

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-22 Thread Larry Hastings
Larry Hastings added the comment: Whoops, meant to throw in a Fraction too. Added that. Also hoisted the imports out of the function call, just to be a good guy. -- Added file: http://bugs.python.org/file29978/larry.chown.unsigned.uid.gid.5.diff __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-22 Thread Larry Hastings
Larry Hastings added the comment: Latest patch incorporating Serihy's comments. -- Added file: http://bugs.python.org/file29977/larry.chown.unsigned.uid.gid.4.diff ___ Python tracker ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New tests needed (with Decimal and Fraction). And what is purpose of changing Py_TYPE(o) to o->ob_type? -- ___ Python tracker ___ ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-22 Thread Larry Hastings
Larry Hastings added the comment: Can I get an LGTM? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-16 Thread Larry Hastings
Larry Hastings added the comment: Whoops, forgot to write something here. Updated patch (in previous edit to the issue) incorporating Serhiy's suggestions from Rietveld. -- ___ Python tracker

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-16 Thread Larry Hastings
Changes by Larry Hastings : Added file: http://bugs.python.org/file29883/larry.chown.unsigned.uid.gid.3.diff ___ Python tracker ___ ___ Python

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >* The most common case (no overflow) is now first. In Serhiy's patch > the most common case is buried in the middle of the second "if". It's because my implementation is a simplified version of more complicated patch for issue2005, which supports signed ui

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Larry Hastings
Larry Hastings added the comment: See my comment above (dated 2013-04-14 04:30). I'm passing the buck. -- ___ Python tracker ___ ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: To answer Serhiy's question: I'd say that this level of cleanup is probably only appropriate for 3.4. Larry? -- ___ Python tracker ___ __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Larry Hastings
Larry Hastings added the comment: Okay, I got inspired and (in the words of Barry Warsaw) JFDI. Attached is my revised patch. I took Serhiy's patch and reworked it quite a bit: * I think it's now easier to follow. In particular: * The most common case (no overflow) is now first. In Serhiy's

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-14 Thread Larry Hastings
Larry Hastings added the comment: Oh...! Serhiy, I thought you already checked in the AsIndex stuff. Guess I was asleep at the switch. Certainly the patch should go in for trunk. I'd be comfortable with it going in for 3.3 as a bugfix but that's ultimately Georg's call. I'll give you a com

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Mark. There is only one question. For what version is it appropriate? Only for 3.4 or for all maintained? -- ___ Python tracker __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: +1 on using PyNumber_Index. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mai

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-02-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b37e53838eb by Serhiy Storchaka in branch '2.7': Issue #15301: Enhance os.*chown() testing. Based on patch by Larry Hastings. http://hg.python.org/cpython/rev/9b37e53838eb New changeset a0baf5347cd1 by Serhiy Storchaka in branch '3.2': Issue #1530

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-02-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here is a patch which uses __index__ for uid and gid conversion. decimal.Decimal should be added to the list of wrong types in the test. I'm not sure about the last patch, whether to consider it as a bugfix or as a new feature? -- nosy: +skrah v

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Similar test was committed for issue4591 and it fixes this issue. There are only two differences with Larry's patch: tests and handling of non-integers. Here is a patch based on Larry's patch which extends tests for *chown(). -- nosy: +serhiy.storcha

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-14 Thread Larry Hastings
Larry Hastings added the comment: Here's a first cut at a patch. It's really just an update of Victor's patch to #4591 (done with his blessing). I tweaked it slightly; the parsing functions are now O& converter functions. I also added a reasonable unit test. Note however that the unit test

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-14 Thread Larry Hastings
Larry Hastings added the comment: It looks like #1747858 is another duplicate. Though arguably all these "dups" aren't really dups because I rewrote chown's argument parsing for 3.3. -- ___ Python tracker __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Larry Hastings
Larry Hastings added the comment: That patch from Victor looks pretty good. I'll try to get it in for beta 2, however I'm on the road right now. I'm back Sunday night and will try to do it then. If someone else wants to jump in that's fine with me. -- assignee: -> larry _

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Ned Deily
Ned Deily added the comment: There is a proposed patch by haypo with Issue4591. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Larry Hastings
Larry Hastings added the comment: Thinking about it some more, maybe we need to be smart about whether uid_t/gid_t are signed or unsigned. I'm no good with configure hackery--could anyone here enhance the configure script so it could tell us whether or not uid_t and gid_t were signed or unsi

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread do1
do1 added the comment: Problem emerged when well-known backup software (rdiff-backup) is 'crashed' (as in no backups). So I think this is not that theoretical. -- ___ Python tracker __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Larry Hastings
Larry Hastings added the comment: I don't think "k" is the right answer. POSIX defines the user and group parameters as uid_t and gid_t respectively; in turn, uid_t and gid_t are defined as "integers", pointedly omitting the either of the words "signed" or "unsigned". So POSIX makes no guara

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Ned Deily
Ned Deily added the comment: Possible duplicate of Issue4591? -- nosy: +haypo, ned.deily ___ Python tracker ___ ___ Python-bugs-list

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Mark Shannon
Mark Shannon added the comment: Larry, you're the expert on this. Looks to me like the format character in PyArg_ParseTuple in posix_fchown and kin should be 'k' (unsigned long) rather than 'l' (signed long). -- nosy: +Mark.Shannon, larry type: -> behavior __

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-08 Thread do1
do1 added the comment: I can add that system is x86_32. Same code in x86_64 result in no error even on older Python version 2.6.6 -- ___ Python tracker ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-08 Thread do1
New submission from do1 : os.chown() can not change uid/gid to valid but high number. # chown 4294967294.4294967294 a # ls -l a -rw-r--r-- 1 4294967294 4294967294 0 Jul 9 05:22 a # python Python 2.7.3 (default, Jun 24 2012, 06:19:44) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Type "help