Modify

Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#10667 closed enhancement (fixed)

Unicode number not converted to Integer

Reported by: myingling Owned by: branson
Priority: normal Component: DirectoryAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

I tuned the cache to 0, as mentioned on the caching page so I could try debugging something. Then I started getting warnings about Unicode not being an Int.

In r12025, there is the following section:

425 	          if last_prune + self.cache_memsize_warn > now:
426 	            self.env.log.info('pruning memcache in less than %d seconds, you might increase cache_memsize.' % int(self.cache_memsize_warn))
427 	               
428 	        self.env.log.debug('pruning memcache by %d: (current: %d > max: %d )' % (self.cache_memprune, len(self._cache), int(self.cache_memsize)))
429 	        cache_keys = self._cache.keys()

I believe 'self.cache_memsize_warn' needs to be wrapped in an int cast, or 'int(self.cache_memsize_warn)' everywhere it is used. This change appeared to fix it for me. I'm not sure if there are other places this much be changed as well.

Attachments (0)

Change History (8)

comment:1 Changed 11 years ago by anonymous

The file is auth.py. Sorry for the messed up formatting of the ticket.

comment:2 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 9 years ago by bebbo

Type: defectenhancement

comment:4 Changed 9 years ago by bebbo

In 14830:

refs #12068
refs #11686
refs #11361
refs #11307
refs #11304
refs #10878
refs #10715
refs #10667
refs #10632
refs #10631
refs #11015

various fixes

comment:5 Changed 9 years ago by bebbo

Resolution: fixed
Status: newclosed

added the provided patch

comment:6 Changed 9 years ago by bebbo

In 14833:

refs #10667
fixed indention -> fixed code.

comment:7 Changed 9 years ago by Ryan J Ollos

I think it shouldn't be necessary to convert cache_memsize_prune, cache_memprune or cache_memsize to int in the auth module because the Options were changed to IntOptions in [13391]. See #10581.

comment:8 Changed 9 years ago by Ryan J Ollos

Also there are many instances in which Options are wrapped in str. Options such as group_class_attr are already strings, so it shouldn't be necessary to convert them.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain branson.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.