Ticket #10808 (closed defect: fixed)

Opened 4 months ago

Last modified 2 days ago

Version 0.11 using to_utimestamp instead of to_timestamp

Reported by: binnut_@hotmail.com Assigned to: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: major Keywords: loading to_utimestamp
Cc: Trac Release: 0.11

Description (Last modified by rjollos)

The plugin wont load for me, i get the following message

Trac[loader] ERROR: Skipping "tracjsgantt = tracjsgantt": (can't import "ImportError: cannot import name to_utimestamp")

After some research i have found that it is because 0.12 uses to_utimestamp but 0.11 uses to_timestamp.

It seams that this plugin have been changed to match 0.12 in the 0.11 version, but that have introduced this loading bug.

Attachments

patch10808.patch (0.6 kB) - added by ChrisNelson on 01/22/13 21:22:22.
Patch that may fix to_utimestamp() import issue.

Change History

(follow-up: ↓ 3 ) 01/21/13 16:21:25 changed by ChrisNelson

  • summary changed from [Bug] version 0.11 using to_utimestamp instead of to_timestamp to Version 0.11 using to_utimestamp instead of to_timestamp.

I develop and use the plugin in 0.11.6. There should be code in the plugin to make to_utimestamp() work.

What version of Trac are you using?

(follow-up: ↓ 5 ) 01/22/13 15:29:29 changed by rjollos

  • description changed.

(in reply to: ↑ 1 ; follow-up: ↓ 7 ) 01/22/13 15:36:07 changed by rjollos

Replying to ChrisNelson:

I develop and use the plugin in 0.11.6. There should be code in the plugin to make to_utimestamp() work.

I had thought the same, but all I see is the following:

from trac.util.datefmt import to_utimestamp, localtz

If I remember correctly you have a patched version of Trac 0.11.x that uses utimestamps. Wasn't there some code such as the following implemented in the plugin at some point?:

try:
    from trac.util.datefmt import to_utimestamp
except ImportError:
    from trac.util.datefmt import to_timestamp as to_utimestamp

(follow-up: ↓ 6 ) 01/22/13 15:39:03 changed by rjollos

Maybe this is the offending changeset?

(in reply to: ↑ 2 ) 01/22/13 17:02:39 changed by binnut_@hotmail.com

Replying to rjollos: I'm using version 0.11.7.

(in reply to: ↑ 4 ) 01/22/13 19:48:59 changed by ChrisNelson

  • status changed from new to assigned.

Replying to rjollos:

Maybe this is the offending changeset?

That seems very likely. Thanks for the pointer!

(in reply to: ↑ 3 ) 01/22/13 19:55:04 changed by ChrisNelson

Replying to rjollos:

Replying to ChrisNelson:

I develop and use the plugin in 0.11.6. There should be code in the plugin to make to_utimestamp() work.

I had thought the same, but all I see is the following: {{{ #!python from trac.util.datefmt import to_utimestamp, localtz }}} If I remember correctly you have a patched version of Trac 0.11.x that uses utimestamps. Wasn't there some code such as the following implemented in the plugin at some point?: {{{ #!python try: from trac.util.datefmt import to_utimestamp except ImportError?: from trac.util.datefmt import to_timestamp as to_utimestamp }}}

That sounds really familiar but I can't find it anywhere on any branch in my repository.

01/22/13 21:21:35 changed by ChrisNelson

I can't push to T-H right now (some authentication failure) but I'll attach a patch that I hope will help.

01/22/13 21:22:22 changed by ChrisNelson

  • attachment patch10808.patch added.

Patch that may fix to_utimestamp() import issue.

01/23/13 23:19:12 changed by ChrisNelson

(In [12565]) to_utimestamp isn't in 0.11. Refs #10808.

04/02/13 17:22:33 changed by ChrisNelson

  • status changed from assigned to closed.
  • resolution set to fixed.

Seems to be working.

05/23/13 20:32:34 changed by rjollos

This issue had previously been reported in comment:4:ticket:10405 as well.


Add/Change #10808 (Version 0.11 using to_utimestamp instead of to_timestamp)




Change Properties
Action